deer-flow/frontend/src/content/en/reference/api-gateway-reference.mdx
2026-04-11 07:04:24 +00:00

77 lines
2.5 KiB
Plaintext

import { Callout } from "nextra/components";
# API / Gateway Reference
<Callout type="info">
DeerFlow Gateway is built on FastAPI and provides interactive API documentation at <code>http://localhost:8001/docs</code>.
</Callout>
## Base URL
```
http://localhost:8001
```
Via nginx proxy:
```
http://localhost:2026/api
```
## Core endpoints
### System
| Method | Path | Description |
|---|---|---|
| `GET` | `/health` | Service health check |
| `GET` | `/api/models` | Get the list of configured models |
### Agent management
| Method | Path | Description |
|---|---|---|
| `GET` | `/api/agents` | List all agents |
| `POST` | `/api/agents` | Create a custom agent |
| `GET` | `/api/agents/{name}` | Get agent configuration |
| `PUT` | `/api/agents/{name}` | Update agent configuration |
| `DELETE` | `/api/agents/{name}` | Delete an agent |
| `POST` | `/api/agents/check` | Check/suggest unique agent slug |
### Threads and memory
| Method | Path | Description |
|---|---|---|
| `GET` | `/api/threads` | List threads |
| `DELETE` | `/api/threads/{thread_id}` | Delete a thread |
| `GET` | `/api/memory` | Get global memory data (context + facts) |
| `DELETE` | `/api/memory` | Clear all memory data |
| `POST` | `/api/memory/reload` | Reload memory from storage file |
| `GET` | `/api/memory/facts` | (included in `/api/memory` response `facts` array) |
| `POST` | `/api/memory/facts` | Create a memory fact |
| `PATCH` | `/api/memory/facts/{fact_id}` | Update a memory fact |
| `DELETE` | `/api/memory/facts/{fact_id}` | Delete a memory fact |
| `GET` | `/api/memory/export` | Export memory data as JSON |
| `POST` | `/api/memory/import` | Import and overwrite memory data |
| `GET` | `/api/memory/config` | Get memory configuration |
| `GET` | `/api/memory/status` | Get memory config + data in one request |
### Extensions
| Method | Path | Description |
|---|---|---|
| `GET` | `/api/extensions` | List all extensions (MCP servers and skills) |
| `POST` | `/api/extensions/mcp/{name}/enable` | Enable an MCP server |
| `POST` | `/api/extensions/mcp/{name}/disable` | Disable an MCP server |
| `POST` | `/api/extensions/skills/{name}/enable` | Enable a skill |
| `POST` | `/api/extensions/skills/{name}/disable` | Disable a skill |
### File uploads
| Method | Path | Description |
|---|---|---|
| `POST` | `/api/uploads/{thread_id}` | Upload a file to the thread workspace |
| `GET` | `/api/uploads/{thread_id}/{filename}` | Retrieve an uploaded file |
For the full interactive API documentation visit `http://localhost:8001/docs` (Swagger UI).