Skip to content

Getting Started

1picassoai edited this page Nov 18, 2026 · 2 revisions

Getting Started

1. Prerequisites

  • A running llama-server (llama.cpp) instance with tool calling enabled (--jinja), e.g. on http://127.0.0.1:8099
  • Rust toolchain (cargo) on macOS to compile kraits-adaptor from source (zero external crate dependencies in Cargo.toml)
  • git and python -m pytest on PATH when running Python test verification gates

2. Build & Unit Test

git clone https://github.com/1picassoai/kraits.git
cd kraits/kraits-adaptor
cargo test --release
cargo build --release

Expected unit test output (v0.6.28): 17 passed; 0 failed.

3. Run kraits-adaptor serve

Point kraits-adaptor at your local Git repository and running llama-server:

./target/release/kraits-adaptor serve --repo /path/to/your/repo --listen 127.0.0.1:8100 --upstream http://127.0.0.1:8099

Then open http://127.0.0.1:8100 in your browser for the single-column chat and diff UI.

Flag Default Description
--repo <dir> . Path to the single locked target Git repository
--listen <host:port> 127.0.0.1:8100 Local HTTP bind address for Web UI, /kraits/*, and /v1/chat/completions
--upstream <url> http://127.0.0.1:8099 llama-server URL

Other CLI Subcommands

kraits-adaptor index  --repo <dir>
kraits-adaptor purge  --repo <dir>
kraits-adaptor ast    --repo <dir> <rel-file>
kraits-adaptor symbol --repo <dir> <rel-file> <symbol>
kraits-adaptor query  --repo <dir> <query> [--budget <chars>]
kraits-adaptor learn  --repo <dir> --kind <kind> --sig <sig> --detail <detail> [--file <rel>]

4. HTTP Endpoints & Demo Harness

Method & Path Purpose
GET / or GET /ui Minimalist single-column chat & diff web UI
POST /v1/chat/completions Chat completions proxy with repo context injection
GET /kraits/repo Repo version, indexed AST files, active task ID, and served request count
GET /kraits/file?path=<rel> Line count and AST symbol skeleton for an indexed file
GET /kraits/memory Persisted .kraits/ episodic lessons and hot-file counts
GET /kraits/diff Current git diff in the locked repository
POST /kraits/learn Manually record a lesson into .kraits/memory.jsonl
POST /kraits/task Start a bounded agent task ({"prompt": "..."}) -> {"task_id": "..."}
GET /kraits/task?id=<task_id> Poll task status, sequential turn traces, git diff, and final summary
POST /kraits/demo Demo harness (`{"action": "bug1"

Note: The bug1, bug2, and feat1 demo actions assume a pallets/flask checkout.