Skip to main content

Open Source Observability for AI Agents

Project description

๐Ÿ‘๏ธ Argus

Open Source Observability for AI Agents

Stop burning money on AI agent loops. See exactly what your agents are doing.

License: MIT Python 3.8+ PRs Welcome Twitter Follow

Quick Start โ€ข Why Argus? โ€ข Features โ€ข Integrations โ€ข Docs



๐Ÿ”ฅ Why Argus?

The Problem

AI agents are expensive black boxes. You deploy them, they work... until they don't.

Real production disasters:

๐Ÿ’ธ $847 burned in 11 minutes
   โ†’ Agent loop: GPT-4 called itself 2,341 times

๐Ÿข Latency increased 6x after 30 steps  
   โ†’ 280ms โ†’ 1.7s, accuracy dropped to 40%

๐Ÿ“ˆ Costs exploded from $50/day โ†’ $3,200/day
   โ†’ No alerts, no visibility, no idea why

You need answers:

  • Which agent is burning money?
  • Why did latency spike at 3 AM?
  • Is my agent stuck in a loop?
  • What's the actual cost per user?

The Solution

Argus gives you X-ray vision into your AI agents.

One decorator. Complete visibility.

from argus import watch

@watch.agent(
    name="gpt-assistant",
    provider="openai",
    model="gpt-4"
)
def my_agent(prompt):
    return llm(prompt)

You get:

  • โœ… Real-time cost tracking (auto-calculated)
  • โœ… Latency monitoring (p50, p95, p99)
  • โœ… Agent loop detection (prevent $847 disasters)
  • โœ… Multi-agent hierarchy (see the full call tree)
  • โœ… Error tracking (full stack traces)
  • โœ… <1ms overhead (async, non-blocking)

All data stays on your machine. No SaaS, no monthly fees, no vendor lock-in.


๐Ÿš€ Quick Start

Get started in 30 seconds:

pip install hundredeyes
# 1. Install
pip install git+https://github.com/sh1esty1769/argus.git

# 2. Add one decorator
from argus import watch

@watch.agent(name="my-agent", provider="openai", model="gpt-4")
def my_function(prompt):
    return llm(prompt)  # Your existing code

# 3. Launch dashboard
argus dashboard
# โ†’ Open http://localhost:3001

That's it. Argus is now tracking costs, latency, errors, and agent loops.

๐Ÿ“– Full Example (Click to expand)
from argus import watch
from openai import OpenAI

client = OpenAI()

@watch.agent(
    name="gpt-assistant",
    provider="openai",  # Auto cost calculation
    model="gpt-4",
    tags=["production", "customer-support"]
)
def ask_gpt(prompt: str):
    response = client.chat.completions.create(
        model="gpt-4",
        messages=[{"role": "user", "content": prompt}]
    )
    return response.choices[0].message.content

# Use normally - Argus tracks everything in the background
answer = ask_gpt("Explain quantum computing")
print(answer)

# Check dashboard at http://localhost:3001
# See: cost ($0.03), latency (1.2s), tokens (450), full trace
๐Ÿฆœ LangChain Integration (Click to expand)
from argus.integrations import ArgusCallbackHandler
from langchain_openai import ChatOpenAI

# One line - all LangChain calls tracked
callback = ArgusCallbackHandler(agent_name="langchain-bot")
llm = ChatOpenAI(callbacks=[callback])

response = llm.invoke("Hello!")
# โ†’ Automatically tracked: cost, tokens, latency

Works with all LangChain LLMs, chains, and agents.


๐Ÿ† Argus vs. Alternatives

Feature ๐Ÿ‘๏ธ Argus LangSmith Langfuse Helicone
Deployment โœ… Self-hosted (SQLite) โŒ SaaS only โš ๏ธ Docker + PostgreSQL โŒ SaaS only
Pricing โœ… Free (MIT) $39/mo minimum Free (complex setup) $20/mo minimum
Setup Time โœ… 30 seconds Account + API keys 30+ min (Docker) Proxy configuration
Overhead โœ… <1ms (async) ~5ms ~10ms ~15ms (proxy)
Data Privacy โœ… 100% local โŒ Sent to cloud โœ… Self-hosted โŒ Sent to cloud
Agent Loops โœ… Recursion detection โœ… โš ๏ธ Partial โŒ
Auto Cost Calc โœ… Built-in โœ… โš ๏ธ Manual config โœ…
LangChain โœ… Native callback โœ… โœ… โœ…
Multi-Agent โœ… Hierarchy view โœ… โš ๏ธ Limited โŒ

Why Choose Argus?

๐Ÿ”’ Privacy First

Your prompts, responses, and costs never leave your machine. No SaaS, no cloud, no data sharing.

