Get started

Introduction

AgentCost is cost observability for LLM agents.

To get started with AgentCost, you'll need:

  1. A free account with a project — an API key is created for you at sign-up
  2. The Python SDK, installed with pip install agentcost

Then every OpenAI, Anthropic, Gemini and LangChain call is priced and attributed to the agent, workflow and step that made it — without changing your code:

  • Track: cost per call, per agent and per run, with token counts and latency
  • Guard: monthly budgets, anomaly detection and per-agent tool guardrails
  • Predict: price a codebase before it ships with the CLI

Quick start

Two lines. Your existing calls are tracked without changes.

python
pip install agentcost

from agentcost import track_costs
track_costs.init(api_key="sk_your_project_key", project_id="your-project-uuid")

Guides

Learn how to get AgentCost set up in your project.

Machine-readable resources

The same surface for agents and tooling.

Packages and source

Was this page helpful?