Packages

A layered agent framework for Elixir: structured output, tool-calling, streaming, stateful supervised agents, multi-agent sessions, durable persistence, compaction/cost/permissions and MCP — powered by the BEAM.

Current section

Files

Jump to
exagent docs guides continuation-schema.sql
Raw

docs/guides/continuation-schema.sql

-- Historical Store SQL 1 layout. Install or enroll this table with a pinned
-- ExAgent.Migration in the host. Unified version 1 includes snapshot and run
-- headers, segments and both recovery indexes. Backfill existing run headers
-- with Store.Postgres.rebuild_run_headers(repo_config) if enrollment requires it.
-- To write segments, set segments: true in the Store descriptor.
-- Configure a bare SQL identifier via {Repo, table: "exagent_snapshots"}; manage
-- schema/search_path and connection permissions in the application's Repo.
CREATE TABLE IF NOT EXISTS "exagent_snapshots" (
  key text PRIMARY KEY,
  data text NOT NULL,
  updated_at timestamptz NOT NULL DEFAULT now()
);

-- With this schema data holds a snapshot or a C7 JSON record.
-- Atomic command revision, record lifetime ID, execution fence and operation
-- receipts live inside the envelope and change under SELECT ... FOR UPDATE.
-- The application must stop old writers before an explicit format migration.
-- The application owns SQL permissions, backups, restoration and deployment
-- validation. See docs/guides/durability-and-approvals.md for Store semantics;
-- installing the table alone does not validate database recovery behavior.