AAnvio
Getting Started

Quick Start

Install Anvio, set up a workspace, and chat with an agent in about 5 minutes.

4 min read

This walks through Anvio's own "5-Minute Quick Start" from the README: install, workspace, optional API key, chat. No Docker, no database setup, no login screen required.

Purpose

Get a working anvio chat session running as fast as possible, using the default Level 1 setup (filesystem sessions, mock mode or a single API key). Power-user features (SQLite sessions, vendor OAuth, gateway, PostgreSQL) come later — see Installation and Requirements for the full picture.

Prerequisites

  • Node.js >= 20
  • pnpm >= 9 (only needed for the developer/clone install path)
  • A model API key if you want real completions (optional — mock mode works without one)

Steps

Install

Option A — one-liner (recommended for end users)

curl -fsSL https://raw.githubusercontent.com/viantonugroho11/Anvio/main/scripts/install.sh | bash
source ~/.anvio/env

This clones Anvio into ~/.anvio/app, builds it, creates a default workspace at ~/.anvio/workspace, and symlinks the anvio binary into ~/.local/bin.

Option B — from a clone (contributors)

git clone https://github.com/viantonugroho11/Anvio.git
cd Anvio
pnpm install && pnpm build
pnpm anvio --help

See Installation for a full comparison of both paths.

Set your workspace

anvio init ~/my-agents
export ANVIO_WORKSPACE=~/my-agents   # or ./workspace when developing in-repo
anvio workspace validate

anvio init scaffolds the full workspace/ directory tree — agents/, personas/, skills/, souls/, tools/gateway.yaml, providers/routing.yaml, and more. anvio workspace validate checks the structure is sound before you rely on it.

Add a model API key (optional)

Without a key, Anvio runs in mock mode — it echoes your message back so you can confirm the CLI, workspace, and agent wiring all work. With a key, you get real completions and LLM-powered learning (skill evolution + session summaries).

This step is for the local runtime (Anvio's built-in multi-turn tool loop). If you want to run agents through Claude Code, Cursor, Codex, or Antigravity using your existing subscription instead of API billing, skip this and go straight to anvio setup-token — see Runtime OAuth.

export ANTHROPIC_API_KEY=sk-ant-...   # Claude (recommended — also powers the learning loop)
# or
export DEEPSEEK_API_KEY=sk-...        # DeepSeek
# or
export OPENROUTER_API_KEY=sk-or-...   # 100+ models via one key

Copy .env.example to .env in the repo root for the complete list of supported provider variables.

Chat with an agent

anvio agents list
anvio chat --agent architect

architect is a bundled example agent. Agents are Markdown files under workspace/agents/ — see Personas for how to define your own.

Run a one-shot task

anvio run architect "List trade-offs of event-driven vs request-response architecture"

anvio run executes a single task without an interactive session. Add --detach to run it in the background (requires the worker — see below).

That's it — you're done with the required steps. Everything below is optional, power-user territory.

Optional: enable SQLite sessions

Default storage is JSONL files under workspace/sessions/. For Hermes-style persistence and FTS5 full-text message search, add this to workspace/anvio.yaml:

spec:
  storage:
    provider: sqlite
    basePath: .

Sessions then persist in workspace/state.db. This is still embedded SQLite — no separate database server, no Docker.

Optional: background/detached runs

anvio run architect "Refactor the auth module" --detach
anvio sessions list
anvio logs <sessionId>
anvio stop <sessionId>
anvio session export <sessionId> --md

Detached runs need the worker running:

ANVIO_WORKSPACE=./workspace pnpm --filter @anvio/worker dev

Or, for the unified single-daemon setup (recommended over running worker/API/gateway separately):

anvio gateway start

See Data Flow for how detached runs move through the worker and event bus.

Common mistakes

  • Setting ANTHROPIC_API_KEY while using the claude-code runtime. This shadows OAuth and causes the agent to bill API credits instead of your Claude subscription. Use one or the other per agent, not both.
  • Forgetting ANVIO_WORKSPACE. If unset, commands fall back to ./workspace relative to your current directory — easy to get confused about which workspace you're editing. Always export ANVIO_WORKSPACE=<path> in a given shell session, or configure it per-project.
  • Expecting --detach to work without a running worker. Detached runs are picked up by @anvio/worker (or the unified gateway) — a run submitted with no worker running will queue but never execute.
  • Assuming a database is required. It is not, at Level 1. SQLite, PostgreSQL, and Qdrant are all opt-in.

References

Edit on GitHub

Last updated on

On this page