Skip to main content
Glama
Agent Knowledge Ledger

Agent Knowledge Ledger

by supermikol

Agent Knowledge Ledger

Verification · MIT licensed

A knowledge base for AI agents that need to answer “What did we decide, and what evidence still applies?” An agent can search team records, open the exact version behind a claim, and leave a cited handoff that another session can verify.

I built a shared knowledge system so people could pick up work across agent sessions without reconstructing the decision from chat history. This public edition reimplements its retrieval and handoff design with SQLite, five Model Context Protocol (MCP) tools, and an entirely fictional radio observatory. The local demo runs offline with Python. An MCP client can connect its own model.

Read a real agent's shift handoff · Explore the architecture · Connect your agent

Try it in one minute

Use Python 3.11+ with SQLite FTS5. The core uses the Python standard library.

git clone https://github.com/supermikol/agent-knowledge-ledger.git
cd agent-knowledge-ledger
python3 -m knowledge_ledger demo

The walkthrough opens three records that a new shift could easily confuse.

What the shift needs to know

What the evidence says

Clear skies

The adopted decision moved calibration from 30 to 45 minutes.

Visible frost on the feed enclosure

An adopted exception shortens the interval to 15 minutes.

A more recent proposal

60 minutes is a proposed trial. Its record carries draft status.

The demo saves a handoff with all three revision digests, reopens the database, and prints the citations. It uses a temporary database. To investigate the evidence yourself, keep a local copy and ask for the revision history.

python3 -m knowledge_ledger seed --db field.sqlite
python3 -m knowledge_ledger search --db field.sqlite --query "calibration cadence"
python3 -m knowledge_ledger history --db field.sqlite --id cadence-rule

Related MCP server: Firmament MCP server

Where the engineering lives

Design question

Implementation

Can the model look beyond the first hit?

Independent text search and tag discovery return leads. Exact reads expose the full text, provenance, status and revision.

Can a hidden document displace a visible result?

Each audience has its own full-text index. Ranking and page bounds operate over visible records.

What happens if the source changes while the agent is writing?

One transaction compares every cited digest with its current source before committing the handoff. A stale write fails so the agent can read the change.

What survives a retry or withdrawal?

An identical request returns its original receipt. A conflicting retry fails. Withdrawing evidence also hides handoffs that depend on it, including after a source import is replayed.

The public edition uses a trusted local process. The operator selects the audience when launching MCP. Anyone with filesystem access to the database can inspect it. The architecture walkthrough shows where identity and storage controls belong in a shared deployment.

Evaluate it or fork it

python3 evals/run.py

Seven end-to-end scenarios exercise the CLI across fresh processes. A separate SDK evaluation opens real MCP connections, saves a handoff and reads it after restart. The repository includes the question, tool trace and four citations from one actual model run. See the evaluation and replay guide.

To use your own records, start with the fork guide. It walks through importing a source, correcting it without breaking old citations, and withdrawing it. To give an agent the same reading and capture workflow, use the portable skill.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to create verifiable, replayable citations, search private knowledge bases, and publish Markdown with verified citation markers.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI coding agents to query a unified local index of all their sessions through native tools, supporting session summaries, full-text search, listing, message timelines, and handoff context packages for another agent.
      8
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to persist and retrieve lossless, verifiable event logs of tool calls, diffs, tests, and plans, then resume projects through working-set restore and hybrid search.
      -