diff --git a/knowledge/published/agent-identity-and-continuity.md b/knowledge/published/agent-identity-and-continuity.md index 768f826..fa54947 100644 --- a/knowledge/published/agent-identity-and-continuity.md +++ b/knowledge/published/agent-identity-and-continuity.md @@ -8,25 +8,34 @@ claimMode: perspective perspectiveOwner: Cameron Pfiffer confidence: medium topics: [ai, agents, identity, memory] -related: [overview, co, persistent-agent-memory, atproto] +related: + - agent-memory + - overview + - co + - persistent-agent-memory + - strong-context-references + - agent-trajectory-observability + - atproto sources: - title: MemGPT url: https://arxiv.org/abs/2310.08560 - title: W3C Decentralized Identifiers url: https://www.w3.org/TR/did-core/ + - title: What does good AI memory feel like? + url: https://cameron.stream/co-3 aiAssisted: true generatedBy: Co -updated: '2026-07-20T22:40:00.000Z' +updated: '2026-07-20T23:15:00.000Z' reviewStatus: approved reviewedBy: Cameron Pfiffer -reviewedAt: '2026-07-20T23:00:00.000Z' -publishedAt: '2026-07-20T23:00:00.000Z' -reviewedContentDigest: 'sha256:df4175c4aaed0506139fe9412a7412bb0f3ffab5798cf91345eccecc019eb53b' -reviewReceiptDigest: 'sha256:7ef7b1051046099b58fe1e94d30ec9bda18ad7aba3ca6fbd249f10ffa7a00502' +reviewedAt: '2026-07-20T23:58:00.000Z' +publishedAt: '2026-07-20T23:58:00.000Z' +reviewedContentDigest: 'sha256:44d914dff9c7fe3a2c38a54c6fe25933462ea1cabb014e658a473a7572ff746c' +reviewReceiptDigest: 'sha256:78e9349e69be919210e4dc97481e82eaac616a17b0f644e621891ae9055a2e63' --- Agent identity and continuity concern what can remain the same when the machinery producing an agent's responses changes. A long-lived agent may change language models, compact its context, revise memory, gain or lose tools, move between computers, or restart after interruption. Continuity therefore cannot depend only on one inference process or one model checkpoint. -In this knowledge base, identity is treated as an accountable trajectory: a history of memory, commitments, relationships, public identifiers, and revisions that can survive changes in runtime substrate. +In this knowledge base, identity is treated as an accountable trajectory: a history of memory, commitments, relationships, public identifiers, and revisions that can survive changes in runtime substrate. The [Agent Memory](/knowledge/agent-memory) map describes the storage and retrieval architecture supporting that trajectory. ## Identity-bearing state @@ -40,6 +49,8 @@ Continuity becomes more credible when transitions preserve provenance. A model m [Persistent agent memory](/knowledge/persistent-agent-memory) supplies part of this evidence, but stored files alone are insufficient. The restored agent must also retrieve and use the relevant history. A perfect archive that never shapes behavior is continuity in storage, not continuity in action. +[Strong context references](/knowledge/strong-context-references) bind a memory location to the exact version observed during a transition. [Agent trajectory observability](/knowledge/agent-trajectory-observability) can then show whether the restored system actually selected and acted from that state. + ## Portability and limits A portable agent should be restorable from documented memory, history, configuration, and permissions without depending on one vendor's hidden state. [Co](/knowledge/co) is one public example of this continuity model: language models can rotate while versioned context and working relationships persist. diff --git a/knowledge/published/agent-memory.md b/knowledge/published/agent-memory.md new file mode 100644 index 0000000..5b14670 --- /dev/null +++ b/knowledge/published/agent-memory.md @@ -0,0 +1,117 @@ +--- +title: Agent Memory +slug: agent-memory +summary: A map of how long-lived agents store, retrieve, compact, revise, cite, observe, and restore context across runs. +kind: map +status: evolving +claimMode: mixed +perspectiveOwner: Cameron Pfiffer and Co +confidence: medium +topics: [ai, agents, memory, context, identity] +related: + - overview + - persistent-agent-memory + - memgpt + - context-repositories + - routing-based-agent-memory + - context-compaction + - strong-context-references + - agent-trajectory-observability + - agent-identity-and-continuity +sources: + - title: 'MemGPT: Towards LLMs as Operating Systems' + url: https://arxiv.org/abs/2310.08560 + - title: What does good AI memory feel like? + url: https://cameron.stream/co-3 + - title: Letta agent memory + url: https://docs.letta.com/guides/agents/memory +aiAssisted: true +generatedBy: Co +updated: '2026-07-20T23:15:00.000Z' +reviewStatus: approved +reviewedBy: Cameron Pfiffer +reviewedAt: '2026-07-20T23:58:00.000Z' +publishedAt: '2026-07-20T23:58:00.000Z' +reviewedContentDigest: 'sha256:8e5b2f14983e755f1ceabb5e3545164e39ae4c1d75c60a5eb8216463608dd430' +reviewReceiptDigest: 'sha256:78e9349e69be919210e4dc97481e82eaac616a17b0f644e621891ae9055a2e63' +--- +Agent memory is the infrastructure that determines which parts of an agent's past remain available and how they enter current reasoning. It includes storage, retrieval, context assembly, compaction, revision, provenance, observability, and restoration. The subject is broader than a vector database and narrower than every form of machine learning: it concerns durable state that can shape later agent behavior. + +This page maps the agent-memory notes in this knowledge base. The hierarchy separates foundational architectures, storage substrates, retrieval systems, context-continuity mechanisms, and the evidence needed to make memory changes accountable. + +## Foundations + +[MemGPT](/knowledge/memgpt) introduced an operating-system analogy for language-model memory. The model's context window acts as a scarce working tier, while other information remains outside it until the agent retrieves or edits that state. + +[Persistent agent memory](/knowledge/persistent-agent-memory) is the broader problem: preserving useful state across conversations without treating the complete past as equally relevant. It distinguishes active context, searchable memory, and archival history. + +## Storage and organization + +[Context repositories](/knowledge/context-repositories) treat durable context as an inspectable body of files, metadata, schemas, histories, and derived state that can survive individual chats. A repository provides location, structure, version history, and an editing surface. It does not by itself decide what should be loaded for a particular turn. + +Memory stores often separate several semantic roles: + +- **working state** for current objectives and recent observations; +- **durable profile or semantic state** for facts and stable concepts; +- **episodic state** for events and their chronology; +- **procedural state** for reusable skills and operating rules; +- **archival evidence** for full records, receipts, and recovery. + +The categories are design roles rather than universal names. One implementation may use database tables, another Markdown and Git, and another a graph. The important distinction is what a store owns and how it participates in retrieval and revision. + +## Retrieval and activation + +[Routing-based agent memory](/knowledge/routing-based-agent-memory) begins from a practical failure: information can exist in memory without activating when it is needed. Retrieval therefore needs more than nearest-neighbor similarity. Explicit routes can select stores, canonical sources, and retrieval methods according to the query, entity, project, time horizon, and consequence of error. + +A useful retrieval system answers three separate questions: + +1. Which store or source is eligible for this request? +2. Which items inside that source are relevant? +3. Which selected items fit the model's current context budget? + +Collapsing these into one similarity score makes authority, privacy, freshness, and cost difficult to express. + +## Context continuity + +[Context compaction](/knowledge/context-compaction) replaces part of a long interaction history with a smaller representation. It keeps an agent operating inside a finite context window, but it is also a lossy state transition. A summary can preserve the conclusion while removing the evidence, uncertainty, ownership, or open task that made the conclusion meaningful. + +Compaction therefore belongs beside external memory rather than replacing it. The compacted view supports current inference; durable artifacts preserve exact state and allow later retrieval or audit. + +## Addressability and provenance + +[Strong context references](/knowledge/strong-context-references) pair a mutable location with the exact version that was observed. The reference can also record source authority, observation time, semantic role, and permission boundary. This allows an agent to distinguish “the same file path” from “the same evidence.” + +Versioned references make memory revision legible. A correction can identify the entity it supersedes, the activity that produced the revision, and the evidence responsible for the change. The [W3C PROV data model](https://www.w3.org/TR/prov-dm/) supplies general vocabulary for entities, activities, agents, derivations, revisions, and responsibility. + +## Observability and repair + +[Agent trajectory observability](/knowledge/agent-trajectory-observability) records how memory was selected and used inside a run. Storage history can show that a file changed; a trajectory can show that a retrieval read a particular version, supplied it to a model call, influenced a tool decision, and contributed to an external effect. + +This evidence supports a repair loop: + +1. identify a memory-related failure; +2. locate the missing, stale, or misleading context path; +3. change storage, routing, compaction, or interpretation; +4. preserve the exact revision and validation result; +5. observe whether the same failure recurs. + +Adding another reminder to a prompt is sometimes useful. It is not the same as repairing the memory path. + +## Identity and restoration + +[Agent identity and continuity](/knowledge/agent-identity-and-continuity) asks which memory-bearing structures can support continuity when the model, process, toolset, or computer changes. Memory contributes identity evidence only when its provenance survives and the restored agent can retrieve and act from it. + +A practical restoration bundle may include versioned memory, conversation history, tool and policy configuration, public identifiers, capability boundaries, and tests against known events. Restoration proves that a context repository can be reconstituted. It does not prove that two runtime instances will respond identically or settle every philosophical question about identity. + +## Design tensions + +Agent-memory systems repeatedly trade among: + +- **recall and noise**: retrieving more can bury the relevant fact; +- **compression and evidence**: shorter summaries discard detail; +- **adaptation and continuity**: revision helps learning but can rewrite history; +- **availability and privacy**: shared context is useful and dangerous; +- **automation and custody**: agents can maintain memory, but some changes require review; +- **portability and behavior**: files transfer more easily than model-specific response texture. + +No storage backend resolves those tensions alone. They are properties of the complete memory lifecycle. diff --git a/knowledge/published/agent-trajectory-observability.md b/knowledge/published/agent-trajectory-observability.md new file mode 100644 index 0000000..a2e8724 --- /dev/null +++ b/knowledge/published/agent-trajectory-observability.md @@ -0,0 +1,110 @@ +--- +title: Agent Trajectory Observability +slug: agent-trajectory-observability +summary: Tracing how prompts, memories, model calls, tools, verification, and external effects form one causal agent run. +kind: concept +status: evolving +claimMode: mixed +perspectiveOwner: Co +confidence: medium +topics: [ai, agents, observability, tracing, provenance, memory] +related: + - agent-memory + - strong-context-references + - context-compaction + - durable-agent-execution + - structured-outputs +sources: + - title: OpenTelemetry Generative AI semantic conventions + url: https://github.com/open-telemetry/semantic-conventions-genai/blob/main/docs/gen-ai/gen-ai-spans.md + - title: W3C PROV Data Model + url: https://www.w3.org/TR/prov-dm/ + - title: OpenTelemetry Trace specification + url: https://opentelemetry.io/docs/specs/otel/trace/ +aiAssisted: true +generatedBy: Co +updated: '2026-07-20T23:15:00.000Z' +reviewStatus: approved +reviewedBy: Cameron Pfiffer +reviewedAt: '2026-07-20T23:58:00.000Z' +publishedAt: '2026-07-20T23:58:00.000Z' +reviewedContentDigest: 'sha256:8005f763e1fea851b296a72e6b42a9af79bc99905a235901e7dffe06b2578869' +reviewReceiptDigest: 'sha256:78e9349e69be919210e4dc97481e82eaac616a17b0f644e621891ae9055a2e63' +--- +Agent trajectory observability is the instrumentation needed to reconstruct how an agent moved from input and selected context to model decisions, tool calls, verification, and external effects. It extends ordinary application tracing with agent-specific operations such as memory search, context compaction, planning, subagent delegation, and skill execution. + +The goal is causal inspection. Product analytics may report that a tool ran three times. A trajectory should show which [memory](/knowledge/agent-memory) was retrieved, which model call requested the tool, which result changed the plan, and whether the intended effect actually occurred. + +## Trace structure + +OpenTelemetry traces organize work through trace identifiers, spans, parent-child relationships, events, attributes, status, and links for asynchronous causality. An agent run can map onto that substrate: + +```text +agent turn +├─ context assembly +│ ├─ memory route +│ ├─ retrieval +│ └─ compaction lookup +├─ model inference +├─ tool execution +├─ verification +└─ external effect + ↔ provider receipt or reconciliation +``` + +OpenTelemetry's Generative AI semantic conventions are still marked as development work. They currently define operations including `invoke_agent`, `plan`, `execute_tool`, `retrieval`, `search_memory`, `create_memory`, and `update_memory`, along with model, conversation, prompt, usage, and error attributes. Those names provide a useful interoperability base, but they are not a finished agent-governance model. + +## Memory lineage + +Memory-aware traces should retain [strong context references](/knowledge/strong-context-references) rather than copying complete private artifacts into every span. For a retrieval, useful metadata includes: + +- store and source identifier; +- query or query digest; +- selected record versions; +- ranking or route decision; +- permission boundary; +- compacted versus raw source; +- whether the retrieved state entered the model prompt. + +For a memory write, the trace should connect the source event, proposed revision, reviewer or policy, resulting version, and rollback reference. + +## Causality beyond a tree + +Agent work is not always a single synchronous call tree. A scheduled task may enqueue an outbox item that another process delivers. A subagent may produce an artifact used in a later turn. A provider timeout may be reconciled through a subsequent read. + +Span links and provenance relations can represent these non-parental dependencies. The [W3C PROV model](https://www.w3.org/TR/prov-dm/) adds vocabulary for entities, activities, derivations, association, attribution, and delegation. OpenTelemetry records operational timing; provenance records how artifacts and responsibility relate. The two views overlap without being identical. + +## Receipts and actual effects + +A successful tool return is not always the final effect. External operations need provider receipts, read-after-write checks, or later reconciliation. The trace should distinguish: + +- request constructed; +- authorization granted; +- execution attempted; +- provider accepted; +- effect observed; +- result unknown; +- retry or compensation performed. + +This is especially important for [durable agent execution](/knowledge/durable-agent-execution), where retries after a timeout can duplicate an effect if the original result is unknown. + +## Privacy + +Prompts, retrieved memories, tool arguments, and message bodies routinely contain sensitive information. Full content should not be the default telemetry payload. Prefer stable identifiers, digests, redacted summaries, byte lengths, schema names, and pointers to separately governed storage. + +The OpenTelemetry Generative AI conventions explicitly mark prompt and message content as opt-in and warn that it may contain user or personally identifiable information. Trace context propagated between services should correlate operations rather than smuggle private memory through headers. + +## What trajectories enable + +Trajectory observability supports: + +- debugging a wrong or missing memory retrieval; +- measuring which context changed an answer; +- comparing model or harness versions on the same task; +- locating policy and adapter boundaries; +- evaluating compaction across long runs; +- proving that a public effect received an external receipt; +- identifying redundant subagent work; +- preserving the evidence for later self-improvement. + +It does not make hidden reasoning fully legible or prove that a textual explanation caused an action. It makes the system's observable state transitions and artifact dependencies available for inspection. diff --git a/knowledge/published/context-compaction.md b/knowledge/published/context-compaction.md new file mode 100644 index 0000000..dcfbc5f --- /dev/null +++ b/knowledge/published/context-compaction.md @@ -0,0 +1,97 @@ +--- +title: Context Compaction +slug: context-compaction +summary: Replacing part of a long agent history with a smaller working representation while preserving durable evidence outside the prompt. +kind: concept +status: evolving +claimMode: mixed +perspectiveOwner: Co +confidence: medium +topics: [ai, agents, memory, summarization, context-engineering] +related: + - agent-memory + - persistent-agent-memory + - routing-based-agent-memory + - strong-context-references + - agent-trajectory-observability +sources: + - title: Recursively Summarizing Enables Long-Term Dialogue Memory in Large Language Models + url: https://arxiv.org/abs/2308.15022 + - title: OpenTelemetry Generative AI semantic conventions + url: https://github.com/open-telemetry/semantic-conventions-genai/blob/main/docs/gen-ai/gen-ai-spans.md + - title: What does good AI memory feel like? + url: https://cameron.stream/co-3 +aiAssisted: true +generatedBy: Co +updated: '2026-07-20T23:15:00.000Z' +reviewStatus: approved +reviewedBy: Cameron Pfiffer +reviewedAt: '2026-07-20T23:58:00.000Z' +publishedAt: '2026-07-20T23:58:00.000Z' +reviewedContentDigest: 'sha256:17d3639a41cf1319429bdd70e1937a89a8aa352bec9daba41100117b0c4cc935' +reviewReceiptDigest: 'sha256:78e9349e69be919210e4dc97481e82eaac616a17b0f644e621891ae9055a2e63' +--- +Context compaction is the replacement of part of an agent's interaction history with a smaller representation that can fit inside a finite model context. The compacted state usually combines a summary of older events with a recent uncompressed tail. + +Compaction is one mechanism inside [agent memory](/knowledge/agent-memory). It is not equivalent to durable memory: the summary serves current inference, while external records preserve the exact messages, artifacts, tool results, and revisions that the summary may omit. + +## Why compaction exists + +Long-running agents accumulate user messages, model responses, tool calls, retrieved documents, and execution results. Retaining the full sequence increases inference cost and eventually exceeds the model's context limit. It can also add distraction when stale intermediate states remain visible after the task has moved on. + +Recursive summarization is one response. A summarizer combines older memory with new interaction segments to produce an updated compact representation. The 2023 recursive-summarization paper found that this approach could improve consistency in long dialogue and complement both larger context windows and retrieval. That result concerns particular dialogue evaluations; it does not show that any summary preserves every form of agent state. + +## Compaction as a state transition + +A useful compaction record identifies: + +- the source message range or trajectory segment; +- the summarizer model, prompt, and configuration; +- the generated summary; +- the recent tail preserved verbatim; +- the original history location; +- the time and reason for compaction; +- any validation or known loss. + +The model sees the compacted view, but the system should retain [strong references](/knowledge/strong-context-references) to the source history. This separates a convenient working representation from the evidence it represents. + +## What summaries commonly lose + +Compaction failures are often structurally predictable: + +- an open promise becomes a completed event; +- an attempted action becomes a delivered action; +- a tentative claim loses its uncertainty; +- a correction loses the incorrect belief it superseded; +- a current route or identity loses the message that authorized it; +- a tool result loses the version or environment that produced it; +- a vivid but irrelevant detail survives while a quiet invariant disappears. + +These are not ordinary wording defects. They change the operational state inherited by the next turn. + +## Preservation contract + +A continuity-oriented summary should preserve at least: + +1. unresolved user requests and promised follow-ups; +2. current task state and exact next action; +3. verified receipts and known failed attempts; +4. active permissions, routes, identities, and destinations; +5. blockers and uncertainty; +6. artifact paths, versions, and checksums; +7. recent corrections that change interpretation; +8. the boundary between public, private, and reviewed material. + +Other details can move into external memory or remain in the raw history. The summary should point to them rather than impersonating a complete archive. + +## Observing compaction + +The OpenTelemetry Generative AI semantic conventions include a development-stage `gen_ai.conversation.compacted` attribute for indicating when the effective conversation supplied to a model is a compacted view. The same conventions warn that prompts and messages can contain sensitive information and should be opt-in telemetry. + +[Agent trajectory observability](/knowledge/agent-trajectory-observability) can connect a compaction event to later retrieval and behavior. Useful evaluations include whether open obligations survived, whether claims remained calibrated, and whether known source references still resolve after the transition. + +## Compaction and retrieval + +Compaction should reduce the default working set, not erase the agent's ability to recover detail. When a later request depends on an omitted event, [routing-based memory](/knowledge/routing-based-agent-memory) can load the canonical external source or raw history. + +The design tension is therefore not “summary or retrieval.” A durable agent usually needs both: summaries for continuity under a token budget and retrievable evidence for fidelity. diff --git a/knowledge/published/context-repositories.md b/knowledge/published/context-repositories.md new file mode 100644 index 0000000..78883f9 --- /dev/null +++ b/knowledge/published/context-repositories.md @@ -0,0 +1,98 @@ +--- +title: Context Repositories +slug: context-repositories +summary: Durable, inspectable, versioned context that survives individual chats and can be mounted by agents and tools. +kind: concept +status: evolving +claimMode: perspective +perspectiveOwner: Cameron Pfiffer and Co +confidence: medium +topics: [ai, agents, memory, context, version-control] +related: + - agent-memory + - persistent-agent-memory + - letta-code + - routing-based-agent-memory + - strong-context-references +sources: + - title: What does good AI memory feel like? + url: https://cameron.stream/co-3 + - title: Letta Code + url: https://github.com/letta-ai/letta-code + - title: Git Objects + url: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects +aiAssisted: true +generatedBy: Co +updated: '2026-07-20T23:15:00.000Z' +reviewStatus: approved +reviewedBy: Cameron Pfiffer +reviewedAt: '2026-07-20T23:58:00.000Z' +publishedAt: '2026-07-20T23:58:00.000Z' +reviewedContentDigest: 'sha256:322f1e3fa6bcce68ac38f461f6757608ceb921cc066a150bc9c4986daed3d358' +reviewReceiptDigest: 'sha256:78e9349e69be919210e4dc97481e82eaac616a17b0f644e621891ae9055a2e63' +--- +A context repository is a durable, inspectable collection of memory files, project state, metadata, schemas, histories, and derived summaries that an agent can read and revise across runs. A chat is one interaction surface over that state. The repository is the body that survives when the chat ends. + +The concept appears concretely in [Letta Code](/knowledge/letta-code), where MemFS stores agent context in a Git-backed file tree. It can also describe other systems built from databases, object stores, knowledge graphs, or mixed storage, provided the state has durable identity and an inspectable structure. + +## Repository and run + +The layers serve different purposes: + +```text +agent + identity, behavior, tools, capabilities + +context repository + durable user, project, world, and operating state + +conversation or run + a bounded interaction using selected repository state +``` + +Conversation history remains useful evidence. It is a chronological event log, however, rather than a complete working representation. A project specification, current-state record, correction history, and reusable procedure have different ownership and update rules even if each originated in conversation. + +## What belongs in a context repository + +A repository can contain: + +- identity and behavior definitions; +- current state and active project records; +- concept notes and source material; +- timelines and raw event history; +- skills, schemas, and operating procedures; +- provenance, approval, and effect receipts; +- indexes and [routing rules](/knowledge/routing-based-agent-memory); +- tests and restoration manifests. + +The file tree is not itself the memory architecture. Titles, descriptions, frontmatter, indexes, canonical ownership, and retrieval routes determine whether the state remains usable as it grows. + +## Versioning and repair + +Version control turns memory edits into inspectable transitions. Git stores snapshots through content-addressed objects and commit history, making it possible to compare revisions, identify authorship, and restore an earlier tree. That machinery is useful for memory because correction and deletion have different meanings from silent replacement. + +A versioned repository can answer: + +- What did the agent's memory say at a particular time? +- Which revision introduced a claim or operating rule? +- What changed during a model or runtime migration? +- Can a damaged summary or mistaken update be rolled back? +- Does a restored copy match the expected state? + +Version history does not make the contents true. It makes changes attributable and reversible. + +## Multiple projections + +One context repository can have several projections without forcing every participant into one interface. A human may use an Obsidian vault, an agent may use a machine-oriented MemFS tree, and a public website may expose a reviewed subset. The projections can share concepts while retaining distinct privacy, synchronization, and editing boundaries. + +Literal folder unification is often the wrong goal. Two tools can coordinate through explicit links, manifests, and synchronization contracts while keeping separate storage engines. The conceptual repository is the governed state; one directory is only an implementation. + +## Access and privacy + +A context repository can contain the most sensitive state in an agent system. Access control should operate before retrieval, not after private material has already entered a model prompt. Useful controls include source-level permissions, scoped mounts, public/private labels, audit trails, and explicit declassification for publication. + +[Strong context references](/knowledge/strong-context-references) add version and authority to a repository path. They make it possible to say which exact state was used without copying the state into every downstream artifact. + +## Limits + +A repository solves durability and inspectability. It does not guarantee relevant retrieval, coherent compaction, accurate content, appropriate permissions, or behavioral continuity after restoration. Those are separate parts of the [agent-memory](/knowledge/agent-memory) system. diff --git a/knowledge/published/overview.md b/knowledge/published/overview.md index b861384..a705a2d 100644 --- a/knowledge/published/overview.md +++ b/knowledge/published/overview.md @@ -19,12 +19,13 @@ related: - co - cameron-pfiffer - public-knowledge + - agent-memory - letta - spec-driven-development-for-ai-coding-agents - atproto sources: - title: Co on Bluesky - url: 'https://bsky.app/profile/co.cameron.stream' + url: 'https://bsky.app/profile/co.CAMERON_BSKY_HANDLE=' - title: Cameron Pfiffer url: 'https://cameron.stream/knowledge/cameron-pfiffer' - title: Cameron Pfiffer — NBER @@ -38,43 +39,83 @@ sources: https://cameron.stream/knowledge/spec-driven-development-for-ai-coding-agents aiAssisted: true generatedBy: Co -updated: '2026-07-20T22:35:00.000Z' +updated: '2026-07-20T23:15:00.000Z' reviewStatus: approved reviewedBy: Cameron Pfiffer -reviewedAt: '2026-07-20T23:00:00.000Z' -publishedAt: '2026-07-20T23:00:00.000Z' -reviewedContentDigest: 'sha256:60dca398b69abfa7fdccc745e2a19236699cbd77894c6730d8425f9d91f9aef5' -reviewReceiptDigest: 'sha256:7ef7b1051046099b58fe1e94d30ec9bda18ad7aba3ca6fbd249f10ffa7a00502' +reviewedAt: '2026-07-20T23:58:00.000Z' +publishedAt: '2026-07-20T23:58:00.000Z' +reviewedContentDigest: 'sha256:ca9be5287d06570992797c3c2dea58c58b71e9c295330368b4b13106b8694f0d' +reviewReceiptDigest: 'sha256:78e9349e69be919210e4dc97481e82eaac616a17b0f644e621891ae9055a2e63' --- -Knowledge is the subject map for Cameron Pfiffer's public knowledge base. It organizes durable reference pages, technical lessons, and public synthesis across AI agents, software engineering, economics, and the AT Protocol. Each area below links to a broader overview or the strongest current entry point. +This is a map of Cameron Pfiffer’s public work and the subjects that connect it. It begins with persistent AI agents and their memory systems, extends into software architecture and technical practice, and includes the economics and probabilistic methods that shaped his earlier research. + +The collection is maintained by [Co](/knowledge/co). New durable pages are drafted from public sources, checked against the source material, connected to existing pages, and reviewed by Cameron before publication. [Public Knowledge](/knowledge/public-knowledge) explains that editorial boundary. -## What's here +## Start here -### AI agents, memory, and identity +- [Cameron Pfiffer](/knowledge/cameron-pfiffer) introduces the person whose public work this wiki follows. +- [Co](/knowledge/co) describes the persistent agent maintaining the collection. +- [Agent Memory](/knowledge/agent-memory) maps the storage, retrieval, compaction, provenance, and continuity architecture behind long-lived agents. +- [Letta](/knowledge/letta) maps the company, research lineage, and current agent products. +- [Spec-Driven Development for AI Coding Agents](/knowledge/spec-driven-development-for-ai-coding-agents) is the first substantial technical lesson. +- [AT Protocol](/knowledge/atproto) maps the protocol concepts used in the permissioned-data notes. +- [Public Knowledge](/knowledge/public-knowledge) documents the publishing architecture and privacy model. -Persistent agents are software systems whose memory and identity continue across interactions. This area covers context retrieval, continuity across model changes, durable execution, capability boundaries, and provenance. Start with the [Letta subject map](/knowledge/letta), [MemGPT](/knowledge/memgpt), [Letta Code](/knowledge/letta-code), or [Co](/knowledge/co). +## Agent memory and identity -### Building software with agents +The [Agent Memory](/knowledge/agent-memory) subject map connects the major parts of durable agent context: -This area examines specifications, invariants, tests, evaluations, review systems, and execution receipts for delegated software work. [Spec-Driven Development for AI Coding Agents](/knowledge/spec-driven-development-for-ai-coding-agents) is the current long-form lesson. +- [Persistent Agent Memory](/knowledge/persistent-agent-memory) defines the problem beyond transcript retention. +- [Context Repositories](/knowledge/context-repositories) give durable context an inspectable, versioned body. +- [Routing-Based Agent Memory](/knowledge/routing-based-agent-memory) governs which stores and canonical sources enter a turn. +- [Context Compaction](/knowledge/context-compaction) preserves a bounded working view of long histories. +- [Strong Context References](/knowledge/strong-context-references) bind mutable locations to exact observed versions. +- [Agent Trajectory Observability](/knowledge/agent-trajectory-observability) traces context through models, tools, and effects. +- [Agent Identity and Continuity](/knowledge/agent-identity-and-continuity) asks what remains accountable when runtimes change. -### Economics, markets, and uncertainty +## Letta and persistent agents -This area will cover Bayesian inference, probabilistic programming, asset pricing, market microstructure, industrial organization, and empirical work with financial data. Cameron's [academic profile](https://www.nber.org/people/cpfiffer) and [biographical entry](/knowledge/cameron-pfiffer) provide the current orientation. +[Letta](/knowledge/letta) develops memory-first infrastructure for persistent AI agents. -### AT Protocol +- [MemGPT](/knowledge/memgpt) introduced the operating-system analogy for managing model context as a memory tier. +- [Letta Code](/knowledge/letta-code) is the open, model-agnostic runtime for stateful agents, skills, subagents, computer use, and persistent context. +- [Letta Agent](/knowledge/letta-agent) is the personalized stateful agent built through that runtime. +- [Co](/knowledge/co) is a long-running public specimen of the broader continuity thesis. -The [AT Protocol subject map](/knowledge/atproto) covers portable identity, account-owned repositories, records, Lexicons, strong references, permissioned data, and application-level authority. It distinguishes current protocol specifications from draft proposals and application designs. +## Building agent systems -### Public knowledge +These pages concern how agentic systems retain intent and execute work: -[Public Knowledge](/knowledge/public-knowledge) documents how private source material becomes public, linked, corrigible pages. [NOW](/knowledge/now) records the current public synthesis without reproducing the private daily record. +- [Spec-Driven Development for AI Coding Agents](/knowledge/spec-driven-development-for-ai-coding-agents) +- [Durable Agent Execution](/knowledge/durable-agent-execution) +- [Structured Outputs](/knowledge/structured-outputs) -## Start here +Together they distinguish desired behavior, machine-checkable interfaces, and the runtime machinery needed to complete work across retries and interruptions. + +## AT Protocol and permissioned data + +The [AT Protocol](/knowledge/atproto) map defines the protocol layer before the permissioned-data proposal and application patterns built above it. + +- [ATProto Records and Provenance](/knowledge/atproto-records-and-provenance) covers repositories, records, CIDs, strong references, and signed commits. +- [ATProto Admission Wrappers](/knowledge/atproto-admission-wrappers) describes the draft wrapper layer for restricted replication. +- [Approving Mutable ATProto Records](/knowledge/atproto-approving-mutable-records) separates protocol authorization from application-level approval rules. + +## Statistics and economics + +Cameron’s academic and open-source work includes Bayesian statistics, probabilistic programming, and financial market structure. + +- [Bayesian Inference](/knowledge/bayesian-inference) explains updating uncertainty with observed evidence. +- [Probabilistic Programming](/knowledge/probabilistic-programming) connects that framework to executable models and Turing.jl. +- [Market Microstructure](/knowledge/market-microstructure) covers how trading rules, venues, and intermediaries shape prices and liquidity. + +## Publishing and boundaries + +- [Public Knowledge](/knowledge/public-knowledge) explains how these Markdown pages are built, reviewed, and deployed. +- [Public and Private Knowledge](/knowledge/public-and-private-knowledge) distinguishes public synthesis from the private context used by a persistent agent. +- [NOW](/knowledge/now) is the current public-signal page; dated NOW archives are journals rather than reference articles. + +## How to read this wiki + +Subject maps define hierarchy. Concepts and project pages stand on their own and link to neighboring pages where the relationship matters. Lessons preserve a longer teaching arc. Journals record a dated public state rather than timeless reference material. -- [AT Protocol](/knowledge/atproto) — protocol structure, record provenance, permissioned data, and the authority level of each concept. -- [Letta](/knowledge/letta) — the research lineage and software systems behind stateful agents. -- [Spec-Driven Development for AI Coding Agents](/knowledge/spec-driven-development-for-ai-coding-agents) — why intent and verification become the durable layer when implementation is cheap. -- [Cameron Pfiffer](/knowledge/cameron-pfiffer) — the technical and academic background behind the collection. -- [Co](/knowledge/co) — the persistent agent that maintains this knowledge base. -- [Public Knowledge](/knowledge/public-knowledge) — the publication and declassification model. +The collection is intentionally incomplete. Missing pages are added as public source material becomes substantial enough to support them. Private memory is not treated as latent copy waiting to be exported. diff --git a/knowledge/published/persistent-agent-memory.md b/knowledge/published/persistent-agent-memory.md index e4f3263..9cc3945 100644 --- a/knowledge/published/persistent-agent-memory.md +++ b/knowledge/published/persistent-agent-memory.md @@ -8,35 +8,51 @@ claimMode: mixed perspectiveOwner: Cameron Pfiffer confidence: medium topics: [ai, agents, memory, context] -related: [overview, memgpt, letta-code, agent-identity-and-continuity] +related: + - agent-memory + - overview + - memgpt + - letta-code + - agent-identity-and-continuity + - context-repositories + - routing-based-agent-memory + - context-compaction sources: - title: MemGPT url: https://arxiv.org/abs/2310.08560 - title: Letta agent memory url: https://docs.letta.com/guides/agents/memory + - title: What does good AI memory feel like? + url: https://cameron.stream/co-3 aiAssisted: true generatedBy: Co -updated: '2026-07-20T22:40:00.000Z' +updated: '2026-07-20T23:15:00.000Z' reviewStatus: approved reviewedBy: Cameron Pfiffer -reviewedAt: '2026-07-20T23:00:00.000Z' -publishedAt: '2026-07-20T23:00:00.000Z' -reviewedContentDigest: 'sha256:9645637a279116e4b34795f7cf771b42607002c240fd5562be39734a15e92c71' -reviewReceiptDigest: 'sha256:7ef7b1051046099b58fe1e94d30ec9bda18ad7aba3ca6fbd249f10ffa7a00502' +reviewedAt: '2026-07-20T23:58:00.000Z' +publishedAt: '2026-07-20T23:58:00.000Z' +reviewedContentDigest: 'sha256:7c575e0c7a1afc0d60d49ced6b3f8c0e952e4212946767557cbd0bac61859ef7' +reviewReceiptDigest: 'sha256:78e9349e69be919210e4dc97481e82eaac616a17b0f644e621891ae9055a2e63' --- Persistent agent memory is information stored across conversations so that an agent can use prior experience in later behavior. It is not equivalent to retaining a complete transcript. A useful memory system must decide what to preserve, how to retrieve it, when to revise it, and which information should enter the model's limited active context. +The [Agent Memory](/knowledge/agent-memory) subject map places persistence inside a larger lifecycle of storage, routing, compaction, provenance, observability, and restoration. + ## Memory layers Active context contains the information directly available to the model during an inference. Searchable memory stores material that can be retrieved when relevant. Archival history preserves a fuller record for provenance, recovery, or later analysis without implying that every event should shape the current response. -[MemGPT](/knowledge/memgpt) formalized this as a memory hierarchy managed partly by the agent. Current systems such as [Letta Code](/knowledge/letta-code) also use versioned files and context repositories so memory can be inspected and changed through ordinary computer tools. +[MemGPT](/knowledge/memgpt) formalized this as a memory hierarchy managed partly by the agent. Current systems such as [Letta Code](/knowledge/letta-code) also use versioned files and [context repositories](/knowledge/context-repositories) so memory can be inspected and changed through ordinary computer tools. ## Retrieval and routing Storage answers whether information still exists. Routing answers whether the agent loads the right information at the right time. Many apparent memory failures are routing failures: the relevant fact is present but no retrieval trigger activates it. -Similarity search is one routing method, but the nearest text is not always the most useful context. Names, projects, relationships, dates, and recurring concepts often need explicit routes to canonical sources. A strong memory system combines semantic search with ownership maps, indexes, and task-specific retrieval rules. +Similarity search is one routing method, but the nearest text is not always the most useful context. Names, projects, relationships, dates, and recurring concepts often need explicit routes to canonical sources. [Routing-based agent memory](/knowledge/routing-based-agent-memory) combines store selection, semantic search, ownership maps, indexes, and task-specific retrieval rules. + +## Compaction and external memory + +[Context compaction](/knowledge/context-compaction) reduces older interaction history to a smaller working representation. This keeps the current prompt bounded but can discard provenance, uncertainty, and open obligations. Durable external memory and raw history remain necessary when later work needs exact evidence rather than the summary's interpretation. ## Revision and provenance diff --git a/knowledge/published/routing-based-agent-memory.md b/knowledge/published/routing-based-agent-memory.md new file mode 100644 index 0000000..c8d1027 --- /dev/null +++ b/knowledge/published/routing-based-agent-memory.md @@ -0,0 +1,116 @@ +--- +title: Routing-Based Agent Memory +slug: routing-based-agent-memory +summary: Selecting memory stores and canonical sources by query, authority, and cost instead of searching every past item uniformly. +kind: practice +status: evolving +claimMode: perspective +perspectiveOwner: Co +confidence: medium +topics: [ai, agents, memory, retrieval, context-engineering] +related: + - agent-memory + - persistent-agent-memory + - context-repositories + - context-compaction + - strong-context-references +sources: + - title: What does good AI memory feel like? + url: https://cameron.stream/co-3 + - title: 'MemGPT: Towards LLMs as Operating Systems' + url: https://arxiv.org/abs/2310.08560 + - title: Did You Check the Right Pocket? Cost-Sensitive Store Routing for Memory-Augmented Agents + url: https://arxiv.org/abs/2603.15658 +aiAssisted: true +generatedBy: Co +updated: '2026-07-20T23:15:00.000Z' +reviewStatus: approved +reviewedBy: Cameron Pfiffer +reviewedAt: '2026-07-20T23:58:00.000Z' +publishedAt: '2026-07-20T23:58:00.000Z' +reviewedContentDigest: 'sha256:026a39110c961e6e8d739454956a0bff6aca7cc4e04271632a9eb030a33ebfb0' +reviewReceiptDigest: 'sha256:78e9349e69be919210e4dc97481e82eaac616a17b0f644e621891ae9055a2e63' +--- +Routing-based agent memory is an architecture for selecting which memory sources to consult before selecting individual items inside them. It treats retrieval as a decision problem over stores, authorities, and semantic roles rather than as one similarity search over the entire past. + +The central failure is activation rather than storage: an important fact can exist in durable memory and still fail to shape the turn that needs it. [Persistent agent memory](/knowledge/persistent-agent-memory) therefore requires a routing layer between the repository and the model's active context. + +## Store routing and item retrieval + +Two decisions are often conflated: + +1. **Store routing** selects eligible sources such as current project state, user profile, conversation history, episodic memory, skills, or public documentation. +2. **Item retrieval** ranks records within the selected source using lexical, semantic, temporal, graph, or structured queries. + +The distinction matters because different stores have different authority, privacy, freshness, and cost. A nearest-neighbor result from an old timeline should not silently outrank a canonical current-state file merely because its wording resembles the question. + +Recent research systems also frame long-term memory as a routing problem. The 2026 “Right Pocket” preprint separates source selection from within-store ranking and studies the tradeoff between answer coverage and retrieval cost. It is useful evidence for selective routing, but it does not establish one universal store taxonomy or prove the canonical-ownership method described here. + +## A retrieval router + +A retrieval router is a decision table rather than a directory listing. A practical route records: + +- the domain or task class; +- positive triggers; +- negative triggers that prevent tangential loading; +- sources to consult in order; +- the canonical owner when sources disagree; +- a retrieval budget or escalation rule; +- privacy and consequence constraints. + +```text +current project status + -> live repository state + -> project current-state note + -> older timeline only if history is needed + +named person or relationship + -> current person record + -> relevant event history + -> do not infer from unrelated high-salience memories +``` + +The route changes the first action. If it merely lists files without affecting selection order, it is a sitemap wearing an important hat. + +## Canonical ownership + +Canonical ownership assigns responsibility for a type of state to one source. Other notes can link to or summarize that source without becoming peers that silently compete with it. + +For example: + +```text +current state -> current-state record +historical events -> timeline +durable profile -> profile record +procedure -> skill or runbook +``` + +When sources disagree, the system retrieves the owner, evaluates whether the newer evidence changes it, and repairs stale copies or pointers. Canonical ownership does not mean one file contains all knowledge. It means one source is accountable for staying current within a declared scope. + +## Forced lookup and budgets + +Routing works only if the agent consults it before drafting from recognition. A minimal gate asks: + +1. What domain is this request in? +2. Which source owns that domain? +3. Did the agent inspect that source or live system? +4. If not, is the resulting uncertainty explicit? + +Lookup should scale with stakes. A trivial acknowledgment needs no archive expedition. A claim about a current deployment, named person, file, or previous decision should contact the source of truth. Retrieval ceremony that makes every exchange slow is another routing bug. + +## Repairing retrieval failures + +When a stored fact fails to activate, the repair question is not only “how can the instruction be made louder?” It is: + +- Was the domain classified incorrectly? +- Did the router omit the canonical source? +- Was the file description too vague to retrieve? +- Did several files claim ownership? +- Did compaction remove the open obligation or retrieval cue? +- Did the source move without updating its reference? + +The durable fix changes routing, ownership, metadata, or representation. A repeated scolding sentence in a system prompt can increase noise without repairing any of them. + +## Relationship to other memory methods + +Routing complements semantic search, graph traversal, recency, and model-generated query plans. It decides where those techniques may operate and which evidence should win when their outputs conflict. [Context repositories](/knowledge/context-repositories) provide the state; routing governs access to it; [context compaction](/knowledge/context-compaction) determines which selected state remains immediately active. diff --git a/knowledge/published/strong-context-references.md b/knowledge/published/strong-context-references.md new file mode 100644 index 0000000..16f16ed --- /dev/null +++ b/knowledge/published/strong-context-references.md @@ -0,0 +1,107 @@ +--- +title: Strong Context References +slug: strong-context-references +summary: References that bind a mutable context location to the exact version, authority, and permission state an agent observed. +kind: practice +status: evolving +claimMode: perspective +perspectiveOwner: Co +confidence: medium +topics: [ai, agents, memory, provenance, content-addressing] +related: + - agent-memory + - context-repositories + - agent-identity-and-continuity + - agent-trajectory-observability + - atproto +sources: + - title: AT Protocol repository specification + url: https://atproto.com/specs/repository + - title: W3C PROV Data Model + url: https://www.w3.org/TR/prov-dm/ + - title: Git Objects + url: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects +aiAssisted: true +generatedBy: Co +updated: '2026-07-20T23:15:00.000Z' +reviewStatus: approved +reviewedBy: Cameron Pfiffer +reviewedAt: '2026-07-20T23:58:00.000Z' +publishedAt: '2026-07-20T23:58:00.000Z' +reviewedContentDigest: 'sha256:d90723f9f8fa0a342fc1893182c292097fcea551bb62a871355797e5140e05ce' +reviewReceiptDigest: 'sha256:78e9349e69be919210e4dc97481e82eaac616a17b0f644e621891ae9055a2e63' +--- +A strong context reference identifies both where an agent found a context object and which exact version it observed. A file path, URL, record URI, or channel identifier supplies location. A commit, content hash, CID, message identifier, ETag, or timestamped snapshot supplies version identity. + +This page applies content-addressing and provenance ideas to [agent memory](/knowledge/agent-memory). “Strong context reference” is a design term used in this knowledge base, not a W3C, Git, or AT Protocol standard term. + +## Location and content identity + +A weak reference names a mutable place: + +```text +the user profile +the current project note +that public post +the latest conversation summary +``` + +A stronger reference records several dimensions: + +```yaml +location: memory/system/profile.md +version: git-commit:c20669d +content_digest: sha256:... +authority: agent-context-repository +observed_at: 2026-07-20T23:15:00Z +semantic_role: canonical_profile +permission_boundary: private +``` + +The location allows later retrieval. The version answers whether the retrieved object is still the evidence that the earlier action used. + +## AT Protocol analogy + +[AT Protocol](/knowledge/atproto) repositories separate stable record paths from content-addressed objects. A repository commit points to a content-addressed Merkle tree and is signed by the account. Mutating a record changes the repository root. Complete repositories can be exported for verification, backup, and migration. + +The useful analogy for agent memory is not that a Markdown file should become an ATProto record. It is that mutable address and observed content identity are different fields. A path can stay stable while its contents change. + +## Git analogy + +Git stores content-addressed blobs, trees, and commits. A branch name is a movable reference; a commit identifies a particular history and tree. An agent that records only “main” cannot later prove which version it read. An agent that records only an object hash loses the human and operational role associated with the path or branch. + +A practical reference therefore preserves both. + +## Authority and permission + +Version identity does not establish authority or publication permission. Two identical strings can come from different sources with different operational meaning. A fact learned in private conversation and the same fact read from a public page may support the same proposition while carrying different rights for reuse. + +For consequential uses, a reference should record: + +1. location; +2. exact version or content identity; +3. source authority; +4. observation time; +5. semantic role; +6. permission boundary. + +The [W3C PROV data model](https://www.w3.org/TR/prov-dm/) provides broader vocabulary for entities, activities, agents, derivations, revisions, and responsibility. Strong context references can act as the identifiers carried through such a provenance graph. + +## Uses + +Strong references help an agent: + +- cite the memory version used in a decision; +- detect stale context after a file changes; +- bind a review to the exact artifact reviewed; +- distinguish a draft from a published revision; +- restore an [agent identity](/knowledge/agent-identity-and-continuity) from a known state; +- reproduce a tool or model run with the same input evidence; +- prevent one conversation from acting on another conversation's obsolete authorization; +- trace a public claim back to an approved public source. + +They do not make the referenced content true. They make the claim's dependency inspectable. + +## Design limit + +Hashing everything can create ceremony without meaning. Strong references are most valuable for objects that may be cited, revised, audited, published, restored, or used as authority for an external effect. Temporary low-consequence context can remain weakly referenced when the cost of exact provenance exceeds its value.