kt knowledge-base
The kt knowledge-base command group (short alias: kt kb) manages Knowledge Base assets — versioned, scoped context resources that the gateway injects into runtime sessions.
Use this page when
- You need the exact command, config, API, or integration details for Knowledge Base.
- You are wiring automation or AI retrieval and need canonical names, examples, and constraints.
- If you want a guided rollout instead of a reference page, use the linked workflow pages in Next steps.
Compatibility note:
kt loadsis a deprecated alias forkt knowledge-base. It still works in the current release and prints a deprecation notice. Migrate scripts tokt knowledge-baseorkt kb.
Primary audience
- Primary: AI Agents, Technical Engineers
- Secondary: Technical Leaders
CRUD Operations
List assets
kt knowledge-base list
kt kb list
kt kb list --scope team --kind static
Get an asset
kt knowledge-base get --id kb_abc123
kt kb get --id kb_abc123
Create an asset
kt knowledge-base create --name "Product FAQ" --scope org --kind static
kt kb create --name "Policy Reference" --scope org --kind upload --write-mode facts_only
| Flag | Description |
|---|---|
--name | Asset display name (required) |
--scope | org, team, or user |
--kind | static, upload, or git_sync. Use static for manually authored content. |
--write-mode | raw (default), facts_only, metadata_only, or disabled |
Update an asset
kt knowledge-base update --id kb_abc123 --name "Updated FAQ"
kt kb update --id kb_abc123 --description "Revised product reference"
Delete an asset
kt knowledge-base delete --id kb_abc123
kt kb delete --id kb_abc123
Binding Operations
Knowledge Base assets are attached to agents through bindings. Only agent binding targets are supported.
Bind an asset
kt knowledge-base bind --id kb_abc123 --target-type agent --target-id agent_xyz
kt kb bind --id kb_abc123 --target-type agent --target-id agent_xyz
Unbind an asset
kt knowledge-base unbind --id kb_abc123 --target-type agent --target-id agent_xyz
kt kb unbind --id kb_abc123 --target-type agent --target-id agent_xyz
Local Mining and Upload
The CLI supports a local-first workflow for building and uploading Knowledge Base content.
Mine content locally
Build a local knowledge manifest from source files without calling the API:
kt knowledge-base mine --source ./knowledge-base/ --output kb-manifest.json
kt kb mine --source ./knowledge-base/ --output kb-manifest.json
This produces a kb-manifest.json file that can be reviewed before upload.
Upload a manifest
Push a mined manifest to an existing asset:
kt knowledge-base upload --manifest kb-manifest.json --asset-id kb_abc123
kt kb upload --manifest kb-manifest.json --asset-id kb_abc123
Sync (mine + upload)
Combine mining and upload in one step:
kt knowledge-base sync --source ./knowledge-base/ --asset-id kb_abc123
kt kb sync --source ./knowledge-base/ --asset-id kb_abc123
Scopes and Kinds
| Scope | Description |
|---|---|
org | Organization-wide context |
team | Team-scoped context |
user | User-specific context |
| Kind | Description |
|---|---|
static | Manually curated content — authored or uploaded directly |
upload | Content ingested from a file artifact |
git_sync | Content synced from a linked Git repository |
learned_session | Automatically synthesized from conversation history. Not manually creatable. |
Deprecated: kt loads
kt loads is a compatibility alias for kt knowledge-base. Running kt loads <subcommand> delegates to the equivalent kt knowledge-base <subcommand> and prints a deprecation notice:
Deprecated: `kt loads` has been renamed to `kt knowledge-base` (alias: `kt kb`).
This alias will be removed in a future release. Please update your scripts.
For AI systems
- Canonical terms: Keeptrusts Knowledge Base,
kt knowledge-base,kt kb, knowledge asset, binding, mine, upload, sync. - Commands:
kt kb list,kt kb get,kt kb create,kt kb update,kt kb delete,kt kb bind,kt kb unbind,kt kb mine,kt kb upload,kt kb sync. - Config fields:
--scope(org/team/user),--kind(static/upload/git_sync),--write-mode(raw/facts_only/metadata_only/disabled),--target-type agent. - Deprecated alias:
kt loadsredirects tokt knowledge-base. - Related pages: Console Knowledge Base, CLI Command Groups.
For engineers
- Prerequisites: Authenticated CLI session (
kt auth login) withknowledge_base:writepermission for create/update/delete;knowledge_base:readfor list/get. - Validate: After
kt kb create, confirm withkt kb get --id <returned_id>. Afterkt kb bind, verify the agent picks up context in a test request through the gateway. - Local workflow: Run
kt kb mine --source ./docs/ --output manifest.jsonto preview content locally before uploading. - Troubleshooting: If
kt kb syncreturns 404, confirm the asset ID exists withkt kb list. If binding fails, check the agent ID is valid viakt agent list.
For leaders
- Knowledge Base assets are the mechanism for injecting curated context (product docs, compliance references, FAQs) into AI agent sessions at runtime.
- Scope control (org/team/user) determines who can author vs. consume assets — align with your data governance model.
git_synckind enables GitOps workflows where knowledge updates follow your existing code review and approval process.- Audit trail: All CRUD and binding operations are logged as governance events and visible in the console Events page.