A minimal agent harness.
| Package | PyPI | Description |
|---|---|---|
kcastle-agent |
Agent core and harness infrastructure | |
kcastle |
Textual interface and CLI |
K requires Python 3.12 or later. Run it directly with uv:
uvx kcastleOr install a persistent command:
uv tool install kcastle
kcastleUpgrade a persistent installation, including pre-releases:
kcastle self updateConfigure one provider:
# DeepSeek (deepseek-v4-flash)
export DEEPSEEK_API_KEY=...
# Or OpenAI (gpt-5.5)
export OPENAI_API_KEY=...
uvx kcastleK automatically selects the configured provider. DeepSeek takes precedence when both keys are present.
Each launch creates an append-only JSONL session under ~/.kcastle/sessions; its title comes from
the first user message and its metadata records the creation time. Use /resume to switch sessions.
Type / in an empty composer to open the built-in command list:
/resume— Switch to a saved session./model— Switch between detected model backends./compact— Compact the current context./permissions— Toggle between approval prompts and allowing all tools./queue <message>— Run a message after the current task settles. Available while K is running./exit— Exit K.
During a run, submit text normally to steer the next model turn. Press Escape to cancel the
active operation.
From a development checkout, use uv sync followed by uv run kcastle.
just format
just check
just test
just buildInspired by pi.