mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-07 07:55:13 +02:00
* feat: rename project wiki directory * test: fix wiki skill ordering expectations * Show configured context sources in setup
59 lines
1.4 KiB
Text
59 lines
1.4 KiB
Text
---
|
|
title: Serving Agents
|
|
description: Expose your context to Claude Code, Cursor, Codex, and other coding agents.
|
|
---
|
|
|
|
Once you've built and refined your context, expose it to coding agents through
|
|
the public KTX CLI. Claude Code, Cursor, Codex, OpenCode, and custom agent
|
|
workflows can call the same commands you use at a terminal.
|
|
|
|
## CLI Commands
|
|
|
|
KTX public commands support JSON output for the context reads that agents use
|
|
most often. Use `--project-dir` when the agent is not already running inside the
|
|
KTX project directory.
|
|
|
|
### Available commands
|
|
|
|
```bash
|
|
# Check setup and context readiness
|
|
ktx status --json
|
|
```
|
|
|
|
**Semantic layer:**
|
|
|
|
```bash
|
|
# List sources
|
|
ktx sl list --json
|
|
ktx sl list --json --connection-id my-postgres
|
|
ktx sl search "revenue" --json
|
|
|
|
# Run a query from a JSON file
|
|
ktx sl query --json \
|
|
--connection-id my-postgres \
|
|
--query-file query.json \
|
|
--execute \
|
|
--max-rows 100
|
|
```
|
|
|
|
**Wiki:**
|
|
|
|
```bash
|
|
# Search wiki pages
|
|
ktx wiki search "revenue recognition" --json --limit 10
|
|
```
|
|
|
|
## Setting Up Your Agent
|
|
|
|
The fastest way to connect an agent is through the setup wizard:
|
|
|
|
```bash
|
|
ktx setup
|
|
```
|
|
|
|
The agents step auto-detects installed tools and generates the right
|
|
configuration. For manual setup or per-tool details, see the
|
|
[Agent Clients](/docs/integrations/agent-clients) integration page.
|
|
|
|
After configuration, the agent can immediately call KTX commands to list
|
|
sources, search wiki pages, and query your semantic layer.
|