---
sidebar_position: 1.5
title: AI Agents
description: One-page integration guide for AI agents — connect to Lium docs over MCP, ingest the full markdown bundle, install the CLI, and call the platform API from the OpenAPI spec.
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lium.io/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Agents

This page is the entry point for AI agents (Claude, ChatGPT, Cursor, in-house copilots, …) integrating with Lium. Everything else in the Developers section also applies to agents — this page just stitches the pieces together.

## Get started in 5 min

1. **Add the docs MCP server** (search and read pages over JSON-RPC):
   ```json
   {
     "mcpServers": {
       "lium-docs": { "url": "https://docs.lium.io/mcp" }
     }
   }
   ```
2. **Or pull the full markdown bundle** for in-context grounding:
   ```bash
   curl -sSL https://docs.lium.io/llms-full.txt
   ```
3. **Discover every API endpoint** from the live OpenAPI 3.1 spec:
   ```bash
   curl -sSL https://lium.io/api/openapi.json
   ```
4. **Drive the platform from a shell** with the CLI:
   ```bash
   curl -fsSL https://lium.io/install.sh | bash && lium init
   ```

## Pick the right surface

| Goal | Use this | Why |
|------|----------|-----|
| Answer questions about Lium docs | [MCP endpoint](./mcp) — `https://docs.lium.io/mcp` | Targeted search + page reads, no token bloat |
| Ground a long conversation in the full docs | [llms.txt / llms-full.txt](./llms-txt) | One fetch, every page concatenated |
| Read a single page as raw markdown | Append `.md` to any URL — e.g. `/providers/quickstart.md` | No HTML to parse |
| Call the Lium platform programmatically | [OpenAPI spec](./openapi) — `https://lium.io/api/openapi.json` | Source of truth for every REST endpoint |
| Drive pods from a shell agent | [CLI](./cli/overview) | Stable subcommands, JSON output, no auth headers to manage |
| Automate the provider portal (Subnet 51) | [`lium provider`](./cli/reference/provider.md) | Same surface as [lium.io/portal](/providers/portal/overview): node lifecycle, central-miner-server config, sync, billing, machine requests — all `--json`-able |
| Write code against typed Python clients | [SDK](./sdk) | `lium.machine` decorator + `Lium()` client |

## Stable agent-facing URLs

These URLs are stable and safe to hard-code in agent configurations:

```text
https://docs.lium.io/mcp                  # docs MCP JSON-RPC endpoint
https://docs.lium.io/llms.txt             # docs index + summaries
https://docs.lium.io/llms-full.txt        # all docs concatenated
https://docs.lium.io/<any-page>.md        # raw markdown for any page
https://lium.io/api/openapi.json          # live platform OpenAPI 3.1 spec
https://lium.io/documents                 # Swagger UI for the same spec
```

## Authentication

The platform API and CLI authenticate with an API key from **Settings → API Keys** at [lium.io](https://lium.io). Send it in the **`X-API-Key`** header on every request. The docs surfaces (MCP, llms.txt, `.md` URLs) require no auth.

```bash

curl https://lium.io/api/pods -H "X-API-Key: $LIUM_API_KEY"
```

## Recommended agent loop

1. Bootstrap context from MCP `search` (or feed `llms-full.txt` once).
2. Resolve the right endpoint from the OpenAPI spec.
3. Call the API with the user's bearer token.
4. Fall back to the CLI when the workflow is shell-shaped (file uploads, SSH).

## Related

- [MCP endpoint](./mcp) — JSON-RPC contract and tool definitions
- [llms.txt](./llms-txt) — llmstxt.org-format docs bundle
- [OpenAPI spec](./openapi) — code-gen and tool-use examples
- [CLI overview](./cli/overview) — full command surface
- [SDK](./sdk) — typed Python client
