Victor
A contract-first agentic AI framework for building reliable agents across local and cloud models.

Victor gives you a typed Python framework, a service-first agent runtime, and a contract-first plugin ecosystem for building agents that can reason, call tools, run workflows, coordinate teams, and operate against project-local code intelligence.
It is designed for teams that need agent systems to be testable, extensible, observable, and portable across Anthropic, OpenAI-compatible providers, Gemini, Bedrock, local models, and air-gapped environments.
Why Victor
| Capability |
What it gives you |
| Service-first runtime |
Focused service interfaces for chat, tools, sessions, context, provider routing, and recovery. |
| StateGraph workflows |
Compile definitions into one execution engine for tasks, streaming, conditional routing, teams and checkpoints. |
| Verified native paths |
Optional Rust acceleration with required CI parity checks against Python behavior. |
| Local and cloud models |
Use cloud providers for capability, local providers for privacy/cost, and provider-specific caching strategies for performance. |
| Tool-rich execution |
Compose filesystem, git, shell, code search, graph, verification, Docker, web, testing, and refactoring tools. |
| Contract-first plugins |
Put domain behavior in sibling victor-* packages through victor-contracts and public framework extension contracts. |
| Project code intelligence |
Keep graph indexes, semantic search, conversations, and project memory in project-local state. |
Quick Start
| Path |
Commands |
Best for |
| Local model |
uv tool install victor-ai``victor init``victor chat "Explain this repo" | Zero-config local inference: victor init detects a running Ollama / llama.cpp / InferFlux server, pulls qwen2.5-coder:7b if needed (≈4.7 GB download on first run), and — only if nothing is installed — offers to download and start a llama.cpp server for you (≈4.4 GB GGUF). Skip with victor init --no-quickstart |
| Local model (manual) |
uv tool install victor-ai``ollama pull qwen2.5-coder:7b``victor chat "Explain this repo" |
You manage the server yourself (Ollama is the default profile — no provider flags needed) |
| Cloud model |
uv tool install victor-ai``export ANTHROPIC_API_KEY=...``victor chat --provider anthropic "Plan this refactor" |
Hosted provider access |
| Homebrew (macOS) |
brew tap anvai-labs/tap https://github.com/anvai-labs/homebrew-tap``brew install anvai-labs/tap/victor |
Mac-dev default channel (formula auto-tracks PyPI releases) |
| Python API |
pip install victor-ai |
Embedding Victor in applications |
| Docker |
docker pull vjsingh1984/victor-ai:latest |
Isolated CLI/API runtime |
Use Victor's tools + code intelligence from YOUR agent (MCP)
Victor ships an MCP server — expose its 34 tools and the intent-tier codegraph
(structure + intent search over your indexed codebase) to Claude Code, Cursor,
Claude Desktop, Cline, or any MCP client:
claude mcp add victor -- victor mcp # Claude Code
# Cursor: ~/.cursor/mcp.json -> {"mcpServers": {"victor": {"command": "victor", "args": ["mcp"]}}}
Sandboxed by default (the same fail-closed posture as Victor's own agent).
See docs/reference/api/mcp-server.md for per-client setup and
victor mcp list-tools to preview the inventory.
Give Your Agent Durable Memory
Victor supports ProximaDB as an optional
backend for durable code memory. Index any repository with the shared victor-codegraph
chunker and get semantic recall ("where do we validate JWTs?") plus call-graph queries
("who calls parse_jwt?") that persist across sessions:
Quickstart: Durable Code Memory with ProximaDB — setup, indexing, semantic recall and graph queries.
Victor's embedded ProximaDB backends for project code intelligence are experimental,
flag-gated previews — SQLite/LanceDB remain the defaults. The correlated graph+vector
code-context backend (one entity = row + graph node + vector, TD-11/12/13) has
implemented opt-in correlation and routing; benchmark, service-mode and default-graduation
work remains — see the roadmap and
ProximaDB as the CCG Backend.
Python API
import asyncio
from victor.framework import Agent, EventType, ToolSet
async def main():
async with await Agent.create(
provider="anthropic",
tools=ToolSet.default(),
) as agent:
result = await agent.run("Explain the architecture of this codebase")
print(result.content)
async for event in agent.stream("Review the changed files"):
if event.type == EventType.CONTENT:
print(event.content, end="", flush=True)
asyncio.run(main())
StateGraph Workflows
import asyncio
from typing import TypedDict
from victor.framework import END, StateGraph
class ReviewState(TypedDict):
query: str
findings: list[str]
async def inspect(state: ReviewState) -> ReviewState:
return {**state, "findings": ["example finding"]}
graph = StateGraph(ReviewState)
graph.add_node("inspect", inspect)
graph.add_edge("inspect", END)
graph.set_entry_point("inspect")
result = asyncio.run(
graph.compile().invoke({"query": "review this module", "findings": []})
)
print(result.state["findings"])
Architecture
Each box below owns a different concern. Items inside one box are complementary entry points or
services, not competing implementations.
---
title: Victor system overview
---
%%{init: {"theme":"base","themeVariables":{"primaryColor":"#E8EFF7","primaryTextColor":"#17324D","primaryBorderColor":"#456987","lineColor":"#456987","fontFamily":"Arial"}}}%%
flowchart TB
subgraph C["Clients"]
CS["CLI · TUI · HTTP · MCP · VS Code"]
end
subgraph F["Framework · public API"]
VC["VictorClient<br/>application/session API"]
AG["Agent · AgentFactory<br/>agent lifecycle"]
WF["WorkflowEngine · StateGraph<br/>workflow authoring"]
end
subgraph R["Runtime · internal implementation"]
OR["AgentOrchestrator<br/>composition facade"]
SV["Chat · tool · session services<br/>owned behavior"]
WR["Workflow runtime<br/>compiler · executor · CompiledGraph"]
end
subgraph I["Infrastructure"]
IN["providers · tools · storage · core"]
end
V["External vertical definitions"]
S["victor_contracts<br/>portable definitions"]
CS -->|"call"| VC
CS -->|"create or embed"| AG
CS -->|"submit workflows"| WF
VC -->|"delegate"| OR
AG -->|"construct and delegate"| OR
WF -->|"compile and execute"| WR
OR -->|"delegate behavior"| SV
SV -->|"use"| IN
WR -->|"use"| IN
V -->|"import only"| S
AG -.->|"consume contracts"| S
WF -.->|"consume contracts"| S
The canonical architecture guide explains the boundaries and execution paths.
Workflow execution and streaming share CompiledGraph; the former BFS walker has been removed.
The unified streaming chat loop is implemented. ChatService now owns the turn frame and the
streaming cluster consumes typed planning and execution-control capabilities. Broader runtime-state
inversion, expanded interrupt/resume semantics and RL relocation remain proposal targets.
The framework/plugin split is:
victor.framework is the stable public contract for agents, tools, StateGraph, workflows, events, and extension surfaces.
victor.agent is the internal runtime implementation behind that contract.
victor.agent.services owns effectful runtime behavior through ChatService, ToolService, SessionService, ContextService, ProviderService, and RecoveryService.
victor-contracts is the definition-layer contract for external verticals and plugins.
- Sibling
victor-* packages own domain behavior such as coding, DevOps, RAG, research, data analysis, and investment workflows.
Read the published documentation for navigation and searchable API references.
Detailed references:
- Architecture overview
- Diagram map and refresh audit
- contracts boundary
- State-passed architecture
Plugin Ecosystem
External and first-party domain packages should use victor-contracts and public framework extension contracts. The root framework stays generic; domain-specific behavior belongs in plugins and vertical packages.
| Package |
Focus |
victor-coding |
Code review, editing, test generation, language tooling |
victor-devops |
Infrastructure, containers, CI/CD, cloud operations |
victor-rag |
Ingestion, retrieval, hybrid search, grounded answers |
victor-dataanalysis |
Data cleaning, statistics, dataframe analysis, visualization |
victor-research |
Source research, synthesis, fact checking |
victor-invest |
Investment research workflows and dashboard/API integration |
victor-registry |
Package marketplace and registry metadata |
Plugin rules:
- Use the
victor.plugins entry point as the canonical discovery seam.
- Register capabilities through
VictorPlugin.register(context).
- Import from
victor_contracts, victor.framework.extensions, or documented public APIs.
- Do not import
victor.agent.* or private root runtime internals from external packages.
Use Cases
- Build local or cloud-backed coding agents that can inspect files, search graphs, run tests, and produce review findings.
- Compose workflow agents with typed StateGraph nodes, deterministic handoffs, and resumable execution.
- Run tool-using assistants through CLI, TUI, HTTP API, MCP, or embedded Python.
- Build domain plugins without copying framework internals into vertical packages.
- Keep project code intelligence local while preserving global preferences, learning, and provider settings separately.
State and Code Intelligence
Victor separates global and project state, with a dedicated database for undo history:
| Scope |
Location |
Purpose |
| Global database |
~/.victor/victor.db |
Settings, API keys, profiles, RL outcomes, tool/model preferences, cross-project patterns |
| Project database |
./.victor/project.db |
Graph nodes/edges, conversations, project sessions, entity memory, change tracking |
| Undo database |
./.victor/undo.db |
File-edit undo/redo history, isolated from indexer write locks |
Project code intelligence is derived, rebuildable state. Graph indexes, vector indexes, file watcher state, and .victor/ runtime artifacts should not become source-of-truth release artifacts.
Development
Follow Development Setup for the environment, optional extras,
native extension build, and
documentation preview. The
PR workflow defines verification and branch conventions.
Use dependency maintenance to choose deployment
extras, refresh resolved requirements, and build the core, MCP, native or full container target.
Documentation
- Documentation map
- Canonical guide index
- Getting Started
- Durable Code Memory with ProximaDB
- Guides
- Reference
- Development
- Architecture
- Roadmap
- Stage C reassessment and remaining work
Contributing
Start with CONTRIBUTING.md and the architecture overview; see the development docs for setup, code style, and the PR workflow. Keep changes scoped, prefer public framework/SDK contracts over internal imports, and update docs/tests when public behavior changes.
License
Apache License 2.0. See LICENSE.