HTTP API¶
The editor widgets read agents and search indexes from four GET endpoints. All require the
administer flowdrop permission and are not cached. The controller is marked @internal: the
response shapes can change between releases.
| Route | Path |
|---|---|
flowdrop_agents.api.agents.list |
/api/flowdrop/ai-agents |
flowdrop_agents.api.agents.autocomplete |
/api/flowdrop/ai-agents/autocomplete?q=<text> |
flowdrop_agents.api.agents.get |
/api/flowdrop/ai-agents/{agent_id} |
flowdrop_agents.api.search_indexes.list |
/api/flowdrop/search-indexes |
The list, detail and search index endpoints wrap their payload with FlowDrop's ApiResponseTrait
(successResponse() and errorResponse()). The autocomplete endpoint returns a plain object.
List agents¶
GET /api/flowdrop/ai-agents
Each item:
{"id": "content_creator", "label": "Content Creator", "type": "Config", "description": "..."}
type is Plugin when the agent definition has a PHP class, otherwise Config. For config agents
the label and description come from the ai_agent entity. For plugin agents the description comes
from agentsCapabilities().
Autocomplete agents¶
GET /api/flowdrop/ai-agents/autocomplete?q=cont
Case-insensitive substring match on the label. An empty q returns every agent.
{
"results": [
{"value": "content_creator", "label": "Content Creator", "type": "Config"}
],
"add_url": "/admin/..."
}
add_url points to the agent add form: the FlowDrop agent editor when flowdrop_ui_agents is
enabled, otherwise the AI Agents add form. It is an empty string if neither route exists.
Agent detail¶
GET /api/flowdrop/ai-agents/{agent_id}
{
"id": "content_creator",
"label": "Content Creator",
"type": "Config",
"description": "...",
"tools": [{"id": "<function call plugin ID>", "name": "<tool name>"}],
"system_prompt": "",
"capabilities": {},
"edit_url": "/admin/..."
}
- Unknown IDs return 404.
- Config agents: label, description and tools are filled only when the user has
viewaccess to theai_agententity.system_promptis filled only for users withadminister ai_agent. Sub-agent tools (ai_agents::ai_agent::<id>) are named after the sub-agent's current label. - Plugin agents:
capabilitiesholds the result ofagentsCapabilities().
Search indexes¶
GET /api/flowdrop/search-indexes
[{"id": "content", "label": "Content"}]
Lists all search_api_index entities. Returns a 500 error response if Search API is not
installed.