Skip to main content
Browse docs
By Audience
Getting Started
Configuration
Use Cases
IDE Integration
Third-Party Integrations
Engineering Cache
Console
API Reference
Gateway
Workflow Guides
Templates
Providers and SDKs
Industry Guides
Advanced Guides
Browse by Role
Deployment Guides
In-Depth Guides
Tutorials
FAQ

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 loads is a deprecated alias for kt knowledge-base. It still works in the current release and prints a deprecation notice. Migrate scripts to kt knowledge-base or kt 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
FlagDescription
--nameAsset display name (required)
--scopeorg, team, or user
--kindstatic, upload, or git_sync. Use static for manually authored content.
--write-moderaw (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

ScopeDescription
orgOrganization-wide context
teamTeam-scoped context
userUser-specific context
KindDescription
staticManually curated content — authored or uploaded directly
uploadContent ingested from a file artifact
git_syncContent synced from a linked Git repository
learned_sessionAutomatically 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 loads redirects to kt knowledge-base.
  • Related pages: Console Knowledge Base, CLI Command Groups.

For engineers

  • Prerequisites: Authenticated CLI session (kt auth login) with knowledge_base:write permission for create/update/delete; knowledge_base:read for list/get.
  • Validate: After kt kb create, confirm with kt kb get --id <returned_id>. After kt 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.json to preview content locally before uploading.
  • Troubleshooting: If kt kb sync returns 404, confirm the asset ID exists with kt kb list. If binding fails, check the agent ID is valid via kt 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_sync kind 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.

Next steps