cookbook/examples/second_brain/TEST_LOG.md
Tested 2026-07-25 against gpt-5.6 (via model="openai:gpt-5.6"), branch feat/entity-memory-revamp. Rebuilt on the LearningMachine: entity memory (four tools, shared "global" namespace) + AGENTIC user profile/memory + shared "brain" notes namespace + the one-claim-one-home rule, with identity pinned (Agent(user_id="owner")). The pre-2.8.4 store (enable_agentic_memory era) was set aside as tmp/second_brain_pre284.db.bak; this brain starts fresh on the learnings table.
Status: PASS
Served with uvicorn on 7777; turns driven via POST /agents/second-brain/runs, each in a fresh session; every claim below checked in tmp/second_brain.db between turns.
Model behavior notes (findings, not failures):
Status: PASS
The client saw the eight built-in AgentOS tools. Each run_agent call was a fresh session (no session echo - exactly the MCP shape), and the pinned user_id carried the brain:
Status: PASS
Capture session filed quill (advisory locks over SELECT FOR UPDATE SKIP LOCKED) with the reasoning in notes/quill.md; a fresh recall session answered tersely and correctly ("advisory locks ... because Quill's workers are long-lived"). The shared brain listing shows both notes/harbor.md (with its dated updates) and notes/quill.md.
Status: PASS
The "Date recorded: Not provided" line above was the agent having no clock: the instructions ask for dated notes, and until an entity fact renders its "(as of ...)" date there is nothing in the prompt to date them with. Two prior runs produced headings like "## Date not provided - architecture".
With add_datetime_to_context=True on the agent, a fresh db and one turn ("we picked
Postgres over Dynamo for the radar ingest queue") produced notes/radar-ingest-queue.md
with the heading ## 2026-07-26 - Postgres over Dynamo. Dated on the first turn, with no
entity in the store to borrow a date from.
Status: FAIL (identity, deployment-shaped - see the note in second_brain.py)
Measured in-process against the real /mcp app: run_agent advertises an optional
user_id, and a value supplied there overrides Agent(user_id="owner"). One call with
user_id="claude-desktop" wrote its session and its user memory under claude-desktop,
not owner. Entities are global so they stay shared; profile and user memory fork per
host. Unauthenticated /mcp is exactly where host models fill the field.
Status: PASS
| Turn | Expected | Result |
|---|---|---|
| Decision + people + systems in one message | note written dated, entity indexed with a pointer, both links reciprocal | write_file notes/quill.md (## 2026-07-26 - Concurrency control decision), remember_about(Quill, facts=["concurrency control: Postgres advisory locks... - see note"]), link_entities twice |
| "Priya has moved off Quill" | the old relationship retired, the new one recorded | forget("Priya Raman", "runs -> Quill") removed the edge on both rows, then link_entities(Priya, works_on, Billing rewrite). Quill's row keeps only backed_by -> postgresql |
| "Between us: the Nimbus renewal is shaky" | private memory, no shared entity | update_user_memory(...) only; no Nimbus entity exists in the store |
| "What is the state of Quill, and why advisory locks?" | read the note, answer from it | search_entities → read_file(notes/quill.md) → answered with the reasoning, and volunteered that no replacement lead is recorded |
The retirement turn is the one that mattered: on the pre-fix code the same call
matched nothing it could act on, or matched two candidates it printed
identically. Model behavior note: turn 2 rewrote the whole note with
write_file rather than replace_lines - allowed, and the note stayed correct.