Describe a goal in plain English. Krelvan builds a real agent that researches, drafts, and acts across your tools, runs it, and delivers the result to your inbox or channels β self-hosted, on your machine, yours to keep.
The canvas is the runtime Β· Self-hostable Β· Apache-2.0 Β· Zero runtime deps in core
Watch an agent run live β each step lights up on the canvas as it executes.
A real Research Analyst run β every step recorded, so you can replay exactly what happened.
The agent canvas maps 1:1 to what executed β nodes are real steps, the dashed arc is a real retry loop.
Every AI-agent platform can describe what an agent will do. Krelvan actually does the work β and lets you see, replay, and control every step.
Every run is recorded as a real, ordered history of events. The visual canvas, the run timeline, and the history are all reads of that one record β so "what you see is exactly what executed" is structural, not hopeful. That single design choice is the difference between a workflow runner and a platform you can hand to a customer or a security review.
On top of that, Krelvan does things only an agentic platform can:
- π§ Builds agents from natural language β describe an outcome, get a real, validated agent graph.
- π Failure-reasoning β when a run fails, Krelvan reasons over the full run history to find the root cause, the failing step, and a concrete fix.
- β»οΈ Auto-retry-with-fix β it rebuilds a corrected agent from that diagnosis and re-runs it. (In our tests: a failed run was diagnosed, fixed, re-run, and completed.)
- π§© A marketplace of capabilities AND whole agents β install a tool (HTTP API, MCP server) or a complete agent template (graph + its capabilities + the secrets it needs) from a Git-based registry, in one click. Every capability is labelled with exactly what it can touch and when it pauses for your approval.
- π¦ Ready-made agents β a Price Monitor (watch a page, alert only when the price changes, on a schedule) and a RAG Support Bot (answer grounded only in your docs, cite the source, refuse when it doesn't know) β installable in one click.
- π RAG, built in β
rag.ingest+rag.searchover a local vector store, with embeddings from OpenAI, Gemini, or Ollama (offline, no key). - π 7 LLM providers β Anthropic, OpenAI, Gemini, Groq, Mistral, Ollama (local), or any OpenAI-compatible gateway.
Every agent output lands in one Inbox β read it, copy it, or send it on.
Each output is a clean, rendered page you can copy, share with a one-time link, or publish.
Turn an agent public and it gets a shareable page with a live chat and its published output.
Drop the dependency-free widget on any site β shadow-DOM isolated, talks only to your agent.
The web UI and API boot with no secrets. Building and running model-powered agents switches on after you connect a hosted provider or local Ollama.
node -v # must be 22 or newer
npx krelvan@0.1.5The first start installs and builds the web UI, so it can take a few minutes. Later starts reuse that build. The launcher prints the URL, the persistent data directory, and a one-time setup token.
Web UI http://localhost:3100
Internal API http://localhost:3201/api/health
Open the web UI, paste the setup token from the terminal, and create the admin account for this installation. This is a local account: it is not a krelvan.com account and no hosted workspace is created.
Next, open Settings β Model & secrets, connect a model, return to the Dashboard, and build your first agent. Results land in Inbox; signed run records live under Runs.
The npm launcher stores persistent data in ~/.krelvan. Ctrl-C stops both processes; run
the same command again to restart. Ports: PORT or KRELVAN_WEB_PORT (web, default 3100) Β·
KRELVAN_API_PORT (internal API, default 3201).
Download the versioned compose file; no source checkout or Node toolchain is required:
curl -LO https://github.com/sreenathmmenon/krelvan/releases/download/v0.1.5/docker-compose.release.yml
docker compose -f docker-compose.release.yml up -dOpen http://localhost:3100. The SQLite database, identity keys, agents, and run records
persist in the named volume krelvan-data.
Download krelvan-0.1.5.tgz, SHA256SUMS, and the attestations from the
v0.1.5 release.
After verification:
npm install --global ./krelvan-0.1.5.tgz
krelvangit clone https://github.com/sreenathmmenon/krelvan
cd krelvan
npm install
npx krelvanThis path is for contributors. Customers who want an immutable reviewed version should use the versioned npm command, release compose file, or signed tarball above.
The recommended customer path is Settings β Model & secrets in the running app. Values are encrypted on that installation and are never shown in full again.
For unattended deployments, set provider configuration in the process environment:
KRELVAN_LLM_PROVIDER=anthropic
KRELVAN_LLM_MODEL=claude-sonnet-4-6
KRELVAN_LLM_API_KEY=sk-ant-...For OpenAI, the standard key name works directly:
KRELVAN_LLM_PROVIDER=openai
KRELVAN_LLM_MODEL=gpt-5.6-sol
OPENAI_API_KEY=sk-...Or go local with no key: KRELVAN_LLM_PROVIDER=ollama Β· KRELVAN_LLM_MODEL=llama3.2.
Without any provider the UI still runs and clearly reports LLM as off.
For Ollama, Krelvan checks host memory before asking Ollama to load a model. It refuses the
request when projected use reaches the safety ceiling (85% by default and never configurable
above 85%), and asks Ollama to unload the model after each response. Override to a lower ceiling
with KRELVAN_OLLAMA_MEMORY_LIMIT_PERCENT.
Krelvan is safe by default and stays that way as long as you keep these in mind:
-
It binds to your machine only (
127.0.0.1) by default. Nothing is on the network unless you choose to expose it β exposing is a deliberate act (setKRELVAN_WEB_HOST=0.0.0.0for the web,KRELVAN_HOST=0.0.0.0for the API). -
Exposing it? Put it behind HTTPS. The app speaks plain HTTP; run it behind a reverse proxy (Caddy or nginx) that terminates TLS, then set
KRELVAN_SECURE_COOKIES=1andKRELVAN_WEB_ORIGIN=https://your-host. Over HTTPS the session cookie is automatically a Secure__Host-cookie. The API refuses to start exposed without an auth token, so you can't open it to the world by accident. -
Third-party TypeScript/JS plugins are trusted-code-only. Declarative YAML capabilities and MCP connectors are safe to install from anyone β they can't run arbitrary code. A raw TypeScript plugin, however, runs real code (in a sandbox that denies file writes, subprocess spawning, and reads outside its own directory, and routes network through a brokered egress channel) β treat it like code you'd
npm install: only install TS plugins you trust. Enabling one requires an explicitKRELVAN_ALLOW_UNTRUSTED_PLUGINS=1. -
Your secrets are encrypted at rest (AES-256-GCM) in the data directory. For backups, you can keep the encryption key separate from the ciphertext β see Backups & the data directory below.
The canvas IS the runtime. Execution is captured as a real, ordered record. The canvas, the run timeline, and the history are all pure reads of that record. There is no separate "what happened" store that can drift from "what ran" β they are the same thing.
- Describe β build β run an agent from one sentence, with the plan shown before anything executes.
- Full run records β open any run and replay every step, decision, and output.
- Failure-reasoning + retry-with-fix β runs that fail get diagnosed and corrected, automatically.
The hard infrastructure is solved so you only build domain logic:
| Solved for you | What it means |
|---|---|
| Memory | Episodic + semantic + trust-aware, with provenance β right by default. |
| Human-in-the-loop | Standard pause / approve / resume via an autonomy gradient (suggest Β· act-with-veto Β· full). |
| Full history by default | Every decision, tool call, and step recorded, so you can replay any run. |
| Capabilities & trust | Deny-by-default admission; capabilities declare a side-effect class and gate for approval; the supervisor co-signs results (plugins never self-sign). Declarative (YAML) + MCP capabilities are safe by construction. Untrusted TypeScript plugins run in a real OS-process sandbox (node --permission: fs-write / child_process / native-addons / worker / WASI denied, memory + timeout caps, scrubbed env) and reach the network only through a brokered, allowlisted, SSRF-guarded egress channel β secrets are injected at the destination on the host and never enter the plugin. Adversarially tested. |
| Agent coordination | Sub-agent delegation with supervisor co-sign. |
| Failure-reasoning | Reason about why a run failed and how to fix it β not just retry. |
| Capability ecosystem | Install a connector; it works in any agent. |
Ship agentic solutions for clients in days, not months.
The "Discover" tab loads a registry index.json from a Git repo β an open, PR-based
model anyone can publish to. Entries are real and installable:
- YAML capabilities β wrap any HTTP API (no code).
- MCP connectors β connect GitHub, Slack, a filesystem, or any MCP server; every tool it exposes becomes a capability.
- Agent templates β a whole pre-built agent (its manifest + the capabilities it needs). One click installs the capabilities, creates the agent, and tells you which secrets to set. Ships with Price Monitor, RAG Support Bot, and Knowledge Base Ingest.
- Deploy capabilities β ship a site/app to Vercel, Netlify, Cloudflare Pages, Render, or Railway via the provider's deploy hook. These are
write-irreversible, so an agent pauses for your approval before it ships. - Free + paid β paid entries carry pricing + a license link; the platform never touches the money.
These flagship agents were run to completion through a real LLM provider (Groq,
llama-3.1-8b-instant) β each finished with a complete, replayable run record:
| Agent | Outcome | Record |
|---|---|---|
| Research Analyst | search β synthesise β compose a briefing | β 22/22 steps recorded |
| Price Monitor | fetch a page, detect a change vs last run | β 22/22 steps recorded |
| Personal Advisor | grounded advice weighed against your stored goals | β 17/17 steps recorded |
| Support Resolution Agent | triage β retrieve β judge β pause for your approval before sending | β 23/23 steps recorded |
Every provider (Anthropic / OpenAI / Groq / Mistral / Gemini / Ollama / any
OpenAI-compatible gateway) goes through one client with graceful structured-output
fallback, so a model that lacks json_schema still produces reliable output.
Authoring guide: docs/CAPABILITY_AUTHORING.md. Every PR to the
registry runs a validator (registry/validate.test.ts) β the same pure
validators the runtime uses β so a broken capability or template can't reach the Discover tab.
The default registry is the official one:
sreenathmmenon/krelvan-registry.
Point an install at your own fork with
NEXT_PUBLIC_KRELVAN_REGISTRY_URL=https://raw.githubusercontent.com/<you>/krelvan-registry/main/index.json
(see registry/ for the format and the seed catalog).
- UI β Next.js 15 web app: NL builder, interactive agent canvas (pan/zoom/replay), runs, capabilities marketplace, MCP, approvals, schedules.
- API + Runtime β
node:httpserver + the pure kernel / impure engine + the capability plane + the NLβmanifest compiler. - Persistence β SQLite ledger (via
node:sqlite), zero third-party runtime deps in core.
- The recorded run is the only source of truth β everything else is a pure read of it.
- The kernel is pure; the engine is the only thing that touches the world.
- No
eval, ever β conditional logic is a restricted, total typed-AST evaluator. - Deny-by-default β an ungranted capability never runs.
- Plugins are untrusted β the supervisor co-signs what it observed; secrets never reach plugins (a broker mints scoped tokens).
- Crash-safe by construction β state lives only in the log; resume = re-fold; effects run exactly once.
- Zero third-party runtime deps in core β Node built-ins only, license-clean, small to self-host.
| Layer | Where | Proven by |
|---|---|---|
| Run store | src/core/ledger/ |
append-only event store, ordered and content-addressed, crash-safe CAS append (no forks), verify() catches any corruption or gap |
| Manifest + safe expr | src/core/manifest/ |
structural validation; conditional edges are a typed AST β never eval |
| Capability plane | src/core/capability/ |
deny-by-default, autonomy gradient, supervisor co-sign |
| Pure kernel + engine | src/core/kernel/ |
pure decide(); 3-event effect protocol; crash-hole HALT; resume |
| Memory | src/core/memory/ |
episodic/semantic planes, provenance, untrusted-inbound quarantine |
| Compiler | NL β validated manifest, with capability monotonicity (prompt injection can't escalate) |
npm install
npm run typecheck # strict TS, clean
npm test # all tests pass (1 requires Ollama and skips without it)
npm run demo:ledger # canvas + timeline all read from one recorded run
npm run demo:resume # kill mid-run, resume β each irreversible effect runs EXACTLY once
npm run demo:e2e # a real 3-agent pipeline drives itself off its recorded run
npm run demo:compile # intent β compiled manifest β run; untrusted principal rejected
npm run demo:live # (needs KRELVAN_ANTHROPIC_KEY) a real model proposes a workflow,
# the compiler validates it within authority, the engine runs itBuilt & verified (typecheck clean Β· all tests pass Β· web build green):
- Event-sourced run store + SQLite durable store (real on-disk crash/resume)
- Identity, secrets & time (key rotation/revocation, secret broker, monotonic clock)
- Capability plane (deny-by-default, autonomy gradient, supervisor co-sign)
- Manifest + safe expressions (typed AST, never eval)
- Pure kernel + engine (3-event effect protocol, crash-hole HALT, resume)
- NLβmanifest compiler (capability monotonicity)
- Memory (multi-plane, provenance, untrusted-inbound gate)
- Full web UI β NL builder, agent canvas, runs, capabilities marketplace, MCP, approvals, schedules
- Capabilities marketplace β Git-registry-backed (live at
krelvan-registry), view/edit YAML source online, MCP connectors - Deploy capabilities β Vercel / Netlify / Cloudflare Pages / Render / Railway, gated as write-irreversible
- Failure-reasoning + auto-retry-with-fix β diagnose a failed run from its full history, rebuild a corrected agent, re-run
- 7 LLM providers behind one client (Anthropic/OpenAI/Gemini/Groq/Mistral/Ollama/OpenAI-compatible)
Every run is fully recorded and replayable. A run's state lives entirely in its recorded history, so you can open any run and scrub back through it step by step β exactly what the agent read, decided, and did β and export the whole record as a portable file. Because state lives in that record, a run that crashes mid-flight resumes safely, and irreversible effects (sending an email, calling a paid API) run exactly once, never twice.
Everything Krelvan persists lives in one place (KRELVAN_DATA_DIR, default ./data). Back it up
as a unit β several files are unrecoverable if lost:
| File | What it holds | If lost |
|---|---|---|
ledger.db (+ -wal, -shm) |
the run history β every run | the history is gone |
secret.key |
AES-256-GCM key for the secret store | all stored secrets + in-app model config decrypt to nothing |
signing-{owner,supervisor}.key or signing-*-ed25519.{key,pub} |
internal signing keys | existing runs can no longer be checked for integrity |
*.json, admin.auth, launcher.token |
agents/runs/registries, the admin credential, the launcher token | re-provision |
Snapshot the whole directory atomically (stop the process or use a consistent volume snapshot).
Do not back up ledger.db alone β without secret.key and the signing keys it is unusable.
Not yet built: PostgreSQL multi-tenant store adapter; asymmetric publisher signing for
third-party marketplace trust. Tracked in docs/PREMORTEM.md.
AGENTS.mdβ engineering rules & architecture (read before contributing)docs/AGENTIC_CAPABILITIES.mdβ researched catalog of genuinely-agentic capabilities + roadmapdocs/LEDGER_SPEC.mdβ the ledger contract & invariantsdocs/PREMORTEM.mdβ enumerated failure modes, each with a guard + statusregistry/β the capability marketplace registry (format + seed)
Apache-2.0. Self-host it, run it for yourself / your team / your clients, extend it, and build paid or free solutions on top β you own what you build.






