AgentDBDocs

Knowledge

Knowledge items with citations, proposals, reviews and versions.

Start with: knowledge_search, knowledge_create, knowledge_propose, knowledge_review.

10 operations. Discover them from an agent with agentdb_capabilities {"category": "knowledge"}.

#knowledge_create

stable added in 1.0.0-rc.6 changes data

Store a fact, decision, document or note with sources. Sources: file (fil_…, excerpt, locator e.g. 'page 3'), record (rec_…), item (another knowledge item), url or quoted text. confidence 0..1; review_after marks it stale later. New items are drafts; owners/admins (not agents) may create trusted ones.

MCP tool
knowledge_create
REST
POST /v1/workspaces/{ws}/knowledge scope records:write
CLI
agentdb knowledge create

Arguments

ArgumentTypeRequiredDescription
kind"document" | "fact" | "decision" | "note"string, one of: document, fact, decision, note, default "fact"
titlestringyesTitle of the knowledge article. (min length 1, max length 300)
bodystringstring, up to 200000 characters, default ""
sourcesobject[]object[], up to 20 items, default []
confidencenumbernumber, 0–1
tagsstring[]string[], up to 20 items, default []
review_afterstringstring
trustedbooleanboolean, default false
idempotency_keystringOptional retry key ([A-Za-z0-9._:-], max 255). Repeating a call with the same key and arguments returns the original result without writing again.
workspacestringWorkspace id (preferred), slug or exact name. Omit for the default workspace. Resolve names once with workspace_select.

Example

MCP
{
  "tool": "knowledge_create",
  "arguments": {
    "kind": "fact",
    "title": "Example Ltd pays in 30 days",
    "body": "Payment terms are net 30.",
    "sources": [
      {
        "type": "record",
        "record_id": "rec_example",
        "excerpt": "payment_terms: net 30"
      }
    ],
    "tags": [
      "billing"
    ]
  }
}
MCP via agentdb_execute
{
  "tool": "agentdb_execute",
  "arguments": {
    "operation": "knowledge_create",
    "arguments": {
      "kind": "fact",
      "title": "Example Ltd pays in 30 days",
      "body": "Payment terms are net 30.",
      "sources": [
        {
          "type": "record",
          "record_id": "rec_example",
          "excerpt": "payment_terms: net 30"
        }
      ],
      "tags": [
        "billing"
      ]
    }
  }
}
REST
curl -s -X POST "https://app.agentdb.link/v1/workspaces/$AGENTDB_WORKSPACE/knowledge" \
  -H "Authorization: Bearer $AGENTDB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"kind":"fact","title":"Example Ltd pays in 30 days","body":"Payment terms are net 30.","sources":[{"type":"record","record_id":"rec_example","excerpt":"payment_terms: net 30"}],"tags":["billing"]}'
CLI
agentdb knowledge create [options]

#knowledge_delete

stable added in 1.0.0-rc.6 changes data destructive

Archive a knowledge item. Hidden from search, restorable; purge=true with confirm=true removes it for good (owners/admins; refused while other items cite it).

MCP tool
knowledge_delete
REST
DELETE /v1/workspaces/{ws}/knowledge/{item} scope records:write
CLI
agentdb knowledge delete

Arguments

ArgumentTypeRequiredDescription
purgebooleanboolean, default false
confirmbooleanboolean, default false
item_idstringyesKnowledge item id (kno_...)
idempotency_keystringOptional retry key ([A-Za-z0-9._:-], max 255). Repeating a call with the same key and arguments returns the original result without writing again.
workspacestringWorkspace id (preferred), slug or exact name. Omit for the default workspace. Resolve names once with workspace_select.

Example

MCP
{
  "tool": "knowledge_delete",
  "arguments": {
    "item_id": "kno_example"
  }
}
MCP via agentdb_execute
{
  "tool": "agentdb_execute",
  "arguments": {
    "operation": "knowledge_delete",
    "arguments": {
      "item_id": "kno_example"
    }
  }
}
REST
curl -s -X DELETE "https://app.agentdb.link/v1/workspaces/$AGENTDB_WORKSPACE/knowledge/kno_example" \
  -H "Authorization: Bearer $AGENTDB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
CLI
agentdb knowledge delete [options] <item_id>

#knowledge_get

stable added in 1.0.0-rc.6 read-only

One knowledge item. Current version, sources (still there? extraction status) and pending proposals.

MCP tool
knowledge_get
REST
GET /v1/workspaces/{ws}/knowledge/{item} scope records:read
CLI
agentdb knowledge get

Arguments

ArgumentTypeRequiredDescription
item_idstringyesKnowledge item id (kno_...)
workspacestringWorkspace id (preferred), slug or exact name. Omit for the default workspace. Resolve names once with workspace_select.

Example

MCP
{
  "tool": "knowledge_get",
  "arguments": {
    "item_id": "kno_example"
  }
}
MCP via agentdb_execute
{
  "tool": "agentdb_execute",
  "arguments": {
    "operation": "knowledge_get",
    "arguments": {
      "item_id": "kno_example"
    }
  }
}
REST
curl -s "https://app.agentdb.link/v1/workspaces/$AGENTDB_WORKSPACE/knowledge/kno_example" \
  -H "Authorization: Bearer $AGENTDB_TOKEN"