โšก Zero Overhead

<1ms async logging. Your agents run at full speed. No proxies, no network calls.

๐ŸŽฏ Agent-Native

Built for multi-agent systems. Track loops, hierarchies, and cost attribution.


โœจ Features

๐Ÿ’ฐ Automatic Cost Tracking

Stop guessing your bill. Argus calculates costs automatically from token usage.

@watch.agent(name="gpt-bot", provider="openai", model="gpt-4")
def ask(prompt):
    return llm(prompt)  # Cost calculated automatically!

Supported providers:

  • OpenAI (GPT-4, GPT-4o, GPT-3.5, o1)
  • Anthropic (Claude 3.5 Sonnet, Opus, Haiku)
  • Cohere (Command, Command-R)

Real impact: One user discovered 40% of calls could use GPT-3.5 instead of GPT-4 โ†’ saved $1,200/month.


๐Ÿ”— Agent Loop Detection

Prevent $847 disasters. Argus detects when agents call themselves recursively.

@watch.agent(name="orchestrator")
def orchestrator():
    result1 = search_agent()    # Tracked
    result2 = analysis_agent()  # Tracked
    return combine(result1, result2)

# Dashboard shows full call tree:
# orchestrator ($0.05, 1.3s)
#   โ”œโ”€ search_agent ($0.02, 500ms)
#   โ””โ”€ analysis_agent ($0.03, 800ms)

Features:

  • โœ… Cycle detection (alerts on infinite loops)
  • โœ… Visual hierarchy (see parent-child relationships)
  • โœ… Cost attribution (know which orchestrator is expensive)

โšก Performance Monitoring

Find bottlenecks before users do.

  • Latency tracking: p50, p95, p99 percentiles
  • Degradation alerts: Notifies when latency increases >2x
  • Trend analysis: See performance over time

Real case: Found tool-calling latency increased 6x after 30 steps โ†’ optimized to 1.2x.


๐Ÿ› Error Tracking

See exactly what failed.

  • Full stack traces with context
  • Error rates per agent
  • Silent failure detection (empty responses, timeouts)

Real case: Discovered 15% of calls silently failing โ†’ fixed prompt, saved $500/month.


๐Ÿฆœ LangChain Integration

Works with 90% of AI developers' stack.

from argus.integrations import ArgusCallbackHandler
from langchain_openai import ChatOpenAI

callback = ArgusCallbackHandler(agent_name="my-bot")
llm = ChatOpenAI(callbacks=[callback])

# All calls automatically tracked!

Supports:

  • All LangChain LLMs (OpenAI, Anthropic, Cohere, local models)
  • Chat models, chains, agents
  • Automatic cost calculation

See full LangChain guide โ†’


๐Ÿ“Š Beautiful Dashboard

See everything at a glance.

Argus Dashboard

Features:

  • Real-time updates (5s refresh)
  • Filter by agent, date, status
  • Search by input/output text
  • Export to CSV/JSON
  • Light & Dark mode support

๐ŸŽฏ Use Cases

๐Ÿข Production Monitoring

Track AI agents in production without sending data to third parties.

@watch.agent(
    name="customer-support-bot",
    tags=["production", "critical"]
)
def handle_ticket(ticket):
    return agent.solve(ticket)

Benefits:

  • Real-time cost monitoring
  • Performance degradation alerts
  • Error tracking with full context
  • 100% data privacy

๐Ÿ”ฌ Development & Testing

Optimize agents before deploying.

@watch.agent(name="experimental-agent")
def test_agent(prompt):
    return new_approach(prompt)

Benefits:

  • Compare different models (GPT-4 vs GPT-3.5)
  • Find performance bottlenecks
  • Measure cost impact of changes
  • A/B test prompts

๐Ÿค– Multi-Agent Systems

Understand complex agent interactions.

@watch.agent(name="orchestrator")
def orchestrator():
    research = research_agent()
    analysis = analysis_agent(research)
    return summary_agent(analysis)

Benefits:

  • Visualize agent hierarchy
  • Track cost per orchestrator
  • Detect infinite loops
  • Optimize agent chains

๐Ÿ’ผ Cost Optimization

Find where you're burning money.

@watch.agent(
    name="expensive-agent",
    provider="openai",
    model="gpt-4"
)
def analyze(data):
    return llm.analyze(data)

Benefits:

  • Automatic cost calculation
  • Identify expensive agents
  • Compare model costs
  • Set budget alerts (coming soon)

๐Ÿ”ง How It Works

Argus uses async hooks to track your agents with <1ms overhead.

How Argus Works

