ForjinnForjinn
API Reference

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

TypeDescription
AGENTFLOWNative Forjinn agent orchestration with a visual node-based canvas
AUTOADKGoogle Agent Development Kit (ADK) powered flows
AUTOGENMicrosoft AutoGen multi-agent conversations
CREWAICrewAI role-based agent crews

The agent flow object

FieldTypeDescription
idstringUUID of the flow
namestringDisplay name
descriptionstringHuman-readable description
flowDatastringJSON-serialized flow graph
typestringOne of the flow types above
categorystringOptional category label
deployedbooleanWhether the flow is currently deployed
isPublicbooleanIf true, predictions don't require authentication
workspaceIdstringWorkspace the flow belongs to
createdDatestringISO 8601 creation timestamp
updatedDatestringISO 8601 last-updated timestamp

List agent flows

GET /api/v1/agentflows

Returns agent flows in your active workspace. Accepts the same type, page, and limit query parameters as the chatflows list endpoint.

typestring

Filter by flow type. One of AGENTFLOW, AUTOADK, AUTOGEN, CREWAI.

pageinteger

Page number (default: 1).

limitinteger

Items 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();

Response200 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/agentflows
namestringRequired

Display name for the agent flow.

flowDatastringRequired

JSON-serialized flow graph.

typestringRequired

The agent orchestration type. One of AGENTFLOW, AUTOADK, AUTOGEN, CREWAI.

categorystring

Optional category label.

descriptionstring

Optional description (max 500 characters).

isPublicboolean

Allow 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();

Response200 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/:id
idstringRequired

The 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();

Response200 OK — returns a single agent flow object.


Update an agent flow

PUT /api/v1/agentflows/:id
idstringRequired

The UUID of the agent flow to update.

Send only the fields you want to change.

namestring

Updated display name.

flowDatastring

Updated JSON-serialized flow graph.

deployedboolean

Deploy or undeploy the flow.

descriptionstring

Updated description (max 500 chars).

categorystring

Updated 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();

Response200 OK — returns the updated agent flow object.


Delete an agent flow

DELETE /api/v1/agentflows/:id
idstringRequired

The 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 success

To run a prediction against an agent flow, use the standard predictions endpoint with the agent flow's ID.

On this page