An autonomous coding agent that manages its own context across sessions
Project description
Kadmon
An autonomous coding agent that manages its own context, asks clarifying questions, and hands off between sessions without human intervention. Scores 100% on Aider Polyglot (Python) benchmark.
Install
pip install kadmon
Getting Started
# Interactive setup — picks your provider, configures credentials, tests the connection
kadmon init
# Run on a repo
cd your-project
kadmon run --task "Fix the failing test in test_auth.py"
kadmon init walks you through:
- Choose provider (Bedrock, Anthropic, OpenAI)
- Configure credentials (AWS profile, API key, etc.)
- Test the connection
- Save to
.kadmon/config.toml
Manual Provider Setup
If you prefer to skip kadmon init:
AWS Bedrock (default):
# Any standard AWS credential method works (SSO, env vars, profiles)
export AWS_PROFILE=your-profile
export AWS_REGION=us-east-1
kadmon run --task "..." --provider bedrock --model us.anthropic.claude-sonnet-4-6
Anthropic Direct:
export ANTHROPIC_API_KEY=sk-ant-...
kadmon run --task "..." --provider anthropic --model claude-sonnet-4-20250514
OpenAI:
export OPENAI_API_KEY=sk-...
kadmon run --task "..." --provider openai --model gpt-4o
What Makes Kadmon Different
Most coding agents are "very talented junior engineers" — they need constant supervision and context management. Kadmon is designed to be piloted like a team lead manages a senior engineer:
- No guessing — asks clarifying questions when requirements are ambiguous (not for permission — for correctness)
- Rock climbing — verifies each step before moving to the next, never sprints into the void
- Self-managing context — detects when its context is degrading, writes a handoff doc, and continues in a fresh session automatically
Autonomous Context Management
.kadmon/
├── config.toml # Provider config, preferences
├── library/ # Persistent knowledge (survives across sessions)
│ ├── architecture.md # Project structure notes
│ ├── conventions.md # Patterns, gotchas
│ └── tasks/current.md # Active task state
├── session.json # What's in flight right now
├── handoffs/ # Handoff docs (context continuity)
└── symbols.db # Code structure index (tree-sitter)
The agent automatically:
- Loads relevant library context on startup (cold start)
- Saves learnings after each completed step
- Detects context degradation (token budget, loops, quality drop)
- Writes a structured handoff and resets — no human intervention needed
Local Development
# Clone and install in dev mode
git clone https://github.com/ayuan153/kadmon.git
cd kadmon
pip install -e ".[dev]"
# Run tests
./dev test
# Lint
./dev lint
# Run kadmon against a local repo
./dev run "Fix the bug in parser.py"
# Benchmark (5 Python exercises, quick smoke test)
./dev bench
# Full benchmark (225 exercises, all languages)
./dev bench-full
Dev Script Reference
./dev bench [N] # N Python exercises (default: 5)
./dev bench-full # All 225 exercises, 6 languages
./dev run "task" # Run kadmon on current repo
./dev test # pytest
./dev lint # ruff
Running Against Your Own Code
# From any repo:
kadmon run --task "Add input validation to the create_user endpoint"
# With planning disabled (faster, simpler loop — good for debugging):
kadmon run --task "Fix the typo in README.md" --no-planning
# In yolo mode (no tool approval gates):
kadmon run --task "Refactor the auth module" --mode yolo
Benchmarking
Aider Polyglot
225 Exercism exercises across Python, JavaScript, Go, Rust, Java, C++.
# Quick smoke test (~$1)
kadmon bench --languages python --limit 5
# Full Python
kadmon bench --languages python
# All languages, 10 parallel workers
kadmon bench -j 10
# Sequential (live timer, good for debugging)
kadmon bench --limit 5 -j 1
Results: eval_results/polyglot/summary.json
SWE-bench
kadmon eval --dataset swe_bench_verified_mini.json --limit 10
Architecture
kadmon/
├── agent/ # ReAct loop, planning, backtracking, handoff, pruner
├── providers/ # LLM providers (Bedrock, Anthropic, OpenAI)
├── tools/ # file I/O, search, shell, skeleton, references, plan, ask_human
├── human/ # Question batching, CLI/webhook channels
├── eval/ # Benchmark harnesses (Aider Polyglot, SWE-bench)
├── index/ # Tree-sitter symbol index (SQLite)
└── memory/ # Librarian, session tracker, read cache
Key design:
- Single-threaded ReAct loop with architect/editor phase separation
- No frameworks — provider SDKs directly, minimal core
- Autonomous handoff — detects context degradation, resets with continuity
- File-based memory —
.kadmon/library/persists knowledge across sessions - Ambiguity resolution —
ask_humantool for genuine uncertainty (not permission)
Configuration
All defaults in kadmon/config.py:
DEFAULT_MODEL = "us.anthropic.claude-sonnet-4-6"
DEFAULT_PROVIDER = "bedrock"
DEFAULT_REGION = "us-east-1"
Per-project config at .kadmon/config.toml (created by kadmon init).
Contributing
See AGENTS.md for AI contribution guidelines. Key rules:
- Build → Lint → Test → Commit (no skipping)
- Conventional commits with scopes
- One concern per commit
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kadmon-0.1.0.tar.gz.
File metadata
- Download URL: kadmon-0.1.0.tar.gz
- Upload date:
- Size: 58.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8199af1e0a0ceae895eacebc3d9f017b3cf41d1aaabd6c6b773b227ce32c254a
|
|
| MD5 |
18450e64ec6750e411e140131375a2bc
|
|
| BLAKE2b-256 |
14f64f894989c0ce6b7b4e7ca7881f5ab2d160fbaca1ce253327e4f21c7fdff0
|
Provenance
The following attestation bundles were made for kadmon-0.1.0.tar.gz:
Publisher:
release.yml on ayuan153/kadmon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kadmon-0.1.0.tar.gz -
Subject digest:
8199af1e0a0ceae895eacebc3d9f017b3cf41d1aaabd6c6b773b227ce32c254a - Sigstore transparency entry: 1478890157
- Sigstore integration time:
-
Permalink:
ayuan153/kadmon@8d8b8b99344ac060dda2341f95259def85f6db6d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ayuan153
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8d8b8b99344ac060dda2341f95259def85f6db6d -
Trigger Event:
push
-
Statement type:
File details
Details for the file kadmon-0.1.0-py3-none-any.whl.
File metadata
- Download URL: kadmon-0.1.0-py3-none-any.whl
- Upload date:
- Size: 54.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e2aef1e795c6c8d779989f0c9dc592003b7662606cbd0a8dcc233370c6e1e10
|
|
| MD5 |
4fd224b0db4d25683d0723d37d907a76
|
|
| BLAKE2b-256 |
e44b9a69c3a366eb340fa5b5253d3d9b20456f565f03a2d9a6ccc3844c228f05
|
Provenance
The following attestation bundles were made for kadmon-0.1.0-py3-none-any.whl:
Publisher:
release.yml on ayuan153/kadmon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kadmon-0.1.0-py3-none-any.whl -
Subject digest:
2e2aef1e795c6c8d779989f0c9dc592003b7662606cbd0a8dcc233370c6e1e10 - Sigstore transparency entry: 1478890480
- Sigstore integration time:
-
Permalink:
ayuan153/kadmon@8d8b8b99344ac060dda2341f95259def85f6db6d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ayuan153
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8d8b8b99344ac060dda2341f95259def85f6db6d -
Trigger Event:
push
-
Statement type: