# Build billing with your coding agent

Canonical page: https://getlago.com/for-agents

Give your coding agent Lago’s public documentation. Use the API, CLI, or MCP to turn a pricing idea into a billing integration and verify the amount charged. No Lago plugin is required.

## Start here

- [Agent setup guide](https://getlago.com/docs/guide/ai-agents/for-agents): First prompts, API, CLI, MCP, and validation.
- [Lago CLI](https://getlago.com/docs/guide/lago-cli/overview): Terminal workflows, JSON output, diagnostics, and scripts.
- [Product MCP](https://getlago.com/docs/guide/ai-agents/mcp-server): Connected tools for live billing data and supported operations.
- [Documentation MCP](https://docs.getlago.com/mcp): Public documentation search and retrieval.
- [Developer resources](https://getlago.com/developers): SDKs, REST API, authentication, and webhooks.
- [Complete OpenAPI specification](https://swagger.getlago.com/openapi.yaml): Exact API request and response fields.

## First prompt

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.

## Example: usage becomes overage

Fictional prices: a $99 subscription includes $10 of AI usage. After $9.80 has been used, a new customer action creates a $0.37 usage charge. Applying the remaining $0.20 leaves $0.17 in overage. Replaying the same event adds no extra charge. Amounts exclude tax and payment processing.

## Choose a connection

Public documentation supports discovery and integration design without Lago credentials. Use the CLI for shell workflows and the product MCP for connected assistant tools. Your application uses a Lago SDK or REST API, not the CLI or MCP at runtime.

Confirm the target environment and authorize live billing changes before execution. Use an isolated self-hosted instance for synthetic demos. Lago has no built-in sandbox. Keep credentials out of prompts, browser code, and source control.

## Optional plugin

The Lago plugin packages billing guidance and examples for Claude Code and Codex. Its public release is in preparation. It is an optional shortcut, not a requirement for the API, CLI, or MCP.