Key principles:

  1. Async logging โ€” Your code doesn't wait for writes
  2. Batched writes โ€” Multiple events written together
  3. Local storage โ€” No network calls, no latency
  4. Zero config โ€” Works out of the box

๐Ÿ—บ๏ธ Roadmap

  • โœ… v0.1 โ€” Core tracing, SQLite storage, Dashboard
  • โœ… v0.2 โ€” Automatic cost calculation, LangChain integration
  • ๐Ÿšง v0.3 โ€” PostgreSQL/MySQL, Advanced filtering, Alerts
  • ๐Ÿ”œ v0.4 โ€” LlamaIndex, AutoGPT, CrewAI integrations
  • ๐Ÿ”œ v0.5 โ€” Real-time webhooks (Slack, Discord, Email)
  • ๐Ÿ”œ v1.0 โ€” Production-ready, Enterprise features

See full roadmap โ†’


๐Ÿค Contributing

We're building Argus in public and we'd love your help!

Currently looking for:

  • ๐ŸŽจ Frontend developers (Dashboard UI/UX)
  • ๐Ÿ”Œ Integration maintainers (Gemini, Mistral, local models)
  • ๐Ÿ“Š Data engineers (Advanced analytics)
  • ๐Ÿ“– Technical writers (Docs, tutorials)

How to contribute:

  1. Fork the repo
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests: pytest tests/
  5. Submit a PR

Read contributing guide โ†’

Contributors


๐Ÿ“š Documentation


โ“ FAQ

Is Argus free?

Yes! Argus is 100% free and open source (MIT License). No hidden fees, no SaaS pricing, no limits.

Does my data leave my machine?

No. Everything stays local. Argus uses SQLite by default, which is just a file on your computer. Your prompts, responses, and costs never leave your infrastructure.

What's the performance overhead?

<1ms per agent call. Argus uses async logging, so your code doesn't wait for writes. In production, you won't notice any difference.

Can I use Argus in production?

Yes! Argus is designed for production. It's lightweight, async, and battle-tested. Many users run it in production with zero issues.

Does it work with LangChain?

Yes! Argus has native LangChain integration via callbacks. One line of code and all your LangChain calls are tracked.

What LLM providers are supported?

Automatic cost calculation works with:

  • OpenAI (GPT-4, GPT-4o, GPT-3.5, o1)
  • Anthropic (Claude 3.5 Sonnet, Opus, Haiku)
  • Cohere (Command, Command-R)

But you can track any LLM โ€” just won't get automatic cost calculation.

Can I use PostgreSQL instead of SQLite?

Coming in v0.3! For now, SQLite is the only option. But it works great for most use cases (handles millions of records).

How do I deploy the dashboard?

The dashboard is just a Flask app. You can deploy it anywhere:

  • Docker container
  • Heroku
  • AWS/GCP/Azure
  • Your own server

We'll add deployment guides soon.

Can I contribute?

Yes! We'd love your help. Check out CONTRIBUTING.md for guidelines.


๐Ÿ’ฌ Community


๐Ÿ“„ License

MIT License - see LICENSE file for details.

TL;DR: Use it for anything. Commercial, personal, open source. Just keep the license.


โญ Star History

Star History Chart


๐Ÿš€ Ready to Stop Flying Blind?

Add Argus to your AI agents in 30 seconds.

pip install git+https://github.com/sh1esty1769/argus.git

โญ Star on GitHub โ€ข ๐Ÿ“– Read the Docs โ€ข ๐Ÿฆ Follow Updates


Made with ๐Ÿ’œ by developers who were tired of burning money on loops

If Argus saved you money or time, give us a star!

GitHub stars

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hundredeyes-0.1.0.tar.gz (40.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hundredeyes-0.1.0-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file hundredeyes-0.1.0.tar.gz.

File metadata

  • Download URL: hundredeyes-0.1.0.tar.gz
  • Upload date:
  • Size: 40.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for hundredeyes-0.1.0.tar.gz
Algorithm Hash digest
SHA256 83d438ae1e47ebf0f6d107b1b8cecc1a6885fa4b2dde4f5ca745dabd16cec678
MD5 f3352b531a7a2bc60841f8689df6273e
BLAKE2b-256 e1ffad2543269cb32c4fb659118bbd6a74e9bd84aa40fa2e56e89916d141ba72

See more details on using hashes here.

File details

Details for the file hundredeyes-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hundredeyes-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for hundredeyes-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89fa7de8ec507d20edda716c1869079be7184f853977561f7dfd8e97b2efa790
MD5 d5b6129ad405b5da491983b4f233885d
BLAKE2b-256 5a7c2cd17532223cc48c74055a5639fa30fc02795f7d01c3bf8614ab1cf68f42

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page