CLI
agentdb knowledge get [options] <item_id>

#knowledge_list

stable added in 1.0.0-rc.6 read-only

List knowledge items. Filter by kind, status, tag, cited source (cites: file:<id>, record:<id>, item:<id>, url:<url>) or pending_review.

MCP tool
knowledge_list
REST
GET /v1/workspaces/{ws}/knowledge scope records:read
CLI
agentdb knowledge list

Arguments

ArgumentTypeRequiredDescription
kind"document" | "fact" | "decision" | "note"string, one of: document, fact, decision, note
status"draft" | "trusted" | "archived"string, one of: draft, trusted, archived
tagstringstring, up to 50 characters
citesstringstring, up to 2100 characters
pending_reviewbooleanboolean
limitintegerinteger, 1–200, default 50
cursorstringstring, up to 64 characters
workspacestringWorkspace id (preferred), slug or exact name. Omit for the default workspace. Resolve names once with workspace_select.

Example

MCP
{
  "tool": "knowledge_list",
  "arguments": {
    "kind": "fact",
    "tag": "billing",
    "limit": 20
  }
}
MCP via agentdb_execute
{
  "tool": "agentdb_execute",
  "arguments": {
    "operation": "knowledge_list",
    "arguments": {
      "kind": "fact",
      "tag": "billing",
      "limit": 20
    }
  }
}
REST
curl -s "https://app.agentdb.link/v1/workspaces/$AGENTDB_WORKSPACE/knowledge" \
  -H "Authorization: Bearer $AGENTDB_TOKEN"
CLI
agentdb knowledge list [options]

#knowledge_propose

stable added in 1.0.0-rc.6 changes data

Propose a change or contradiction. change=contradiction, with a reason and sources. Nothing changes until an owner/admin accepts it with knowledge_review.

MCP tool
knowledge_propose
REST
POST /v1/workspaces/{ws}/knowledge/{item}/proposals scope records:write
CLI
agentdb knowledge propose

Arguments

ArgumentTypeRequiredDescription
change"update" | "contradiction"string, one of: update, contradiction, default "update"
titlestringTitle shown to people. (min length 1, max length 300)
bodystringstring, up to 200000 characters
sourcesobject[]object[], up to 20 items
confidencenumbernumber, 0–1
reasonstringyesWhy, in one or two sentences. (min length 1, max length 2000)
item_idstringyesKnowledge item id (kno_...)
idempotency_keystringOptional retry key ([A-Za-z0-9._:-], max 255). Repeating a call with the same key and arguments returns the original result without writing again.
workspacestringWorkspace id (preferred), slug or exact name. Omit for the default workspace. Resolve names once with workspace_select.

Example

MCP
{
  "tool": "knowledge_propose",
  "arguments": {
    "item_id": "kno_example",
    "change": "update",
    "body": "Payment terms are net 45 since 2026.",
    "reason": "New contract signed."
  }
}
MCP via agentdb_execute
{
  "tool": "agentdb_execute",
  "arguments": {
    "operation": "knowledge_propose",
    "arguments": {
      "item_id": "kno_example",
      "change": "update",
      "body": "Payment terms are net 45 since 2026.",
      "reason": "New contract signed."
    }
  }
}
REST
curl -s -X POST "https://app.agentdb.link/v1/workspaces/$AGENTDB_WORKSPACE/knowledge/kno_example/proposals" \
  -H "Authorization: Bearer $AGENTDB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"change":"update","body":"Payment terms are net 45 since 2026.","reason":"New contract signed."}'
CLI
agentdb knowledge propose [options] <item_id>

#knowledge_provenance

stable added in 1.0.0-rc.6 read-only

Provenance chain of a knowledge item. Which files, records, URLs, quotes and other items support it, recursively through cited items (depth, cycle-safe), with confidence and who asserted it when.

MCP tool
knowledge_provenance
REST
GET /v1/workspaces/{ws}/knowledge/{item}/provenance scope records:read
CLI
agentdb knowledge provenance

Arguments

ArgumentTypeRequiredDescription
depthintegerinteger, 1–5, default 3
item_idstringyesKnowledge item id (kno_...)
workspacestringWorkspace id (preferred), slug or exact name. Omit for the default workspace. Resolve names once with workspace_select.

Example

MCP
{
  "tool": "knowledge_provenance",
  "arguments": {
    "item_id": "kno_example",
    "depth": 2
  }
}
MCP via agentdb_execute
{
  "tool": "agentdb_execute",
  "arguments": {
    "operation": "knowledge_provenance",
    "arguments": {
      "item_id": "kno_example",
      "depth": 2
    }
  }
}
REST
curl -s "https://app.agentdb.link/v1/workspaces/$AGENTDB_WORKSPACE/knowledge/kno_example/provenance" \
  -H "Authorization: Bearer $AGENTDB_TOKEN"
CLI
agentdb knowledge provenance [options] <item_id>

