Skip to main content

Victor

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

PyPI version Python 3.11+ Fast Checks Tests Documentation License: Apache 2.0 Docker


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-ai
ollama pull qwen2.5-coder:7b
victor chat --provider ollama --model qwen2.5-coder:7b "Explain this repo"
Private, low-cost, air-gapped work
Cloud model pipx install victor-ai
export 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

The core rule is simple: interfaces compose framework APIs, framework APIs delegate to the service-first runtime, and domain packages plug in through SDK/public extension contracts.

---
title: Victor system overview
---
%%{init: {"theme":"base","themeVariables":{"primaryColor":"#E8EFF7","primaryTextColor":"#17324D","primaryBorderColor":"#456987","lineColor":"#456987","fontFamily":"Arial"}}}%%
flowchart TB
  C["Clients<br/>CLI · TUI · HTTP · MCP · VS Code"]
  F["Framework<br/>VictorClient · AgentFactory<br/>Agent · WorkflowEngine · StateGraph"]
  R["Runtime<br/>AgentOrchestrator facade<br/>chat, tool and session services"]
  I["Infrastructure<br/>providers · tools · storage · core"]
  V["External vertical definitions"]
  S["victor_contracts"]
  C -->|"call public APIs"| F
  F -->|"construct and delegate"| R
  R -->|"perform effectful operations"| I
  V -->|"declare capabilities"| S
  F -.->|"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. Further chat ownership inversion, expanded interrupt/resume semantics and RL package relocation remain explicitly labelled 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:

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

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.9.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for victor-ai 0.9.5
File Size Uploaded
victor_ai-0.9.5.tar.gz 7.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for victor-ai 0.9.5
File Interpreter ABI Platform
victor_ai-0.9.5-py3-none-any.whl Python 3 none any Details

Total release size: 15.5 MB

Release files / victor_ai-0.9.5.tar.gz

Download URL victor_ai-0.9.5.tar.gz
Size 7.4 MB
Tags Source
SHA-256 checksum
How to use checksums
9351aaae45f176ccc5cabf936f70280b3539467ab6a29b0c1a7145201944b9de
BLAKE2b-256 checksum
How to use checksums
2ea763cd93558b8bb18c0baed77954010e80cfe4864e4c674c2a758b6faf36ab
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 18, 2026.

Transparency log

Release files / victor_ai-0.9.5-py3-none-any.whl

Download URL victor_ai-0.9.5-py3-none-any.whl
Size 8.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
1e6692629ff5800394557f300ed8cc97b3a8bc88993ba61c1a50d0d712051753
BLAKE2b-256 checksum
How to use checksums
0ab04ea92813a558bbfed57b9298538fe965ca1349e2eae71b113937dd00f6bc
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 18, 2026.

Transparency log

Release history Release notifications | RSS feed

0.10.0

2 release files

This release

0.9.5 This release

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.8

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.6

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page