Skip to main content

AI Integration for LP Agent

LP Agent is AI-friendly by design: clear docs, OpenAPI-powered API reference, and simple REST endpoints with API key authentication. Use this page to choose the right integration path for your AI agent.

Pick the Right Tool

The right setup depends on where your agent runs and what it needs to do.
GoalLocal coding agents (OpenCode, Claude Code, Cursor, Codex)Hosted agents (ChatGPT, Claude web, other hosted runtimes)
Read docs and learn capabilitiesUse https://docs.lpagent.io/llms.txt first, then this docs site + docs.json navigation + API reference pagesUse https://docs.lpagent.io/llms.txt and this docs site + API reference
Generate API integrationsUse api-reference/openapi.json and /api-reference/introductionUse /api-reference/introduction and endpoint pages generated from OpenAPI
Execute LP operationsCall LP Agent REST APIs with your x-api-keyCall LP Agent REST APIs from your server/backend with your x-api-key
Local coding agents can also inspect repository files directly (docs.json, .mdx, and api-reference/openapi.json) to build accurate integrations faster.

Read the Docs Effectively

For agents that need to understand LP Agent before writing code or taking actions.
Start with https://docs.lpagent.io/llms.txt. It is the fastest machine-readable entry point for agents that want a compact index of the docs before following deeper links.

Getting Started

Product overview, onboarding flow, and core concepts.

API Reference

Authentication and full endpoint reference generated from OpenAPI.

Execute Operations via API

For AI systems that need to perform real actions (discover pools, create liquidity transactions, manage positions).
1

1) Get an API key

Create an API key from the LP Agent Portal.
2

2) Authenticate requests

Send your API key in the x-api-key header for every API request.
3

3) Follow endpoint workflows

Use the API tutorials for end-to-end flows, then adapt to your agent runtime.

Zap-In & Zap-Out Tutorial

End-to-end API flow for adding and removing liquidity.

Auto Rebalance Tutorial

Build an automated bot workflow on top of LP Agent APIs.

Minimal API Request Pattern

curl -X GET "https://api.lpagent.io/open-api/v1/pools/discover?chain=SOL&pageSize=5" \
  -H "x-api-key: YOUR_API_KEY"
const res = await fetch("https://api.lpagent.io/open-api/v1/pools/discover?chain=SOL&pageSize=5", {
  headers: {
    "x-api-key": process.env.LPAGENT_API_KEY!,
  },
});

if (!res.ok) {
  throw new Error(`Request failed: ${res.status}`);
}

const data = await res.json();
Do not expose API keys in client-side apps, prompts, screenshots, or shared logs. Route production calls through a secure backend.
  1. Start at Introduction and Architecture
  2. Read API Reference Introduction for auth
  3. Implement one flow from Zap-In & Zap-Out tutorial
  4. Expand to automation with Auto Rebalance Bot

Need help?

Join the LP Agent community Discord for support.