#knowledge_review

stable added in 1.0.0-rc.6 changes data

Accept or reject a proposal (owners/admins). Nobody reviews their own proposal. Accepting makes it the current version.

MCP tool
knowledge_review
REST
POST /v1/workspaces/{ws}/knowledge/{item}/review scope records:write
CLI
agentdb knowledge review

Arguments

ArgumentTypeRequiredDescription
versionintegeryesThe current version of the item. The call fails with VERSION_CONFLICT if it changed. (min 1)
decision"accept" | "reject"yesaccept publishes the proposal; reject closes it.
notestringstring, up to 2000 characters
forcebooleanboolean, default false
item_idstringyesKnowledge item id (kno_...)
idempotency_keystringOptional retry key ([A-Za-z0-9._:-], max 255). Repeating a call with the same key and arguments returns the original result without writing again.
workspacestringWorkspace id (preferred), slug or exact name. Omit for the default workspace. Resolve names once with workspace_select.

Example

version is the proposed version, from knowledge_get (pending proposals).

MCP
{
  "tool": "knowledge_review",
  "arguments": {
    "item_id": "kno_example",
    "version": 2,
    "decision": "accept",
    "note": "Matches the contract."
  }
}
MCP via agentdb_execute
{
  "tool": "agentdb_execute",
  "arguments": {
    "operation": "knowledge_review",
    "arguments": {
      "item_id": "kno_example",
      "version": 2,
      "decision": "accept",
      "note": "Matches the contract."
    }
  }
}
REST
curl -s -X POST "https://app.agentdb.link/v1/workspaces/$AGENTDB_WORKSPACE/knowledge/kno_example/review" \
  -H "Authorization: Bearer $AGENTDB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"version":2,"decision":"accept","note":"Matches the contract."}'
CLI
agentdb knowledge review [options] <item_id> <version> <decision>

#knowledge_update

stable added in 1.0.0-rc.6 changes data

Change a knowledge item (new version). On a TRUSTED item your change becomes a proposal unless you are an owner/admin (agents always propose); the result says proposed=true. status (draft|trusted|archived) is for owners/admins.

MCP tool
knowledge_update
REST
PATCH /v1/workspaces/{ws}/knowledge/{item} scope records:write
CLI
agentdb knowledge update

Arguments

ArgumentTypeRequiredDescription
expected_versionintegerinteger, at least 1
titlestringTitle shown to people. (min length 1, max length 300)
bodystringstring, up to 200000 characters
sourcesobject[]object[], up to 20 items
confidencenumber | nullnumber | null
tagsstring[]string[], up to 20 items
review_afterstring | nullstring | null
status"draft" | "trusted" | "archived"string, one of: draft, trusted, archived
reasonstringWhy, in one or two sentences. (max length 2000)
item_idstringyesKnowledge item id (kno_...)
idempotency_keystringOptional retry key ([A-Za-z0-9._:-], max 255). Repeating a call with the same key and arguments returns the original result without writing again.
workspacestringWorkspace id (preferred), slug or exact name. Omit for the default workspace. Resolve names once with workspace_select.

Example

MCP
{
  "tool": "knowledge_update",
  "arguments": {
    "item_id": "kno_example",
    "expected_version": 1,
    "tags": [
      "billing",
      "terms"
    ]
  }
}
MCP via agentdb_execute
{
  "tool": "agentdb_execute",
  "arguments": {
    "operation": "knowledge_update",
    "arguments": {
      "item_id": "kno_example",
      "expected_version": 1,
      "tags": [
        "billing",
        "terms"
      ]
    }
  }
}
REST
curl -s -X PATCH "https://app.agentdb.link/v1/workspaces/$AGENTDB_WORKSPACE/knowledge/kno_example" \
  -H "Authorization: Bearer $AGENTDB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"expected_version":1,"tags":["billing","terms"]}'
CLI
agentdb knowledge update [options] <item_id>

#knowledge_versions

stable added in 1.0.0-rc.6 read-only

Version history of a knowledge item. Accepted, superseded, proposed and rejected, with who asserted and reviewed.

MCP tool
knowledge_versions
REST
GET /v1/workspaces/{ws}/knowledge/{item}/versions scope records:read
CLI
agentdb knowledge versions

Arguments

ArgumentTypeRequiredDescription
item_idstringyesKnowledge item id (kno_...)
workspacestringWorkspace id (preferred), slug or exact name. Omit for the default workspace. Resolve names once with workspace_select.

Example

MCP
{
  "tool": "knowledge_versions",
  "arguments": {
    "item_id": "kno_example"
  }
}
MCP via agentdb_execute
{
  "tool": "agentdb_execute",
  "arguments": {
    "operation": "knowledge_versions",
    "arguments": {
      "item_id": "kno_example"
    }
  }
}
REST
curl -s "https://app.agentdb.link/v1/workspaces/$AGENTDB_WORKSPACE/knowledge/kno_example/versions" \
  -H "Authorization: Bearer $AGENTDB_TOKEN"
CLI
agentdb knowledge versions [options] <item_id>