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

# Agents API

> Create, configure, execute, and manage AI agents programmatically.

## List Agents

**GET**

Returns a list of all agents in your account.

```bash theme={null}
curl https://api.mindblix.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Response

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": "agent_abc123",
      "name": "Research Agent",
      "template": "research",
      "status": "active",
      "created_at": "2026-03-01T10:00:00Z"
    }
  ],
  "pagination": {
    "total": 12,
    "page": 1,
    "per_page": 20
  }
}
```

***

## Create Agent

```bash theme={null}
curl -X POST https://api.mindblix.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Custom Agent",
    "template": "research",
    "model": "gemini-1.5-flash",
    "config": {
      "max_iterations": 5,
      "temperature": 0.7,
      "tools": ["web_search", "document_reader"]
    }
  }'
```

### Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `name` | string | ✅ | Display name for the agent |
| `template` | string | ✅ | Agent template ID |
| `model` | string | ⬜ | AI model to use (default: `gemini-1.5-flash`) |
| `config` | object | ⬜ | Agent-specific configuration |

***

## Execute Agent

```bash theme={null}
curl -X POST https://api.mindblix.com/v1/agents/{agent_id}/execute \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "query": "Analyze Q4 2025 market trends in AI"
    }
  }'
```

### Response

```json theme={null}
{
  "success": true,
  "data": {
    "execution_id": "exec_xyz789",
    "status": "completed",
    "output": { ... },
    "metadata": {
      "tokens_used": 3241,
      "execution_time_ms": 7200,
      "model": "gemini-1.5-flash"
    }
  }
}
```

***

## Delete Agent

```bash theme={null}
curl -X DELETE https://api.mindblix.com/v1/agents/{agent_id} \
  -H "Authorization: Bearer YOUR_API_KEY"
```

> [!WARNING]
>
> Deleting an agent is irreversible. Any workflows using this agent will fail on the next execution.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.