AAnvio
Reference ArchiveSource Docs

Workspace Architecture

Everything in Anvio lives in a **portable workspace** — backup, git-version, move, and run on another machine without database migration.

3 min read

This is a migrated reference document from the original Anvio source repo. Content is preserved as-is; canonical documentation lives in the sections above in the sidebar.

Original path: docs/35-workspace-architecture.md

Everything in Anvio lives in a portable workspace — backup, git-version, move, and run on another machine without database migration.

Directory Layout

workspace/
├── anvio.yaml              # Workspace configuration (required)
├── agents/                 # Agent definitions
├── souls/                  # Persistent agent identities
├── personas/               # Persona templates (legacy/bootstrap)
├── skills/                 # Installed skills
├── goals/                  # Persistent goals
├── memory/                 # Memory provider data (filesystem default)
├── sessions/               # Session store (filesystem default)
├── kanban/                 # Kanban boards and tasks
├── automations/            # Automation definitions + scheduler state
├── blueprints/             # User-installed workflow templates
├── hooks/                  # Event hook handlers
├── credentials/            # Encrypted credential pools
├── mcp/                    # MCP server configurations
├── tools/                  # Custom tool definitions
├── providers/              # Routing and provider overrides
├── batch/                  # Batch job state and results
├── audit/                  # Execution and hook audit logs
└── plugins/                # Reserved; not read (no plugin system — ROADMAP T-058)

Portability Guarantees

OperationSupportedNotes
BackupYesCopy or git clone entire workspace/
Git versionYesAll configs are human-readable YAML/JSON
Move machineYesNo DB migration in Level 1
Run elsewhereYesSame anvio.yaml, same behavior

Configuration Hierarchy

Rendering diagram…

Resolution order (last wins):

  1. packages/platform defaults
  2. configs/ bundled agents, skills, personas, blueprints
  3. workspace/ user definitions

anvio.yaml Extensions (Target)

apiVersion: anvio.io/v1
kind: Workspace
metadata:
  name: default
  version: "2.0.0"
spec:
  auth:
    enabled: false
  storage:
    provider: filesystem
    basePath: .
  memory:
    provider: filesystem
    basePath: memory
  events:
    provider: local
  runtime:
    default: local
  execution:
    defaultTimeoutMs: 30000
    networkEnabled: false
  credentials:
    encryption: enabled
  defaultAgent: architect
  defaultUserId: local-user
  defaultSoul: architect-soul

Path Resolution

All paths in workspace configs are relative to workspace root:

spec:
  memory:
    basePath: memory          # → workspace/memory/
  storage:
    basePath: .               # → workspace/

Environment variable interpolation: $\{VAR_NAME\} resolved at load time.

Multi-Workspace Support (Future)

anvio --workspace ~/projects/work workspace/
anvio --workspace ~/personal workspace/

Each workspace is fully isolated.

Git Workflow

Recommended .gitignore for workspace:

# Secrets
credentials/encrypted/
.env

# Runtime state
sessions/
automations/_state/
batch/
audit/
memory/sessions/

# Keep structure
!credentials/.gitkeep
!sessions/.gitkeep

Safe to commit:

  • agents/, souls/, goals/, skills/
  • kanban/, automations/*.yaml, blueprints/
  • hooks/, providers/routing.yaml
  • anvio.yaml

Migration Between Levels

FromToAction
Level 1 (filesystem)Level 2 (SQLite)anvio migrate --memory sqlite
Level 1Level 3 (PostgreSQL)anvio migrate --all postgresql
AnyAnyProvider migrate() port method

No workspace restructure required — only config change + optional data migration.

Extension Guide

Status (2026-10-25): items below that mention a plugin or plugin manifest describe design intent. Anvio has no plugin system (ROADMAP T-058); extending this subsystem today means changing the package code.

  1. Add new top-level directories via plugin manifest
  2. Register loaders in packages/workspace/src/workspace-loader.ts
  3. Document new paths in this file

Operational Runbook

ScenarioAction
Fresh workspaceanvio init creates scaffold + starter YAML configs
Validate workspaceanvio workspace validate
Export workspacetar czf anvio-workspace.tar.gz workspace/
Import workspaceExtract + anvio workspace validate

Files Created by anvio init

FilePurpose
anvio.yamlWorkspace configuration
providers/routing.yamlModel routing & fallback
mcp/servers.yamlMCP server registry
hooks/hooks.yamlEvent hook registry

Package Boundaries

  • Loader: packages/workspace/src/workspace-loader.ts
  • Schema: packages/core/src/schemas/workspace.schema.ts
  • Init CLI: apps/cli/src/main.ts (anvio init, anvio workspace validate)
Edit on GitHub

Last updated on

On this page