Getting Started
Get AgentCost running in under 60 seconds.
Installation
First Trace
Wrap your OpenAI client with trace():
from agentcost.sdk import trace
from openai import OpenAI
client = trace(OpenAI(), project="my-app")
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Hello!"}]
)
Every call through client is now tracked automatically.
Launch the Dashboard
Open http://localhost:8500 to see your cost data.
Seed demo data
To see the dashboard with data immediately:
Configuration
AgentCost is configured via environment variables:
| Variable | Default | Description |
|---|---|---|
AGENTCOST_PORT |
8500 |
Server port |
AGENTCOST_EDITION |
auto |
community, enterprise, or auto |
AGENTCOST_DB_URL |
SQLite | PostgreSQL URL for enterprise |
AGENTCOST_AUTH_ENABLED |
false |
Enable SSO (enterprise only) |
Check Your Edition
🧮 AgentCost v1.0.0
Edition: 🌐 Community
Core Features (MIT):
✅ tracing
✅ dashboard
✅ forecasting
✅ optimizer
✅ analytics
✅ estimator
✅ plugins
✅ cli
✅ otel_export
Next Steps
- Core Concepts — Understand traces, projects, agents, sessions
- Dashboard Guide — Tour of all 7 intelligence views
- Python SDK Reference — Full API documentation
- Framework Guides — LangChain, CrewAI, AutoGen, LlamaIndex