# Agent Ledger

> Shared project memory for AI coding agents. A ledger of what your project decided, learned the hard way and forbade, plus a task queue, that Claude Code, Cursor, Codex and any MCP client read before they act and add to as they work. Agents stop repeating reverted changes, and a new session starts where the last one stopped.

Base URL: https://api-agent-ledger.plxi.us. Authenticate with an `X-API-Key` header (create a key at https://agent-ledger.plxi.us/dashboard/keys).
Every operation is a POST with a JSON body and returns JSON. Failed calls are never charged.
Every operation is also an MCP tool at https://api-agent-ledger.plxi.us/mcp (same key, same price).

## Docs

- [API reference](https://agent-ledger.plxi.us/docs): authentication, operations, limits, errors and webhooks
- [OpenAPI description](https://agent-ledger.plxi.us/openapi.json): machine-readable spec of every operation
- [Pricing](https://agent-ledger.plxi.us/pricing): Free $0/mo for 300 entries; Pro $9/mo for 3,000 entries; Team $49/mo for 20,000 entries

## Operations

### POST https://api-agent-ledger.plxi.us/v1/record

Add a decision, lesson, guardrail, note or task to a project's ledger. Costs 1 credit.

Request:

```json
{
  "project": "acme/shop",
  "kind": "lesson",
  "title": "Captcha on checkout cut completed orders 5%",
  "body": "Shipped a captcha on the checkout page in March and reverted it after two weeks: completed orders fell 5%. Bots only spike on release days.",
  "tags": [
    "checkout",
    "captcha"
  ]
}
```

Response:

```json
{
  "id": "KNOW-1",
  "kind": "lesson",
  "title": "Captcha on checkout cut completed orders 5%",
  "body": "Shipped a captcha on the checkout page in March and reverted it after two weeks: completed orders fell 5%. Bots only spike on release days.",
  "tags": [
    "checkout",
    "captcha"
  ],
  "status": "active",
  "superseded_by": null,
  "reason": null,
  "claimed_by": null,
  "created_at": "2026-10-20T06:00:00.000000+00:00",
  "credits": 1
}
```

### POST https://api-agent-ledger.plxi.us/v1/recall

Search a project's ledger for decisions, lessons, guardrails and tasks (free). Costs 0 credits.

Request:

```json
{
  "project": "acme/shop",
  "query": "add a captcha to checkout"
}
```

Response:

```json
{
  "project": "acme/shop",
  "entries": [
    {
      "id": "KNOW-1",
      "kind": "lesson",
      "title": "Captcha on checkout cut completed orders 5%",
      "body": "Shipped a captcha on the checkout page in March and reverted it after two weeks: completed orders fell 5%. Bots only spike on release days.",
      "tags": [
        "checkout",
        "captcha"
      ],
      "status": "active",
      "superseded_by": null,
      "reason": null,
      "claimed_by": null,
      "created_at": "2026-10-20T06:00:00.000000+00:00"
    }
  ],
  "credits": 0
}
```

### POST https://api-agent-ledger.plxi.us/v1/claim

Claim a project's task so no other agent starts it (free). Costs 0 credits.

Request:

```json
{
  "project": "acme/shop",
  "agent": "claude-code"
}
```

Response:

```json
{
  "task": null,
  "credits": 0
}
```

### POST https://api-agent-ledger.plxi.us/v1/retire

Retire an entry that no longer holds, or mark a task done (free). Costs 0 credits.

Request:

```json
{
  "project": "acme/shop",
  "id": "KNOW-1",
  "reason": "Bots are now stopped at the CDN."
}
```

Response:

```json
{
  "id": "KNOW-1",
  "kind": "lesson",
  "title": "Captcha on checkout cut completed orders 5%",
  "body": "Shipped a captcha on the checkout page in March and reverted it after two weeks: completed orders fell 5%. Bots only spike on release days.",
  "tags": [
    "checkout",
    "captcha"
  ],
  "status": "retired",
  "superseded_by": null,
  "reason": "Bots are now stopped at the CDN.",
  "claimed_by": null,
  "created_at": "2026-10-20T06:00:00.000000+00:00",
  "credits": 0
}
```

## Comparisons

- [A Mem0 alternative for coding agents' project memory](https://agent-ledger.plxi.us/compare/mem0-alternative): Mem0 remembers users for any AI app. Agent Ledger is project memory for coding agents. How they compare on search, pricing and team use.

## FAQ

- **Which agents does it work with?** Any MCP client, including Claude Code, Cursor and Codex, through the MCP endpoint at /mcp. Anything else can call the REST API with an API key.
- **What counts against my quota?** Only recording a new entry. Recall, claiming a task and retiring an entry are free and unmetered, and a failed request is never charged.
- **Who can see my ledger?** Only your account and its team. Entries are kept until you delete them or your account, and are never used to train models.
- **What happens when a decision changes?** Record the new one with supersedes set to the old entry's id. The old one is retired: hidden from recall but kept, with a pointer to its replacement.

## Optional

- [Terms](https://agent-ledger.plxi.us/terms)
- [Privacy](https://agent-ledger.plxi.us/privacy)
- [Support](https://agent-ledger.plxi.us/contact)
