feat: wire claude-code agent runner backend

This commit is contained in:
Andrey Avtomonov 2026-05-15 13:04:16 +02:00
parent eb90d2f32c
commit 3de32c43a1
16 changed files with 229 additions and 21 deletions

View file

@ -250,6 +250,17 @@ canonical revenue reporting.
Together, these four pillars give agents enough context to produce analytics artifacts that match what your team would produce - not just syntactically valid SQL, but the right query for the question.
## Agent runner backends
KTX separates the global LLM provider from the agent runner. The global
provider powers non-agent calls such as scan enrichment and relationship
proposals. The agent runner powers curated tool loops used by ingest and memory
capture.
Use `llm.agentRunner.backend: claude-code` when you want those curated loops to
run through the Claude Agent SDK. KTX registers only its stage-specific MCP
tools for the session and disables Claude Code built-in tools for that backend.
## How KTX compares
KTX is a context layer with an agent-native semantic layer at its core. MetricFlow, Cube, and Malloy model metrics, dimensions, joins, and generated SQL. KTX covers that semantic-layer work, then adds the context agents need to use and maintain it: wiki pages, schema scans, provenance, ingestion, validation, and agent-facing CLI commands.

View file

@ -59,7 +59,7 @@ completed setup steps and resumes from the remaining work.
KTX uses a Claude model for ingest agents that turn schemas, SQL, BI metadata,
and documents into semantic-layer sources and wiki context.
Setup supports two LLM provider paths:
Setup supports two hosted LLM provider paths:
| Provider | Use when | Credential model |
|----------|----------|------------------|
@ -78,6 +78,28 @@ Setup checks the selected model before saving. Anthropic API setup fetches live
Claude model choices when possible and falls back to bundled defaults if model
discovery is unavailable.
### Use a local Claude Code session for ingest agents
KTX can run ingest and memory-agent loops through your local Claude Code
session. This affects only agentic loops; scan enrichment, page triage, and
relationship proposals still use `llm.provider`.
```bash
ktx setup --llm-backend claude-code --anthropic-model claude-sonnet-4-6
```
The generated `ktx.yaml` uses:
```yaml
llm:
provider:
backend: none
agentRunner:
backend: claude-code
models:
default: claude-sonnet-4-6
```
## Step 3: Configure embeddings
KTX uses embeddings for semantic search over semantic-layer sources, wiki