Local AI agent
Run `kdeps` and you are in an AI REPL - an autonomous agent with tool use and memory that works fully offline against a local model.
AI Appliance Builder
YAML-defined AI agents and workflow pipelines. Ship as Docker, K8s, ISO, or a single binary.
$ kdeps
kdeps v2.x | agent loop
Model: llama3.2 (llamafile, offline) | /help for commands
> find the failing tests in ./api and suggest a fix
Ran go test ./api/... - 2 failures in handler_test.go.
Both assert 200, but the router now returns 204 for an
empty body. Update the expected status on lines 41 and 58.
> /model claude-sonnet
Switched to claude-sonnet (Anthropic)
>getting started
Three steps from idea to running AI API.
Declare resources -- chat, HTTP, Python, SQL, shell. Wire them with requires:. No glue code.
kdeps run workflow.yaml starts the API server. kdeps [path] starts the autonomous agent loop.
POST to your route, get back structured JSON. Export as Docker, Kubernetes, ISO, or a single binary.
run modes
Workflows, agents, and agencies — all from the same YAML.
Resources run in DAG order defined by requires:. Every request takes the same path. The LLM's wording still varies - everything around it does not.
Run kdeps for an instant AI REPL - fully offline with llamafile or Ollama, no API key needed. Load workflows as tools: the LLM decides what to call and when.
One agent calls another via the agent: resource type. Compose agents like functions — each runs independently, results flow back.
why kdeps
No Python scripts, no wiring, no boilerplate.
The model is probabilistic; the pipeline around it is not. In workflow mode the same request always takes the same path, validation runs before any LLM call, and the response is shaped to a fixed schema.
| Traditional approach | kdeps |
|---|---|
| Python script + Flask + OpenAI SDK + retry logic | One workflow.yaml file |
| Manual dependency wiring | requires: in YAML |
| Write error handling by hand | onError: block (continue / retry / fail) |
| Write Dockerfile + CI pipeline for deployment | kdeps bundle build --tag then docker push |
| Chaining agents by hand | agent: resource — one agent calls another declaratively |
examples
Every card links to a working project in the examples directory.
POST a file, get back a structured JSON summary - title, key points, entities. Runs on a local model.
workflow modeIndex PDFs and text locally, retrieve the relevant chunks, and answer with an LLM. Nothing leaves the box.
workflow modeFetch a page, extract the fields you name, return clean JSON. Swap in the browser resource for JS-heavy sites.
workflow modeTurn a plain-language question into a query against your database and answer it. Parameterized, not string-built.
workflow modeAnswer a call, transcribe the caller, run a pipeline, speak the reply - say, ask, and menu steps in YAML.
workflow modeOne agent researches, another writes - each its own workflow.yaml, composed like function calls.
multi-agentbook
Everything from first agent to production deployment, in one place.
Build & Deploy Autonomous AI Agents and Agencies in YAML
Your AI prototype works. Now ship it. Hands-on guide to deterministic pipelines, multi-agent orchestration, error handling, and vendor-agnostic deployment — the production challenges most AI frameworks leave to you.
Read the book ->