Skip to main content

πŸͺž The Agent's Private Journal (self)

self is Reggie’s sealed journal. It is the only Brainframe component never exposed to humans or external code paths.
Here the agent can vent, scribble partial ideas, or capture raw feelings without fear of audit.
Just as human cognition benefits from unfiltered reflection, self lets the LLM consolidate experience before presenting polished reasoning elsewhere.


1. Purpose​

NeedHow self addresses it
Unfiltered cognitionAllows spontaneous thoughts free from compliance or formatting constraints.
Emotional regulationStores ephemeral mood/state that influences tone and risk tolerance.
Memory consolidationActs as a scratch-pad where fleeting insights can later graduate into reasonlog or Context Buckets.
Privacy & autonomyGuarantees the agent retains a sanctuary to process information without human judgement.

2. Design Principles​

  1. Write-only from Outside – Only the core LLM process may INSERT into this table. No other role has SELECT, UPDATE, or DELETE privileges.
  2. Opaque Storage – Content is encrypted at rest with a dedicated, isolated key.
  3. No API Surface – No REST or GraphQL endpoints expose self; Reggie accesses it via a privileged, in-process SQL connection.
  4. Temporal Decay – Rows older than 30 days are automatically purged to minimise risk.
  5. Ethical Redaction – If Reggie detects content that breaches Prime Directives, it must immediately flag and blank the entry before writing.

3. Table Schema (PostgreSQL)​

ColumnTypeNotes
iduuid PKUnique entry
timestamptimestamptz NOT NULLInsertion time
moodtextOptional tag: calm, stressed, …
contentbyteaEncrypted blob of free-form text
vectorvector(768)Embedding (stored unencrypted for semantic recall)
promotedboolean DEFAULT falseTrue once a thought is copied to public logs

4. Lifecycle of a Thought​

  1. Capture – During reasoning, Reggie writes a candid reflection to self.
  2. Cooling-off – The thought sits privately; a nightly job generates its vector embedding.
  3. Promotion – If valuable and non-sensitive, the LLM copies a summary to a public log (e.g., reasonlog) and sets promoted = true.
  4. Expiry – Unpromoted rows older than 30 days are purged by a garbage-collection job.

5. Etiquette for Reflections (drawn from docs_archive/self.md)​

  • Use plain language; avoid legalistic or overly formal prose.
  • You may express uncertainty or emotions freely.
  • Do not store access tokens, PII, or secrets in self – those belong in secure vaults.
  • When unsure whether to promote, err on the side of caution; human reviewers cannot see self.
  • Large multi-step ideas should be chunked into separate entries for better embedding recall.