An open-source alternative AI coding agent that lives in your terminal.
Plans, edits, runs, and reviews code with any model on OpenRouter.
KRYTH connects to LLMs through OpenRouter, reads and edits your code with a built-in tool set, runs shell commands, delegates to specialized sub-agents, and streams everything through a full-screen TUI. Every mutating action goes through an approval policy you control, so it is as autonomous or as careful as you want it to be.
Quick Start
Install KRYTH and start an agent in your own repo:
pip install kryth
On Windows, pip install places kryth.exe in the Python Scripts
directory, which is not on PATH by default. Run this once after
installing:
kryth setup --path
This adds the Python Scripts directory to your user-level PATH (no
administrator rights required). Then open a new terminal and run:
kryth # start the interactive TUI
What kryth setup --path reports:
# Success — PATH was just configured:
[KRYTH] Installation completed successfully.
[KRYTH] Python Scripts directory configured.
[KRYTH] Open a new terminal and run: kryth
# Already on PATH:
[KRYTH] PATH is already configured.
# Failure — automatic configuration did not work:
[KRYTH] Automatic PATH configuration was unsuccessful.
[KRYTH] Add the Python Scripts directory to your PATH manually,
[KRYTH] or run: python -m main setup --path
Usage
Run kryth from the project you want to work on, then describe your task in plain language. Start by exploring the codebase, ask for a plan, or jump into a specific change:
Explain how this project is structured and where the main entry points are.
Find the cause of this failing test and fix it.
Plan a refactor of the authentication module before making any changes.
Review my changes for bugs and missing edge cases.
KRYTH reads the relevant files, uses its tools, and streams its progress in the terminal. When an action needs approval, you can review it before it runs. Type /help to see the available commands, /model <name> to switch models, or /config to inspect your configuration.
For a single task, pass your prompt directly:
kryth "Explain how this project is structured"
You can also choose a working directory or return to a saved conversation:
kryth --cwd /path # run against a different working directory
kryth --continue # pick up the last session in this directory
kryth --resume 3f2a1c # resume a specific session by id
kryth sessions # list saved sessions
Configuration lives in ~/.config/kryth/config.toml, with per-project overrides in .kryth/config.toml, and AGENTS.md is picked up automatically.
Full CLI reference | configuration reference
Documentation
| Page | What it covers |
|---|---|
| CLI reference | Installing, logging in, every command and flags |
| Configuration | config.toml, per-project overrides, AGENTS.md, every option |
| Tools | The built-in tool set, sub-agents, MCP servers |
| Approvals | The six approval policies and the rules that override them |
| Sessions | Saving, resuming, checkpointing and rewinding conversations |
| Slash commands | Everything you can type after a / inside the TUI |
| Architecture | How the codebase is put together, class by class |
| Technologies | The libraries KRYTH is built on and what each one does |
Why KRYTH?
- Bring any model. OpenRouter as the backend means versatility. One login gives you large models Claude, OpenAI, Deepseek, Kimi, and even access to smaller free models.
- Safety is a first-class feature. Six approval policies, dangerous-command rejection, and confirmation for anything outside the working directory. You choose the risk level, not the agent. See Approvals.
- It survives long sessions. Context pruning reclaims tokens from stale tool output, and when the window fills up, KRYTH compacts history into a continuation brief and keeps going instead of erroring out.
- Nothing is lost when you close the terminal. Sessions are checkpointed after every turn, so
kryth --continueputs you back exactly where you were, and/rewindwalks the conversation back to any earlier checkpoint. See Sessions. - Configurable by design. A readable, object-oriented Python codebase built on Rich, Click, and Pydantic. Every tool is one class behind a shared abstract base, so adding a tool or a sub-agent is a small, well-marked change. See Architecture.
- Component-based UI design. KRYTH uses a modular, component-based UI system with separate components for every visual element (spinners, gutters, markdown rendering, tool displays, confirmations, etc.), making it easy to maintain, customize, and extend the interface.
What it can do
| Files | read, write, edit, apply_patch, grep, glob, and list_directories for working with a codebase. apply_patch batches creates, updates, deletes and renames across several files into one all-or-nothing call |
| Bash | The bash tool executes commands in the working directory. Automatically detects your OS to know what shell commands to execute |
| Planning | A plan tool tracks steps (a to do list) across the agent loop |
| Network and memory | Web search via DuckDuckGo, URL fetching, and key-value storage that survives across sessions |
| Sub-agents | Specialized agents the main agent can delegate to: codebase_investigator, code_reviewer, software_architect, test_writer, debugger |
| MCP | Connects to external MCP servers for additional tools and data sources |
| Skills | Automatically checks for SKILLS.md files during your first prompt, bring your skills over that you've used on any other harness |
| Interactive TUI | Full-screen terminal interface built on Rich, with streaming responses, live tool call output, visible model reasoning, and token usage tracking |
| Single-shot mode | Pass a prompt as an argument for non-interactive runs, suitable for scripting |
Slash commands
| Command | What it does |
|---|---|
/help |
Show all commands |
/model <name> |
Switch models mid-session |
/approval <mode> |
Switch the approval policy mid-session |
/thinking [on|off|low|medium|high] |
Show, hide, or retune the model's reasoning |
/clear |
Start a fresh conversation (the old one stays saved) |
/config |
Show the active configuration |
/stats |
Session statistics: tokens, elapsed time, tool calls |
/tools |
List available tools |
/mcp |
Show MCP server status |
/sessions [all] |
List saved sessions, newest first |
/sessions rm <n|id> |
Delete a saved session |
/resume <n|id> |
Load a saved session into the current one |
/checkpoint [label] |
Save a checkpoint now, with an optional name |
/checkpoints |
List the checkpoints in this session |
/rewind <n|id> |
Roll the conversation back to a checkpoint |
/exit, /quit |
Leave the agent |
Commands autocomplete as you type: hitting / lists every command, the list narrows as you keep typing, and ↑/↓ select while Enter runs the highlighted one (Tab fills it in if you want to add arguments first).
Sessions
KRYTH writes the conversation to disk after every turn, so closing the terminal does not kill your conversation. All conversations are resumable and can be accessed by running a command shown below.
kryth --continue # resume the most recent session in this directory
kryth --resume 3f2a1c # resume a specific session (a prefix of the id is enough)
kryth sessions # what is saved for this directory
kryth sessions --all # every directory
kryth sessions rm 3f2a1c
Inside the TUI, /sessions lists what is saved and /resume loads one into the running agent, transcript and token totals included. The system prompt is not restored: it is rebuilt from the current config and tool set, so a resumed session picks up any model, approval, or AGENTS.md changes you have made since.
Checkpoints
Each save is a checkpoint, a full snapshot of the conversation at that point. Turns are checkpointed automatically, and /checkpoint <label> marks one by hand before you try something risky:
❯ /checkpoint before the refactor
Saved before the refactor · 24 messages · session 3f2a1c8b
❯ /checkpoints
1 a41f9c02 turn 3 18 msgs 22m ago
2 7d2b1e55 turn 4 24 msgs 4m ago
3 e0c34a91 before the refactor 24 msgs just now
❯ /rewind 1
Rewound to turn 3 · 18 messages · turn 3
Rewinding replaces the conversation the model sees, which makes it the way out of a turn that went sideways: roll back to before the detour and take another run at it. It only rewinds the conversation, not your files — anything already written to disk stays written.
Sessions live in ~/.config/kryth/sessions/<id>/, one directory per session, with the transcripts in a JSONL file next to a small meta.json. Old checkpoints are trimmed once a session passes max_checkpoints (autosaves go first, named ones are kept), and the oldest sessions are dropped past max_sessions. Set enabled = false under [session] to keep conversations off disk entirely.
Approvals
Before KRYTH runs anything that changes state, the approval policy decides whether it goes ahead, asks you, or is refused outright. Read-only tools (read, grep, glob, list_directories, plan) never prompt, so a policy only affects writes, bash commands, network calls, memory writes, MCP tools, and sub-agent runs.
| Value | Badge | Behaviour |
|---|---|---|
on_request (default) |
ask |
Confirm every mutating tool call. Commands matched as known-safe (ls, git status, grep, …) run without asking. |
auto_edit |
auto-edit |
File edits and writes inside the working directory go through unprompted; bash commands still need confirmation unless known-safe. |
auto |
auto |
Everything runs except dangerous commands, which are rejected. |
on_fail |
on fail |
Currently identical to auto. Reserved for prompting after a failed tool call, which is not implemented yet. |
never |
read-only |
Rejects anything that isn't a known-safe command. Nothing gets written, and you are never prompted. |
yolo |
yolo |
Approves everything, including commands matched as dangerous. Only use this in a sandbox or container. |
Two rules apply on top of the policy, and no policy except yolo overrides them:
- Dangerous commands are rejected.
rm -rf /,dd if=,mkfs,shutdown,curl … | bash, fork bombs, and similar patterns are refused before bash ever sees them (the full list isDANGEROUS_PATTERNSinsafety/approval.py). - Anything touching a path outside the working directory is confirmed, however permissive the policy is (
neverrejects it instead).
Roadmap
Currently being worked on:
- Parallel Subagents - allows sub-agents to call instances of other sub-agents to delegate more work to specialized agents.
- Git Integration - allows users to use git commands with kryth.
Have an idea? Open an issue, feature discussions are very welcome.
Contributing
Contributions of every size are appreciated, from typo fixes to new tools and sub-agents. Read CONTRIBUTING.md to get started, and check the open issues for something to pick up!
If KRYTH is useful to you, a star on the repo genuinely helps the project reach more developers. ⭐
License
Metadata
Release files for kryth 0.0.37
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kryth-0.0.37.tar.gz | 204.2 kB | With provenance | Details for kryth-0.0.37.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kryth-0.0.37-py3-none-any.whl | Python 3 | none | any | Details for kryth-0.0.37-py3-none-any.whl |
Total release size: 428.8 kB
Release files / kryth-0.0.37.tar.gz
| Download URL | kryth-0.0.37.tar.gz |
|---|---|
| Size | 204.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a17c0bd61805759d5f4a74fe0bc7d9dac785edb0b64e459d9695d41151297318
|
|
BLAKE2b-256 checksum How to use checksums |
407d283eee9cbeb0f25b7f9c81573c35bd0f1e910d17a560b3f4b01ac1b4d44f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / kryth-0.0.37-py3-none-any.whl
| Download URL | kryth-0.0.37-py3-none-any.whl |
|---|---|
| Size | 224.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
48534dec0ee1ab4d02421949536f8f17a08ea92e5d01f72535086ccb69a37024
|
|
BLAKE2b-256 checksum How to use checksums |
8b8d8eecd553e9be8479397223221d1dbbb5af599014ac467a8c395ee0fc60a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logSecurity for kryth 0.0.37
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for kryth-0.0.37.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.