Getlago

Lago for AI agents

Build billing with your coding agent.

Give your agent Lago’s documentation. Use the API, CLI, or MCP to turn your pricing into a billing integration, then verify the amount your customers are charged.

Start with the docs. Connect the tools your agent needs.

Illustrative billing walkthrough

“We sell a $99 subscription with $10 of included AI usage. What happens when those credits run out?”

  1. One customer action

    Multiple model calls produce input and output token records.

  2. Usage becomes a charge

    The example prices the usage at $0.37. A replayed event adds no extra charge.

  3. Apply the customer's terms

    The last $0.20 of included credit covers part of the charge.

Usage overage$0.17

Fictional prices. This action occurs after $9.80 of the $10 credit has been used. Amounts exclude tax and payment processing.

Start with your product

A pricing idea is enough to begin.

Paste a prompt into your coding agent to explore Lago, model your pricing, or work in your application. Each prompt points to the public documentation so your agent can start today.

Get started with your agent

Read https://getlago.com/llms.txt. Explain how Lago could fit my product and walk me through an illustrative usage-based billing example. Do not assume this workspace is my application.

Paste into your coding agent.

Connect the tools your workflow needs.

Use the API in your application, the CLI in your terminal, or MCP in a connected assistant. Choose the path that fits your workflow.

Lago CLI

Inspect customers, configure billing, and check results from your terminal. JSON output fits scripts and coding agents.

Use the CLI

Product MCP

Give your assistant connected tools for live billing data and supported operations. Configure the Lago environment and API key before use.

Connect the MCP server

API and SDKs

Build billing into your application with the REST API or an official SDK. Give your agent the OpenAPI specification for exact request and response fields.

Explore the API

Your application connects through a Lago SDK or REST API. Give your agent the documentation index or documentation MCP for context. Confirm the target environment and authorize live billing changes before execution.

Before you start.

Do I need a plugin to use Lago with an agent?

No. Give your agent the public documentation, then use the REST API, CLI, or product MCP for the work you need. The optional Lago plugin packages billing guidance and examples for Claude Code and Codex. Its public release is in preparation.

Do I need a Lago account to start?

You can read the public documentation and design an integration without a Lago account or API key. Checking real billing behavior requires a configured Lago environment. Use an isolated self-hosted instance for synthetic demonstrations.

Should I use the CLI or MCP?

Use the CLI for terminal workflows, scripts, and coding agents that can run shell commands. Use the product MCP server for assistants that call connected tools. Both access Lago through configured credentials. You do not need both.

How does my application connect to Lago?

Your application uses a Lago SDK or the REST API. The CLI and MCP give agents and operators convenient ways to work with Lago; application code does not need to run them.

Give your agent a billing starting point.

Setup, first prompts, and the path to a verified integration.

Read the agent guide