getlago /lago
Open Source Metering and Usage Based Billing API ⭐️ Consumption tracking, Subscription management, Pricing iterations, Payment orchestration & Revenue analytics
★ 10,882⑂ 797👁 50⑃ 606● 244▤ 198
+19
日增长
+129
周增长
+194
月增长
10,882
stars
797
forks
50
watchers
606
prs
244
issues
198
releases
README
Lago
Agentic-first monetization infrastructure for AI products
Meter tokens, compute, API calls, or any product usage.
Turn usage into pricing, credits, entitlements, invoices, payments, and revenue.
Use Lago Direct for your own product, or Lago Embedded to power monetization for your customers.
Talk to us about Lago Cloud
·
Build with your AI agent
·
Run the AI billing demo
·
Documentation
“Lago has been able to follow the pace of our releases and has allowed us to focus on what we do best.”
Timothée Lacroix, CTO at Mistral AI
·
Read the customer story
---
Build with your AI agent
Give your coding agent Lago's public documentation, then choose the API, CLI, or MCP for your workflow. Paste this prompt to start:
text
Read https://getlago.com/llms.txt and follow the relevant Lago guides for this
project. Use https://swagger.getlago.com/openapi.yaml for exact API fields.
Help me design and implement a billing integration. Ask before live access.
| Your task | Start here |
| --- | --- |
| Build billing into your application | REST API and SDKs |
| Inspect billing, run diagnostics, or write scripts | Lago CLI |
| Give an assistant tools for live billing data and supported operations | Lago MCP server |
| Give your agent current billing and API context | Documentation index or documentation MCP |
These interfaces work independently. Application code uses an SDK or the REST API; no Lago plugin is required. Confirm the target organization and environment, keep API keys out of prompts and source control, and review financial changes before execution.
Follow the agent setup guide for connection details and validation, or explore the website overview. To see real usage become a charge locally, run the maintained demo below.
See Lago price an AI workload
Run the maintained demo from this repository:
bash
./examples/agentic-ai-demo/run.sh
It starts the Lago version that matches this checkout, creates a disposable local organization, and prices three illustrative AI requests. Each request sends one input-token event and one output-token event:
text
3 AI requests
5,000 input tokens x $0.000002 = $0.01
1,250 output tokens x $0.000008 = $0.01
Lago usage total = $0.02
Docker Compose starts an isolated Lago service, then a small script seeds and verifies the example through Lago's API. It retrieves current usage, independently reconciles the result, and retries one transaction to confirm that usage does not increase. Everything stays on your machine; the demo does not access Lago Cloud. The bundled credentials and API key are disposable and only intended for this local demo.
Log into http://localhost:8080 with [email protected] / agentic-ai-demo-local-password, then open Customers → Agentic AI Demo Customer → Agentic AI Demo subscription → Usage.
Requirements: Docker, curl, and jq. If ports 8080 or 3001 are ocTop issues
#444Fix the gap in the installation guides.12 comments · 2025-01-08#514[BUG]: Not able to pass the signup stage10 comments · 2025-04-13#771[BUG]: Incorrect invoice periods/dates when free trial is extended and crosses into next billing month6 comments · 2026-07-29#772[BUG]: Lago Date Mismatch4 comments · 2026-07-29#787[BUG]: `enriched_events` is left partitioned but never registered with pg_partman, and `migrate.sh` exits 02 comments · 2026-09-01#354[BUG]: when clock breaks and doesn't crash, clock actions are missed since the crash2 comments · 2024-05-24#854events-processor: ToTime / ToFloat64Timestamp accept integer strings that are not Unix timestamps1 comments · 2026-11-04#807[FEATURE] Add Nano (XNO) as a feeless settlement rail for usage-based billing1 comments · 2026-09-24
Latest release
v1.57.0 v1.57.0 2026-11-05What's Changed chore: add context7.json to claim the Context7 library by @sarkissianraffi in https://github.com/getlago/lago/pull/853 [D-261001-01] README: present Lago Cloud as the default managed option by @lago-claude-ai-agent[bot] in https://github.com/getlago/lago/pull/812 README: detail deployment options with Lago Cloud first by @claude[bot] in https://github.com/getlago/lago/pull/855 feat(docker): build the all-in-one image on the Wolfi/apko hardened bases by @IxDay in https://github.com/getlago/lago/pull/852 chore(release): Bump version to v1.57.0 by @annvelents in https://github