Development setup
Run Koda from source and test locally.
Running Koda from source is the path for contributors and anyone who wants to touch the Python backend or the Next.js dashboard. The repository is a mono-repo; a single clone gives you everything.
Prerequisites
- Docker and Docker Compose.
- Python 3.11+ (pyproject enforces
>=3.11). - Node.js 20+ and
pnpm. - A POSIX-like shell. Windows contributors should use WSL 2.
Clone and bootstrap
git clone https://github.com/OpenKodaAI/koda.gitcd kodaTwo scripts cover the usual starts. The wrapper handles Docker and Node prerequisites on apt-based Linux with sudo; on macOS or WSL install the prerequisites yourself.
./scripts/install.sh # same path a user would take# …or, if prerequisites are already in place:cp .env.example .envdocker compose up -d --buildBackend development
Install the Python project in editable mode with the dev extras:
pip install -e ".[dev]"Standard checks before pushing:
ruff check .ruff format --check .mypy koda/ --ignore-missing-importspytest --cov=koda --cov-report=term-missingpytest koda/memory/tests/ -k recall runs just the memory recall tests with substring matching. Use -x to stop on the first failure while iterating.
Web dashboard development
pnpm installcp apps/web/.env.example apps/web/.env.localpnpm dev:webThe dev server runs on http://127.0.0.1:3000. Set KODA_API_URL in .env.local to point at the running control plane (by default http://127.0.0.1:8090).
Web checks
pnpm lintpnpm typecheckpnpm testRegenerating proto contracts
gRPC service contracts live in proto/. After editing a .proto file, regenerate both the Python and TypeScript bindings:
buf generatebuf.gen.yaml defines the outputs. Regenerated files are committed alongside the .proto change in the same PR.
Database migrations
Migrations live under koda/state/migrations/. Adding a new one is a three-step ritual:
- Write the migration file next to the existing ones — numbered, with both
upanddownsections. - Update the affected typed repositories in
koda/state/. - Run
docker compose exec app python -m koda.state.migrateagainst a local compose stack to confirm the migration applies cleanly.
Adding a runtime skill
Drop a new markdown file under koda/skills/. The registry hot-reloads every 30 seconds, so a local dev stack will pick it up without a restart. See Authoring a Skill for the format.
Repository layout
koda/— Python backend: handlers, services, state, memory, skills.apps/web/— Next.js operator dashboard.packages/cli/— the@openkodaai/kodanpm CLI.proto/— gRPC service contracts.docs/— authoritative prose + OpenAPI + architecture diagrams.scripts/— install wrapper, doctor, and contributor tooling.
Next steps
- Submitting changes — commits, pull requests, and what review looks like.
- Release process — how your change makes it from
maininto a release.