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 —
applystores 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_searchandread_file, plus any@vesper.toolfunctions in yourentryPoint. The manifest'stoolslist is the whitelist the model may call. - Memory —
scope: sessionkeeps a thread per session id (minted assess_…and returned on the result if you don't pass one);scope: projectkeeps one persistent thread per agent. History older thanretentionDaysis 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
maxCostPerRunstops withBudgetExceededError; crossingalertAtflagsRunResult.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.dband surfaced viavesper 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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vesper_ai-1.0.0.tar.gz.
File metadata
- Download URL: vesper_ai-1.0.0.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19cd709868c1adef848fc7280b4d26a336174e688c2905cbe5707a23619ef92b
|
|
| MD5 |
718580523b2bd752df319ad299227d4d
|
|
| BLAKE2b-256 |
43e0777db832a0e65dd7ac505dce4856fa5aaabfcbaab02cd069f5ece0b3fdfd
|
Provenance
The following attestation bundles were made for vesper_ai-1.0.0.tar.gz:
Publisher:
publish.yml on Vesper-Agent/vesper-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vesper_ai-1.0.0.tar.gz -
Subject digest:
19cd709868c1adef848fc7280b4d26a336174e688c2905cbe5707a23619ef92b - Sigstore transparency entry: 2546360452
- Sigstore integration time:
-
Permalink:
Vesper-Agent/vesper-ai@0257992391f41e85b3ee4d8e6ecd9c55d2175246 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Vesper-Agent
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0257992391f41e85b3ee4d8e6ecd9c55d2175246 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vesper_ai-1.0.0-py3-none-any.whl.
File metadata
- Download URL: vesper_ai-1.0.0-py3-none-any.whl
- Upload date:
- Size: 26.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db8878061f2e8d79cab6650234cea6e62da09539857f5f26d8281ba9d531d4a0
|
|
| MD5 |
26d86c38a59fdf645c3316f0b99a9f9e
|
|
| BLAKE2b-256 |
f55d79536e1a32042ead6f3bf00924e0eec6464d5b0abffe8205d905c3809ed4
|
Provenance
The following attestation bundles were made for vesper_ai-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on Vesper-Agent/vesper-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vesper_ai-1.0.0-py3-none-any.whl -
Subject digest:
db8878061f2e8d79cab6650234cea6e62da09539857f5f26d8281ba9d531d4a0 - Sigstore transparency entry: 2546360544
- Sigstore integration time:
-
Permalink:
Vesper-Agent/vesper-ai@0257992391f41e85b3ee4d8e6ecd9c55d2175246 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Vesper-Agent
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0257992391f41e85b3ee4d8e6ecd9c55d2175246 -
Trigger Event:
push
-
Statement type: