About
AgentCost
AgentCost is an LLM cost observability platform. It records every model call an application makes and attributes the cost to the agent, workflow and project responsible — so a team running multi-agent systems can see which part of the system is expensive, not just what the monthly provider invoice totals.
Provider dashboards answer “what did we spend?”. They cannot answer “which agent spent it, on which step, and would a cheaper model have done the same job?” — because by the time a call reaches OpenAI or Anthropic, every trace of which part of your system made it is gone. AgentCost keeps that context at the call site and carries it through to the bill.
That is the whole product thesis, and it is why the unit of analysis here is the agent and the workflow rather than the API key.
What we build
The Python SDK
Published on PyPI as agentcost. Two lines of integration — an import and an init — and every OpenAI, Anthropic, Gemini and LangChain call is tracked. The SDK intercepts calls by patching the provider client, so existing code is not refactored. Token counting is local (tiktoken) and delivery is batched and asynchronous, so nothing sits in the path of your LLM call.
The backend
A FastAPI service that ingests those events, prices them against a catalogue of 3,500+ models synced from LiteLLM, and exposes analytics over HTTP. Its full OpenAPI specification is published, and the model catalogue is readable by anyone with no credentials at all.
The dashboard
Spend broken down by agent, workflow, project and model. Budget guardrails with threshold alerts and an optional hard cap that rejects ingestion once a monthly budget is reached. Optimization recommendations derived from your own traffic, with effectiveness tracked after you apply them. Executive reports exportable as PDF or CSV over any date range.
The CLI
agentcost analyze reads a codebase, finds the LLM call sites, estimates the token load per run and reports cost risk — oversized prompts, repeated work, unbounded loops — before any of it reaches production.
How it is licensed
The stack is MIT licensed and the hosted cloud is free. There are no tiers, no seat limits, no usage caps, and no feature held back for a paid plan. If you would rather not send events anywhere, run the same code yourself: the FastAPI backend and PostgreSQL start with Docker, and in that mode nothing leaves your environment and the software does not phone home.
We publish the comparison pages that say where a competitor is the better answer, with each vendor’s pricing read off their own page on a stated date — see AgentCost vs Helicone, vs Langfuse and vs LiteLLM.
Who builds it
AgentCost was founded and is maintained by Kushagra Agrawal. Development happens in the open: the source lives at github.com/agentcost-ai and the SDK is released to PyPI.
Questions, bug reports and security issues all reach us at hello@agentcost.tech. There is more detail on the contact page.