Skip to content

Resources

  • Local source: topics/agent-thread-storage/.repos/opencode Primary source for a local SQLite, event-sourced session model with durable session events, projected session messages, lineage, and compaction support.
  • Local source: topics/agent-thread-storage/.repos/pi Primary source for a session tree model with branch-aware entries, active leaf pointers, compaction entries, and both JSONL and SQLite backends.
  • Local source: topics/agent-thread-storage/.repos/codex Primary source for a hosted thread/turn API shape, fork semantics, and how sub-agent activity appears at the thread item level.
  • OpenAI Codex repository Useful for the public thread and turn API models, including forking and sub-agent related thread items.
  • SST OpenCode repository Useful for a concrete local-first agent session implementation built on SQLite and durable events.
  • earendil-works/pi repository Useful for a concrete branchable session tree design with both append-only entries and materialized views.
  • Vercel AI SDK docs Use for mapping the derived storage model into AI SDK concepts like messages, streamed parts, tool calls, and resumable UI state.
  • Vercel community discussions Useful for practical constraints around persistence, streaming, and serverless deployment tradeoffs.
  • Codex exposes thread and sub-agent concepts clearly in the SDK models, but this repo does not expose a local SQL schema for how the hosted backend stores them internally.
  • The pi repo name was ambiguous at discovery time; this workspace currently uses earendil-works/pi because it matched the agent-session storage goal best.