Skip to main content
POST
/
workspaces
/
{workspace_id}
/
agent
/
sessions
/
{session_id}
/
fork
Error
A valid request URL is required to generate request examples
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "title": "<string>",
  "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "channel_context": {},
  "tools": [
    "<string>"
  ],
  "mcp_integrations": [
    "<string>"
  ],
  "agent_preset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agent_preset_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "harness_type": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "agents_binding": {
    "enabled": false,
    "subagents": [
      {
        "preset": "<string>",
        "preset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "preset_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "preset_version": 2,
        "name": "<string>",
        "description": "<string>",
        "max_turns": 2
      }
    ]
  },
  "last_error": "<string>",
  "last_stream_id": "<string>",
  "artifacts": [
    {
      "id": "<string>",
      "title": "<string>",
      "scope": {
        "agentId": "<string>",
        "agentType": "<string>",
        "parentToolCallId": "<string>"
      },
      "type": "case"
    }
  ],
  "parent_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

fastapiusersauth
string
cookie
required

Path Parameters

session_id
string<uuid>
required
workspace_id
string<uuid>
required

Body

application/json

Request schema for forking an agent session.

entity_type
enum<string> | null

Override entity type for the forked session. Use 'approval' for inbox forks to hide from main chat list.

Available options:
case,
agent_preset,
agent_preset_builder,
copilot,
workflow,
approval,
external_channel

Response

Successful Response

Response schema for agent session.

id
string<uuid>
required
workspace_id
string<uuid>
required
title
string
required
created_by
string<uuid> | null
required
entity_type
enum<string>
required

The type of entity associated with an agent session.

Determines the context and behavior of the session:

  • CASE: Chat attached to a Case entity for investigation
  • AGENT_PRESET: Live chat testing a preset configuration
  • AGENT_PRESET_BUILDER: Builder chat for editing/configuring a preset
  • WORKSPACE_CHAT: Workspace-level chat assistant (wire value: copilot)
  • WORKFLOW: Workflow-initiated agent run (from action)
  • APPROVAL: Inbox approval continuation (hidden from main chat list)
  • EXTERNAL_CHANNEL: External channel session (e.g. Slack thread)
Available options:
case,
agent_preset,
agent_preset_builder,
copilot,
workflow,
approval,
external_channel
entity_id
string<uuid>
required
channel_context
Channel Context · object | null
required
tools
string[] | null
required
mcp_integrations
string[] | null
required
agent_preset_id
string<uuid> | null
required
agent_preset_version_id
string<uuid> | null
required
harness_type
string | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
agents_binding
ResolvedAgentsConfig · object | null

Persisted agents toggle with immutable resolved child refs.

last_error
string | null
last_stream_id
string | null
artifacts
(CaseArtifact · object | WorkflowArtifact · object | RunArtifact · object | TableArtifact · object | AgentArtifact · object | AlertArtifact · object | IntegrationArtifact · object | SecretArtifact · object | GenericArtifact · object)[]

Case artifact shown in artifact-capable chat surfaces.

parent_session_id
string<uuid> | null