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 | pipx install victor-aiollama pull qwen2.5-coder:7bvictor chat --provider ollama --model qwen2.5-coder:7b "Explain this repo" |
Private, low-cost, air-gapped work |
| Cloud model | pipx install victor-aiexport ANTHROPIC_API_KEY=...victor chat --provider anthropic "Plan this refactor" |
Hosted provider access |
| Python API | pip install victor-ai |
Embedding Victor in applications |
| Docker | docker pull vjsingh1984/victor-ai:latest |
Isolated CLI/API runtime |
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.frameworkis the stable public contract for agents, tools, StateGraph, workflows, events, and extension surfaces.victor.agentis the internal runtime implementation behind that contract.victor.agent.servicesowns effectful runtime behavior throughChatService,ToolService,SessionService,ContextService,ProviderService, andRecoveryService.victor-contractsis 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:
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.pluginsentry 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
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.
Release files for victor-ai 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| victor_ai-0.10.0.tar.gz | 7.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| victor_ai-0.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.8 MB
Release files / victor_ai-0.10.0.tar.gz
| Download URL | victor_ai-0.10.0.tar.gz |
|---|---|
| Size | 7.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f93b4945d2a27c91402f658cd2dc693e084188749b565b3681c5d4fb99b4a6c
|
|
BLAKE2b-256 checksum How to use checksums |
e9d2514194b60f95bc9e3fb3bc497b324ef4249330167eed4dbc32d7643a1c16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logRelease files / victor_ai-0.10.0-py3-none-any.whl
| Download URL | victor_ai-0.10.0-py3-none-any.whl |
|---|---|
| Size | 8.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab14c34864742496e648dd8b3bdf82079027010e4fb3d1c65bf5dea1d5a3ca8b
|
|
BLAKE2b-256 checksum How to use checksums |
2c4d34d25928818849edc61b1d10a249ffc0059945b0063527ab7f3b28a888dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency log