Agent Flows API: Manage Multi-Agent Pipelines
Create, retrieve, update, and delete Forjinn agent flows — multi-step AI pipelines supporting AutoADK, AutoGen, CrewAI, and native agent orchestration.
Agent flows are multi-step AI pipelines where individual nodes can reason, use tools, and hand off work to other agents. Forjinn supports several agent orchestration frameworks — you choose the type when creating the flow and Forjinn handles the execution runtime.
Agent flows are accessed under the /api/v1/agentflows prefix and share the same underlying data model as chatflows, extended with agent-specific execution metadata.
Flow types
| Type | Description |
|---|---|
AGENTFLOW | Native Forjinn agent orchestration with a visual node-based canvas |
AUTOADK | Google Agent Development Kit (ADK) powered flows |
AUTOGEN | Microsoft AutoGen multi-agent conversations |
CREWAI | CrewAI role-based agent crews |
The agent flow object
| Field | Type | Description |
|---|---|---|
id | string | UUID of the flow |
name | string | Display name |
description | string | Human-readable description |
flowData | string | JSON-serialized flow graph |
type | string | One of the flow types above |
category | string | Optional category label |
deployed | boolean | Whether the flow is currently deployed |
isPublic | boolean | If true, predictions don't require authentication |
workspaceId | string | Workspace the flow belongs to |
createdDate | string | ISO 8601 creation timestamp |
updatedDate | string | ISO 8601 last-updated timestamp |
List agent flows
GET /api/v1/agentflowsReturns agent flows in your active workspace. Accepts the same type, page, and limit query parameters as the chatflows list endpoint.
typestringFilter by flow type. One of AGENTFLOW, AUTOADK, AUTOGEN, CREWAI.
pageintegerPage number (default: 1).
limitintegerItems per page (default: 20).
curl "https://your-forjinn-instance.com/api/v1/agentflows?type=AGENTFLOW" \
-H "Authorization: Bearer fj-abc123def456"const response = await fetch('https://your-forjinn-instance.com/api/v1/agentflows?type=AGENTFLOW', {
headers: { 'Authorization': 'Bearer fj-abc123def456' },
});
const flows = await response.json();Response — 200 OK
[
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Research & Summarize Agent",
"type": "AGENTFLOW",
"category": "Research",
"deployed": true,
"isPublic": false,
"workspaceId": "ws-111aaa",
"createdDate": "2024-04-15T08:00:00.000Z",
"updatedDate": "2024-04-20T11:00:00.000Z"
}
]Create an agent flow
POST /api/v1/agentflowsnamestringRequiredDisplay name for the agent flow.
flowDatastringRequiredJSON-serialized flow graph.
typestringRequiredThe agent orchestration type. One of AGENTFLOW, AUTOADK, AUTOGEN, CREWAI.
categorystringOptional category label.
descriptionstringOptional description (max 500 characters).
isPublicbooleanAllow unauthenticated prediction requests.
curl -X POST https://your-forjinn-instance.com/api/v1/agentflows \
-H "Authorization: Bearer fj-abc123def456" \
-H "Content-Type: application/json" \
-d '{
"name": "Research & Summarize Agent",
"type": "AGENTFLOW",
"category": "Research",
"description": "Searches the web and summarizes findings.",
"flowData": "{\"nodes\":[],\"edges\":[],\"viewport\":{\"x\":0,\"y\":0,\"zoom\":1}}"
}'const response = await fetch('https://your-forjinn-instance.com/api/v1/agentflows', {
method: 'POST',
headers: {
'Authorization': 'Bearer fj-abc123def456',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Research & Summarize Agent',
type: 'AGENTFLOW',
category: 'Research',
description: 'Searches the web and summarizes findings.',
flowData: JSON.stringify({ nodes: [], edges: [], viewport: { x: 0, y: 0, zoom: 1 } }),
}),
});
const flow = await response.json();Response — 200 OK
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Research & Summarize Agent",
"type": "AGENTFLOW",
"category": "Research",
"deployed": false,
"isPublic": false,
"workspaceId": "ws-111aaa",
"createdDate": "2024-05-01T10:00:00.000Z",
"updatedDate": "2024-05-01T10:00:00.000Z"
}Get an agent flow
GET /api/v1/agentflows/:ididstringRequiredThe UUID of the agent flow.
curl https://your-forjinn-instance.com/api/v1/agentflows/b2c3d4e5-f6a7-8901-bcde-f12345678901 \
-H "Authorization: Bearer fj-abc123def456"const id = 'b2c3d4e5-f6a7-8901-bcde-f12345678901';
const response = await fetch(`https://your-forjinn-instance.com/api/v1/agentflows/${id}`, {
headers: { 'Authorization': 'Bearer fj-abc123def456' },
});
const flow = await response.json();Response — 200 OK — returns a single agent flow object.
Update an agent flow
PUT /api/v1/agentflows/:ididstringRequiredThe UUID of the agent flow to update.
Send only the fields you want to change.
namestringUpdated display name.
flowDatastringUpdated JSON-serialized flow graph.
deployedbooleanDeploy or undeploy the flow.
descriptionstringUpdated description (max 500 chars).
categorystringUpdated category label.
curl -X PUT https://your-forjinn-instance.com/api/v1/agentflows/b2c3d4e5-f6a7-8901-bcde-f12345678901 \
-H "Authorization: Bearer fj-abc123def456" \
-H "Content-Type: application/json" \
-d '{
"deployed": true,
"description": "Searches the web and produces executive summaries."
}'const id = 'b2c3d4e5-f6a7-8901-bcde-f12345678901';
const response = await fetch(`https://your-forjinn-instance.com/api/v1/agentflows/${id}`, {
method: 'PUT',
headers: {
'Authorization': 'Bearer fj-abc123def456',
'Content-Type': 'application/json',
},
body: JSON.stringify({
deployed: true,
description: 'Searches the web and produces executive summaries.',
}),
});
const updated = await response.json();Response — 200 OK — returns the updated agent flow object.
Delete an agent flow
DELETE /api/v1/agentflows/:ididstringRequiredThe UUID of the agent flow to delete.
Deletion is permanent. Any triggers, integrations, or scheduled executions referencing this flow will stop working.
curl -X DELETE https://your-forjinn-instance.com/api/v1/agentflows/b2c3d4e5-f6a7-8901-bcde-f12345678901 \
-H "Authorization: Bearer fj-abc123def456"const id = 'b2c3d4e5-f6a7-8901-bcde-f12345678901';
await fetch(`https://your-forjinn-instance.com/api/v1/agentflows/${id}`, {
method: 'DELETE',
headers: { 'Authorization': 'Bearer fj-abc123def456' },
});
// 200 OK on successTo run a prediction against an agent flow, use the standard predictions endpoint with the agent flow's ID.
Predictions API: Query a Deployed Chatflow
Send a question to any Forjinn chatflow and receive an AI-generated response, with support for chat history, file uploads, config overrides, and SSE streaming.
Document Store — Manage Vector Knowledge Bases
Create and manage Forjinn document stores: upload and chunk documents, configure vector store and embeddings, run semantic search, and track ingestion jobs.