Skip to main content
Integrations · Lago
A Guild agent can create customers, issue invoices, record usage events, and manage every billing object in Lago on your team’s behalf. Guild stores the Lago API key server-side and injects it into each request, so agent code never sees the secret. Credential policies and audit logs let you control which operations each agent can run and track what it did.

Book a demo

See how teams govern agents that use Lago.

Talk to sales

Get access to Guild, then connect Lago to your first agent.

What the Lago integration exposes

The integration provides tools that cover customers, plans, subscriptions, billable metrics, invoices, credit notes, coupons, wallets, payments, fees, taxes, entitlements, features, quotes, orders, webhooks, and analytics. Tools follow the lago_ naming prefix. Use pick() to give an agent only the subset it needs.

How it works

1

Open Credentials and connect Lago

In Guild, go to Access & setup > Credentials, click Connect, select lago, and paste your Lago API key into the API Key field. See Credentials for workspace, member, and agent-scoped options.
2

Import and spread the tools

Add guildai~lago to your agent’s dependencies, then import LagoTools and spread it into the tools object. Guild sends the key as a bearer token in the Authorization header on every call.
3

Narrow tools with pick

All tools carry the lago_ prefix. Pass only the tool names your agent needs to pick() so the model’s tool list stays focused and your policy surface stays small.

Why Lago access needs governing

Lago tools can create subscriptions, finalize invoices, top up wallets, and delete customers or plans. An agent acting on a misconfigured prompt could make billing changes that are difficult to reverse. Guild’s credential proxy enforces credential policies before any request reaches Lago: ALLOW and DENY rules can restrict agents to specific operations, such as read-only retrieval tools, or block destructive calls like lago_destroy_customer and lago_destroy_plan outright. Credentials are stored and injected server-side, so agent code never handles the API key directly. You can scope a credential to a single agent, a single workspace, or one team member, and you can grant an existing credential to a specific installed agent without sharing it more broadly. All requests pass through Guild’s proxy, producing an audit trail of every Lago operation an agent attempted.

About the Lago integration

Agents can create and manage customers, plans, subscriptions, and usage-based billing metrics in Lago. They can issue invoices, apply coupons, top up wallets, record usage events, and handle credit notes and payments. Entitlements, taxes, webhooks, and quotes can also be configured and managed programmatically. The integration is guildai~lago.

Authentication

  • Type: API key
  • Header: Guild sends the key as a bearer token in the Authorization header

Setup

1

Connect Lago

In Guild, go to Access & setup > Credentials, click Connect, select lago, and paste the key into API Key.
See Credentials for workspace, member, and agent-scoped credentials.

Usage

Selecting specific tools

Tools are named with the lago_ prefix. Use pick() to include only what your agent needs.

Tools

Tools in the latest published version of guildai~lago:

Frequently asked questions

Yes. Write a credential policy that DENY rules cover any operation not starting with lago_find or lago_download, or use an ALLOW rule limited to those prefixes. Guild’s proxy blocks the rest before the request reaches Lago. See credential policies for wildcard pattern syntax.
No. The catalog entry for guildai~lago lists no webhook events, so Guild does not receive or forward Lago-initiated events to agents.
Guild sends the API key you connected as a bearer token in the Authorization header on every request. The key is stored server-side and agent code never sees it.
Yes. Connect a credential scoped to a single agent from the installed agent’s detail page using the Dedicated to this agent option. That credential serves only that agent and does not affect credentials used by other agents in the workspace.

Put a governed agent on Lago billing this week

Book a demo

See how teams govern agents that use Lago.

Talk to sales

Get access to Guild, then connect Lago to your first agent.
Also runs on Guild: Affinity · Attio · Brex · Deel Read: Docs: Credential policies · Credentials · Tools in agents
Last modified on December 1, 2026