| name | agent-knowledge |
| description | Browse, read, and author per-project knowledgebase documents through the knowledge service CLI. Use for creating, updating, listing, and reading markdown documents stored against a project, and reconciling DB rows against disk. |
Agent Knowledge
Skill for interacting with the agentd knowledge service — a per-project store of
markdown documents, persisted as files on disk with SQLite metadata. Humans manage these
documents through the web UI; this skill lets agents do the same from the CLI.
All commands run through the core gateway (AGENTD_CORE_SERVICE_URL, default
http://localhost:17000) with bearer-token auth, so authenticate first:
agent auth login
Every command is scoped to a project UUID. Discover available projects with:
agent project list
Agents working inside a project run should already know their project ID (it is part of
the agent's context). When in doubt, list projects and match on name.
Listing Documents
agent knowledge list <project_id>
agent knowledge list <project_id> --prefix docs/
agent knowledge list <project_id> --limit 20 --offset 40
agent knowledge list <project_id> --json
Reading Documents
agent knowledge get <project_id> <doc_id>
agent knowledge content <project_id> <doc_id>
agent knowledge tree <project_id>
Creating Documents
rel_path must end in .md, use forward slashes for folders, and contain no .. or
absolute path segments. Title defaults to the filename stem when omitted.
agent knowledge create <project_id> readme.md --content "# Hello"
agent knowledge create <project_id> docs/api.md \
--from-file ./api.md \
--title "API Reference"
--content and --from-file are mutually exclusive.
Updating Documents
agent knowledge update <project_id> <doc_id> --content "# Updated"
agent knowledge update <project_id> <doc_id> --from-file ./updated.md
agent knowledge update <project_id> <doc_id> --title "New Title"
Safe concurrent edits
To avoid clobbering a change made since you last read the document, pass the
updated_at timestamp from a prior get/content call. The update is rejected if the
document changed in the meantime — re-read and retry.
agent knowledge get <project_id> <doc_id> --json
agent knowledge update <project_id> <doc_id> \
--from-file ./updated.md \
--expected-updated-at 2026-06-17T12:34:56Z
Deleting Documents
agent knowledge delete <project_id> <doc_id>
agent knowledge gc <project_id> --yes
Reconciliation (doctor)
Detects and optionally repairs divergence between DB rows and files on disk —
missing files (DB rows whose file is gone) and orphaned files (files with no row).
agent knowledge doctor <project_id>
agent knowledge doctor <project_id> --fix
Health Check
agent knowledge health
MCP equivalents
When running as an agent with the agentd MCP server connected, the same operations are
available as tools (no CLI needed): knowledge_list_documents, knowledge_read_document,
knowledge_create_document, knowledge_update_document, knowledge_delete_document, and
knowledge_get_tree. Prefer these during autonomous execution; use the CLI for
interactive/human use, bulk gc, and doctor reconciliation.