$npx -y skills add BerriAI/litellm-skills --skill add-agentCreate a new AI agent on a live LiteLLM proxy. Asks for agent name, the underlying model, and optional MCP server access, then calls POST /v1/agents.
| 1 | # Add Agent |
| 2 | |
| 3 | Create a new AI agent on a live LiteLLM proxy. |
| 4 | |
| 5 | ## Setup |
| 6 | |
| 7 | Ask for these if not already known: |
| 8 | ``` |
| 9 | LITELLM_BASE_URL — e.g. https://my-proxy.example.com |
| 10 | LITELLM_API_KEY — proxy admin key |
| 11 | ``` |
| 12 | |
| 13 | API reference: https://docs.litellm.ai/docs/proxy/agents |
| 14 | |
| 15 | ## Ask the user |
| 16 | |
| 17 | 1. **Agent name** (required, e.g. `my-coding-agent`) |
| 18 | 2. **Model** — which LiteLLM model should this agent use (e.g. `gpt-4o`, `claude-3-5-sonnet`) |
| 19 | 3. **Description** (optional, shown to callers) |
| 20 | 4. **MCP servers** (optional) — list of `server_id`s this agent can use |
| 21 | |
| 22 | ## Run |
| 23 | |
| 24 | ```bash |
| 25 | curl -s -X POST "$BASE/v1/agents" \ |
| 26 | -H "Authorization: Bearer $KEY" \ |
| 27 | -H "Content-Type: application/json" \ |
| 28 | -d '{ |
| 29 | "agent_name": "<name>", |
| 30 | "litellm_params": { |
| 31 | "model": "<model>" |
| 32 | }, |
| 33 | "agent_card_params": { |
| 34 | "name": "<name>", |
| 35 | "description": "<description>", |
| 36 | "version": "1.0" |
| 37 | } |
| 38 | }' |
| 39 | ``` |
| 40 | |
| 41 | ## List existing agents |
| 42 | |
| 43 | ```bash |
| 44 | curl -s "$BASE/v1/agents" \ |
| 45 | -H "Authorization: Bearer $KEY" |
| 46 | ``` |
| 47 | |
| 48 | ## Get agent info |
| 49 | |
| 50 | ```bash |
| 51 | curl -s "$BASE/v1/agents/<agent_id>" \ |
| 52 | -H "Authorization: Bearer $KEY" |
| 53 | ``` |
| 54 | |
| 55 | ## Delete an agent |
| 56 | |
| 57 | ```bash |
| 58 | curl -s -X DELETE "$BASE/v1/agents/<agent_id>" \ |
| 59 | -H "Authorization: Bearer $KEY" |
| 60 | ``` |
| 61 | |
| 62 | ## Output |
| 63 | |
| 64 | Show `agent_id` — needed to call or delete this agent later. |