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

# Agents

> Manage agents and agent instances

## List Agents

<ParamField path="GET" type="string" required>
  /v1/agents
</ParamField>

List all agents.

### Query Parameters

<ParamField query="limit" type="number">
  Maximum number of agents to return (default: 20, max: 100)
</ParamField>

<ParamField query="offset" type="number">
  Number of agents to skip (default: 0)
</ParamField>

<ResponseField name="agents" type="array">
  List of agents
</ResponseField>

<ResponseField name="total" type="number">
  Total number of agents
</ResponseField>

<RequestExample>
  ```bash theme={null}
  curl -X GET https://api.valmi.io/v1/agents \
    -H "Authorization: Bearer sk_api_abc123xyz"
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "agents": [
      {
        "id": "agent_abc123",
        "name": "Customer Support Bot",
        "type": "langgraph",
        "created_at": "2024-01-15T10:00:00Z"
      }
    ],
    "total": 1
  }
  ```
</ResponseExample>

## Get Agent

<ParamField path="GET" type="string" required>
  /v1/agents/{agent_id}
</ParamField>

Get details of a specific agent.

<ResponseField name="id" type="string">
  Agent ID
</ResponseField>

<ResponseField name="name" type="string">
  Agent name
</ResponseField>

<ResponseField name="type" type="string">
  Agent type (langgraph, crewai, n8n, custom)
</ResponseField>

<RequestExample>
  ```bash theme={null}
  curl -X GET https://api.valmi.io/v1/agents/agent_abc123 \
    -H "Authorization: Bearer sk_api_abc123xyz"
  ```
</RequestExample>

## Create Agent

<ParamField path="POST" type="string" required>
  /v1/agents
</ParamField>

Create a new agent.

### Body

<ParamField body="name" type="string" required>
  Agent name
</ParamField>

<ParamField body="type" type="string" required>
  Agent type (langgraph, crewai, n8n, custom)
</ParamField>

<ParamField body="description" type="string">
  Agent description
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X POST https://api.valmi.io/v1/agents \
    -H "Authorization: Bearer sk_api_abc123xyz" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Customer Support Bot",
      "type": "langgraph",
      "description": "AI customer support agent"
    }'
  ```
</RequestExample>
