Skip to main content

Vesper

Infrastructure for managing AI agents in production. Vesper lets you declare an agent in a YAML manifest, version it like code, and run it — from the CLI or a Python SDK — with tool-calling, persistent memory, budget enforcement, and an audit trail.

Supports OpenAI, Anthropic (Claude), and Google (Gemini) models out of the box.


Install

pip install vesper-ai

The package installs as vesper-ai, but you import and run it as vesper (import vesper, vesper ...).

Set your provider API key in the environment, or drop a .env file in your project root (Vesper auto-loads it):

OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GEMINI_API_KEY=...

Quickstart (CLI)

1. Initialize the local state directory (~/.vesper):

vesper init

2. Write a manifest — agent.yml:

apiVersion: vesper/v1
kind: Agent

name: researcher
model: gpt-4o-mini
entryPoint: examples/agent.py     # loads your @vesper.tool functions

tools:
  - web_search                    # built-in
  - get_stock_price               # custom, from entryPoint

memory:
  scope: project                  # persistent thread for this agent
  retentionDays: 30

budget:
  maxCostPerRun: 0.05
  alertAt: 0.04

3. Validate & deploy (each apply is versioned; an unchanged apply is skipped):

vesper validate -f agent.yml
vesper apply -f agent.yml

4. Run it:

vesper run researcher --input "What is the price of AAPL?"
AAPL is trading at $187.42.
cost $0.000041 · 146 in / 32 out · session sess_a91f...

5. Inspect and manage:

vesper list                       # all deployed agents + versions
vesper history researcher         # version history
vesper show researcher            # active config as JSON
vesper runs researcher            # run history: cost, tokens, status, time
vesper delete researcher --yes    # remove agent + versions + memory + audit

run options

vesper run researcher --input "..." --session proj-42   # reuse a session (stateful memory)
vesper run researcher --input-file ./question.txt       # read input from a file
vesper run researcher --input "..." --max-cost 0.20     # override the manifest budget for this run

Quickstart (SDK)

Define tools with the @vesper.tool decorator:

# examples/agent.py
import vesper

@vesper.tool(description="Get the current stock price for a ticker symbol")
def get_stock_price(ticker: str) -> str:
    return f"{ticker.upper()} is trading at $187.42"

Load a deployed agent and run it:

import vesper

agent = vesper.load("researcher")          # active manifest from the registry
result = agent.run("What is the price of AAPL?")

print(result.content)
print(result.cost, result.prompt_tokens, result.completion_tokens)

Run straight from a YAML file, or register tools programmatically:

from vesper import Agent, tool

@tool(description="Look up an order by id")
def get_order(order_id: str) -> dict:
    return {"id": order_id, "status": "shipped"}

agent = Agent.from_manifest("agent.yml", tools=[get_order])
print(agent.run("Where is order 1234?").content)

Stateful, multi-turn memory via sessions:

first = agent.run("What is RAG?", session="proj-42")
agent.run("Compare it to fine-tuning", session="proj-42")   # sees the first turn

Inspect past runs:

for r in agent.runs():
    print(r.run_id, r.status, r.cost, r.created_at)

How it works

  • Manifests & versioning — apply stores each manifest in SQLite (~/.vesper/registry.db); re-applying a changed manifest bumps its version, an identical one is a no-op.
  • Providers — the model name routes to a provider (gpt-* → OpenAI, claude-* → Anthropic, gemini-* → Google). Any model these providers offer will run.
  • Tools — built-in web_search and read_file, plus any @vesper.tool functions in your entryPoint. The manifest's tools list is the whitelist the model may call.
  • Memory — scope: session keeps a thread per session id (minted as sess_… and returned on the result if you don't pass one); scope: project keeps one persistent thread per agent. History older than retentionDays is pruned; long histories are truncated oldest-first. Stored in ~/.vesper/memory.db.
  • Budget (FinOps) — costs are tracked per run from a curated pricing table. A run that would exceed maxCostPerRun stops with BudgetExceededError; crossing alertAt flags RunResult.alerted. If a model has no pricing entry, it still runs — unless a budget is set, in which case the run is refused (a cap can't be enforced without a price).
  • Audit — every run (completed or budget-aborted) is logged to ~/.vesper/audit.db and surfaced via vesper runs / agent.runs().

Model pricing in model_costs.json is derived from LiteLLM's model_prices_and_context_window.json (MIT licensed), filtered to the supported providers.


Not in V1

The apiVersion field gates what a release supports. V1 (vesper/v1) is single-agent only. Planned for a future version: agent fleets / task graphs (kind: AgentFleet), guardrails, evals / CI gates, memory summarization strategies, and a cloud (Postgres) backend. Manifests using these are rejected with a clear message today.

Metadata

Release files for vesper-ai 1.0.0

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

Source distribution (sdist)

Source distribution for vesper-ai 1.0.0
File Size Uploaded Provenance
vesper_ai-1.0.0.tar.gz 23.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for vesper-ai 1.0.0
File Interpreter ABI Platform
vesper_ai-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 49.2 kB

Release files / vesper_ai-1.0.0.tar.gz

Download URL vesper_ai-1.0.0.tar.gz
Size 23.0 kB
Tags Source
SHA-256 checksum
How to use checksums
19cd709868c1adef848fc7280b4d26a336174e688c2905cbe5707a23619ef92b
BLAKE2b-256 checksum
How to use checksums
43e0777db832a0e65dd7ac505dce4856fa5aaabfcbaab02cd069f5ece0b3fdfd
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 Aug 21, 2026.

Transparency log

Release files / vesper_ai-1.0.0-py3-none-any.whl

Download URL vesper_ai-1.0.0-py3-none-any.whl
Size 26.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db8878061f2e8d79cab6650234cea6e62da09539857f5f26d8281ba9d531d4a0
BLAKE2b-256 checksum
How to use checksums
f55d79536e1a32042ead6f3bf00924e0eec6464d5b0abffe8205d905c3809ed4
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 Aug 21, 2026.

Transparency log

Security for vesper-ai 1.0.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for vesper_ai-1.0.0.tar.gz

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 Aug 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

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