[
  {
    "group": "Get started",
    "pages": [
      {
        "slug": "getting-started",
        "title": "Getting Started",
        "description": "Install Leviath, configure a provider interactively or headlessly for CI, and run your first agent, in four steps."
      },
      {
        "slug": "agent-catalog",
        "title": "Agent catalog",
        "description": "The seven pre-built agents Leviath ships, what each is for, how to install them, and the lev run command for each."
      },
      {
        "slug": "comparison",
        "title": "Where Leviath sits",
        "description": "Where Leviath sits among other agent tools, and which are worth running alongside it rather than instead of it."
      }
    ]
  },
  {
    "group": "Concepts",
    "pages": [
      {
        "slug": "overview",
        "title": "Overview",
        "description": "How the pieces of Leviath fit together: blueprints, stages, context regions, tools, and the shared world that runs them."
      },
      {
        "slug": "first-agent",
        "title": "Build your first agent",
        "description": "Build a release-notes agent from an empty directory: stages, models, context regions, an error edge, and a structured answer."
      },
      {
        "slug": "daemon",
        "title": "The daemon",
        "description": "The background daemon that owns every run, so agents survive a closed terminal and share one process."
      },
      {
        "slug": "engine",
        "title": "The agent engine",
        "description": "How one process runs many agents at once: each is a row of data in an Entity Component System, so a waiting agent costs almost nothing."
      },
      {
        "slug": "agents",
        "title": "Agent blueprints",
        "description": "The agent.leviath blueprint format: the TOML defining an agent's stages, models, tools, and context layout."
      },
      {
        "slug": "context",
        "title": "Structured context",
        "description": "How structured context regions keep an agent coherent across hundreds of tool calls, where a flat message list drifts."
      },
      {
        "slug": "stages",
        "title": "Multi-stage workflows",
        "description": "Split an agent into stages so each phase of a task gets its own model, tools, and context."
      },
      {
        "slug": "outputs",
        "title": "Final outputs",
        "description": "Get a structured answer out of a run with output formats, schemas, and lev result, instead of scraping its logs."
      },
      {
        "slug": "sub-agents",
        "title": "Sub-agents & fan-out",
        "description": "Start child agents and fan work out across them, so many small jobs run at once."
      },
      {
        "slug": "interaction",
        "title": "Human-in-the-loop",
        "description": "What to do when a run shows waiting: answer agent questions, tool approvals, and checkpoints with lev respond, the dashboard, or the API."
      },
      {
        "slug": "security",
        "title": "Security & sandboxing",
        "description": "Sandboxed execution, tool permissions, and taint tracking, for running a blueprint you did not write."
      }
    ]
  },
  {
    "group": "Reference",
    "pages": [
      {
        "slug": "configuration",
        "title": "Configuration",
        "description": "Every config.toml key with its type and default, the env vars that fill them when the file is empty, and the published JSON schema."
      },
      {
        "slug": "api",
        "title": "HTTP API",
        "description": "Every REST route and WebSocket stream `lev serve` exposes, with auth, payload shapes, and the published OpenAPI spec."
      },
      {
        "slug": "cli",
        "title": "CLI reference",
        "description": "Every lev command and flag, which ones speak --json for scripts and CI, and how to read lev ps status and wait reasons."
      },
      {
        "slug": "tools",
        "title": "Built-in tools",
        "description": "The built-in tool catalog every agent can advertise, and how a stage decides which ones the model may call."
      },
      {
        "slug": "mcp",
        "title": "MCP tool servers",
        "description": "Connect Leviath to Model Context Protocol servers over stdio or HTTP, giving agents tools beyond the built-ins."
      },
      {
        "slug": "providers",
        "title": "Providers",
        "description": "Configure Anthropic, OpenAI, Google, OpenRouter, Ollama, or Claude Code from a key or an env var, and pick which model each stage uses."
      },
      {
        "slug": "scripting",
        "title": "Rhai scripting",
        "description": "The Rhai extension points, providers, tools, regions, hooks, and validators, and the sandbox each one runs in."
      },
      {
        "slug": "rhai-providers",
        "title": "Rhai providers",
        "description": "Teach Leviath any HTTP model API with a Rhai script, without waiting for it to be added upstream."
      },
      {
        "slug": "rhai-regions",
        "title": "Rhai regions",
        "description": "Write a context region's behaviour in Rhai when none of the built-in kinds does what you want."
      },
      {
        "slug": "rhai-tools",
        "title": "Rhai tools & policy rules",
        "description": "Declare new agent tools in Rhai, and write policy rules deciding whether a tool call may fire."
      },
      {
        "slug": "rhai-validators",
        "title": "Rhai output validators",
        "description": "Teach Leviath what \"valid\" means for your own output format, so a bad answer is caught and retried instead of shipped."
      },
      {
        "slug": "rhai-hooks",
        "title": "Rhai stage hooks",
        "description": "Run your own Rhai at seven points in an agent's lifecycle to seed a stage, gate a call, or reshape an answer."
      },
      {
        "slug": "agent-client-protocol",
        "title": "Agent Client Protocol",
        "description": "Serve an agent over the Agent Client Protocol on stdio, so an editor or orchestrator can drive it as a child process."
      },
      {
        "slug": "observability",
        "title": "Observability",
        "description": "Export traces, metrics, and logs over OpenTelemetry so your dashboards can answer which run is stuck."
      },
      {
        "slug": "embedding",
        "title": "Embedding",
        "description": "Run the Leviath runtime inside your own Rust process with the leviath crate, with no CLI, daemon, or config file."
      }
    ]
  },
  {
    "group": "Guides",
    "pages": [
      {
        "slug": "dashboard",
        "title": "Dashboard",
        "description": "The `lev dash` terminal UI for watching a fleet of runs, answering their questions, and steering them."
      },
      {
        "slug": "troubleshooting",
        "title": "Troubleshooting",
        "description": "Common snags organised by symptom, starting with what `lev doctor` tells you."
      },
      {
        "slug": "glossary",
        "title": "Glossary",
        "description": "Every term the Leviath docs use in a particular way, defined in one place."
      },
      {
        "slug": "packaging",
        "title": "Packaging blueprints",
        "description": "Bundle a blueprint into a .leviath-bundle, install one, and share it without a hosted registry."
      },
      {
        "slug": "releases",
        "title": "Releases and channels",
        "description": "How the alpha, beta, and stable channels work, and why stable ships the byte-for-byte alpha build."
      }
    ]
  },
  {
    "group": "Integrations",
    "pages": [
      {
        "slug": "integrations",
        "title": "Where Leviath fits",
        "description": "The four ways to drive Leviath from a tool you already use, and how to choose between them."
      },
      {
        "slug": "gas-city",
        "title": "Gas City",
        "description": "Wiring Leviath into Gas City, the multi-agent orchestration SDK, as the coding-agent backend behind its workflows."
      },
      {
        "slug": "containers",
        "title": "Containers and CI",
        "description": "Running Leviath as a container-per-job step, and the one thing to get right, that `lev run` returns before the agent finishes."
      },
      {
        "slug": "work-queues",
        "title": "External work queues",
        "description": "Poll lev ps --all --json to tell a live run from a dead one, without leaking slots or cancelling work that is still going."
      }
    ]
  }
]