Open-source agentic framework for revenue intelligence. 6 AI agents that extract, resolve, compute, detect, and explain your business data.
Project description
Vesh Agents
Open-source agentic framework for revenue intelligence
6 AI agents that extract, resolve, compute, detect, and explain your business data.
What is Vesh Agents?
Vesh Agents is an agentic AI framework for business data analysis, starting with SaaS revenue intelligence. Built on the OpenAI Agents SDK, it provides:
- 6 specialized agents that work together as a pipeline
- BYOM (Bring Your Own Model) — use Claude, DeepSeek, GPT, Llama, or any LiteLLM-compatible model
- Entity resolution — automatically match records across Stripe, Postgres, CSV, and more
- SaaS metric computation — MRR, churn, ARPU, NRR, Quick Ratio out of the box
- Anomaly detection — statistical methods find unusual patterns in your metrics
- CLI + MCP server — use from terminal or integrate with Cursor, OpenCode, Claude Desktop
Quickstart
pip install vesh-agents
Analyze a CSV in 30 seconds
Use with any LLM (BYOM)
from agents import Runner
from vesh_agents.verticals.revenue import create_revenue_orchestrator
# Use Claude, DeepSeek, GPT, or any LiteLLM model
orchestrator = create_revenue_orchestrator(model="litellm/anthropic/claude-sonnet-4-20250514")
result = await Runner.run(
orchestrator,
"Analyze revenue from examples/sample_data.csv. Why is churn increasing?"
)
print(result.final_output)
Connect to live Stripe
export STRIPE_API_KEY=sk_live_...
vesh analyze stripe
Architecture
┌──────────────────────────────────────────────────────────────┐
│ Vesh Orchestrator Agent │
│ Coordinates the pipeline based on natural language queries │
└──────────┬───────────┬──────────┬──────────┬────────────────┘
│ │ │ │
┌──────▼──┐ ┌─────▼───┐ ┌───▼────┐ ┌──▼──────┐ ┌────────┐
│ Data │ │ Entity │ │ Metric │ │Anomaly │ │Insight │
│Connector│→ │Resolver │→│Computer│→│Detector│→│Reasoner│
└─────────┘ └─────────┘ └────────┘ └────────┘ └────────┘
│ │ │ │ │
CSV/Stripe/ Blocking MRR/Churn Z-score BYOM LLM
Postgres Scoring ARPU/NRR Rate-of- Explanation
Clustering Quick Ratio change
Each agent has its own tools and instructions. The orchestrator delegates to specialists via handoffs. All agents use your chosen LLM model.
Available Agents
| Agent | Role | MCP Tools |
|---|---|---|
| DataConnector | Extract data from sources | import_csv, extract_stripe, extract_postgres |
| EntityResolver | Match records across sources | resolve_entities |
| MetricComputer | Compute SaaS metrics | compute_metrics, list_metrics |
| AnomalyDetector | Find statistical anomalies | detect_anomalies |
| InsightReasoner | Explain root causes | explain_anomaly |
| Vesh Orchestrator | Coordinate the pipeline | analyze_csv (full pipeline) |
SaaS Metrics Computed
| Metric | Description |
|---|---|
| MRR | Monthly Recurring Revenue |
| New MRR | Revenue from new subscriptions |
| Expansion MRR | Revenue increase from upgrades |
| Contraction MRR | Revenue decrease from downgrades |
| Churned MRR | Revenue lost from cancellations |
| NRR | Net Revenue Retention |
| Active Customers | Count of active subscriptions |
| ARPU | Average Revenue Per User |
| Quick Ratio | Growth efficiency ratio |
| Logo Churn Rate | Customer loss percentage |
CLI Reference
# Quick offline analysis (no LLM needed)
vesh analyze csv revenue.csv
vesh analyze stripe # reads STRIPE_API_KEY from env
vesh analyze postgres --host db.example.com --database myapp # reads PGUSER/PGPASSWORD from env
# Interactive AI chat (powered by OpenCode)
vesh setup # one-time: install OpenCode + configure MCP
vesh chat # open the TUI analyst
vesh chat --model anthropic/claude-sonnet-4-20250514
# Natural language analysis (requires LLM)
vesh run "Why did churn spike last week?" --source csv:revenue.csv
# Output formats
vesh analyze csv data.csv --output json # JSON to stdout
vesh analyze csv data.csv --output rich # Rich terminal (default)
# MCP server (for Cursor, Claude Desktop, or other MCP clients)
vesh mcp serve
Using as a Python Library
# Direct pipeline (no LLM needed)
from vesh_agents.connectors.csv import CsvConnector
from vesh_agents.metrics.computation import MetricComputationEngine
from datetime import date
connector = CsvConnector(connection_id="demo", config={"file_path": "data.csv"})
records = await connector.extract_full()
entities = [r.data for r in records]
engine = MetricComputationEngine()
metrics = engine.compute_all("tenant", date.today(), entities)
for m in metrics:
print(f"{m.metric_id}: {m.value}")
Verticals
Vesh Agents uses a vertical architecture. Each vertical packages domain-specific agents, prompts, and metrics for a particular business use case.
Revenue Intelligence (included) — SaaS metrics, churn analysis, revenue decomposition
More verticals coming soon. Or build your own:
from vesh_agents.core.vertical import Vertical, VerticalConfig
class CustomerSuccess(Vertical):
config = VerticalConfig(
name="customer_success",
description="Customer health scoring and churn prediction",
metric_ids=["health_score", "nps", "usage_frequency"],
)
MCP Integration
Vesh Agents ships a real MCP server (FastMCP, stdio transport) exposing 6 tools: analyze_csv, import_csv, compute_metrics, resolve_entities, detect_anomalies, list_metrics.
OpenCode (recommended)
vesh setup # writes opencode.json + .opencode/agents/
vesh chat # launches OpenCode TUI with the Vesh analyst agent
Cursor / Claude Desktop
Add to your MCP config (.cursor/mcp.json or claude_desktop_config.json):
{
"mcpServers": {
"vesh": {
"command": "vesh",
"args": ["mcp", "serve"]
}
}
}
Manual
vesh mcp serve # starts stdio MCP server — any MCP client can connect
Vesh AI Cloud (Optional)
The open-source framework runs entirely locally. For teams that want managed infrastructure:
- Automated daily pipelines — connect once, get daily insights
- Cross-company benchmarks — "Your NRR is 40th percentile for Series B SaaS"
- Historical intelligence — 90-day trends and institutional memory
- Slack/Teams delivery — daily revenue briefs, anomaly alerts
- Agent Console — visual dashboard for agent execution traces
Visit vesh-ai.netlify.app to learn more.
Contributing
We welcome contributions! See CONTRIBUTING.md for setup instructions, coding standards, and areas where help is needed.
git clone https://github.com/shailesht003/Vesh-AI.git
cd Vesh-AI/vesh-agents
pip install -e ".[dev]"
pytest # 83 tests
License
Apache 2.0 — see LICENSE for details.
Built with ❤️ by Vesh AI
Project details
Release history Release notifications | RSS feed
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 vesh_agents-0.1.1.tar.gz.
File metadata
- Download URL: vesh_agents-0.1.1.tar.gz
- Upload date:
- Size: 239.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db191ec62a2383d7ff96fb136474a632d2b74849dc857f910ea8cdb12a160b08
|
|
| MD5 |
4d3ed5fef18f15da9e01aaa9b9fabbf1
|
|
| BLAKE2b-256 |
1e2e71f1895035751104a03bdd18c04b5f462021d9ebe56e2506747cf7498bad
|
Provenance
The following attestation bundles were made for vesh_agents-0.1.1.tar.gz:
Publisher:
publish.yml on shailesht003/vesh-agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vesh_agents-0.1.1.tar.gz -
Subject digest:
db191ec62a2383d7ff96fb136474a632d2b74849dc857f910ea8cdb12a160b08 - Sigstore transparency entry: 1001504909
- Sigstore integration time:
-
Permalink:
shailesht003/vesh-agents@ccdf1b8531903010bc4e62a1b23e67a00589f7bd -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/shailesht003
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ccdf1b8531903010bc4e62a1b23e67a00589f7bd -
Trigger Event:
release
-
Statement type:
File details
Details for the file vesh_agents-0.1.1-py3-none-any.whl.
File metadata
- Download URL: vesh_agents-0.1.1-py3-none-any.whl
- Upload date:
- Size: 62.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfa22d26bce04589e29c758af4ab1be63108875478f08183395548dfb0a8b7a9
|
|
| MD5 |
5e4d065a6478afc8b40002626211e34b
|
|
| BLAKE2b-256 |
f0f48b0fc74653cd35c6547888cb90d39bd9adbecc2480fdd9302cd50623aacd
|
Provenance
The following attestation bundles were made for vesh_agents-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on shailesht003/vesh-agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vesh_agents-0.1.1-py3-none-any.whl -
Subject digest:
cfa22d26bce04589e29c758af4ab1be63108875478f08183395548dfb0a8b7a9 - Sigstore transparency entry: 1001504914
- Sigstore integration time:
-
Permalink:
shailesht003/vesh-agents@ccdf1b8531903010bc4e62a1b23e67a00589f7bd -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/shailesht003
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ccdf1b8531903010bc4e62a1b23e67a00589f7bd -
Trigger Event:
release
-
Statement type: