Wabee Agent Core API (v2.8.0)

Download OpenAPI specification:

License: Wabee License

Wabee Agent Core API

Wabee Agent Core API enables developers to interact with an AI agent in a custom, secure and flexible manner through REST API calls.

One can build applications to interact with the agent API to complete a task using any of the Agents endpoints which allow for both text streaming and direct JSON response. The Memory endpoints are useful for managing the agent memory programatically. Moreover, the Metrics endpoints provide an interface for monitoring the underlying Agent in terms of latency, health, token consumption and much more.

Agent

Endpoints for interacting with the AI agent

Demand from the agent and get a full response when it finishes

Executes a chain of AI-powered reasoning and actions to respond to a given query or task.

The agent leverages its configured tools and knowledge to:

  • Analyze the input query
  • Plan necessary steps
  • Execute relevant tools
  • Synthesize a comprehensive response

Image Support

Include images in your request using the images field:

  • Base64 Format: Set type="base64" with base64-encoded image data
  • File Path: Set type="file_path" with path to existing image

Maximum 5 images per request. Invalid images will trigger a 400 response.

Authentication

Requires API key via x-wabee-access header.

Session Management

Use session-id header to maintain conversation context across requests.

Authorizations:
APIKeyHeader
header Parameters
session-id
any (Session-Id)

Session unique identifier, used to keep track of previous interations and enhanced observability. We recommend using a UUID string.

request-id
any (Request-Id)

Custom request unique identifier, if not provided a new one will be generated. We recommend using a UUID string.

Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)

Optional partner user identifier. When provided, tools with 'partner_user_id' parameter receive this value automatically, and session queries can be filtered to this user.

Request Body schema: application/json
required
required
Array of objects (Messages)

List of messages to be processed by the agent

Array of Data Filter Hints (objects) or Data Filter Hints (null) (Data Filter Hints)

Special metadata-like hints to be passed to the agent in order to instruct him on how to filter the data on some tools that support filter

auto_memory_retain
boolean (Auto Memory Retain)
Default: false

Indicates whether the agent should automatically retain information from the session in memory. When enabled, allows the agent to learn from experiences and feedback.

Array of Context Files (strings) or Context Files (null) (Context Files)

The path for files which the agent already has access to and should be considered by it when processing the messages

Array of Images (objects) or Images (null) (Images)

List of images associated with the message

RequestBudget (object) or null

Optional budget constraints for agent execution, including recursion limits.

Responses

Request samples

Content type
application/json
{
  • "messages": [
    ],
  • "data_filter_hints": [
    ],
  • "auto_memory_retain": false,
  • "context_files": [
    ],
  • "images": [
    ],
  • "budget": {
    }
}

Response samples

Content type
application/json
{
  • "body": {
    }
}

Demand from the agent and get a streamed response until it finishes

Requests Wabee AI Agent to answer a question regarding the mission that the agent was given to upon creation.

The agent can make use of any of the available tools along with its own reasoning to complete the given task, depending on its complexity, the response might take some time to be returned to the user.

Note: session_id field on request body is kept for compatibility purposes, it will be overwritten with the header value during request processing Note: stream filed on request body is kept for compatibility purposes, it will be ignored during request processing Note: this is pretty much the same as in /chain, the only difference is that this endpoint returns a streaming response instead of a JSON object Note: every SSE frame carries a v1 stream event (see docs/api/streaming_events.md and docs/api/streaming_events.v1.schema.json) Note: the stream ends with exactly one terminal frame of type "done" or "error" Note: All headers starting with stix will be sent as context for tools.

Authorizations:
APIKeyHeader
header Parameters
session-id
any (Session-Id)

Session unique identifier, used to keep track of previous interations and enhanced observability. We recommend using a UUID string.

request-id
any (Request-Id)

Custom request unique identifier, if not provided a new one will be generated. We recommend using a UUID string.

Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)

Optional partner user identifier. When provided, tools with 'partner_user_id' parameter receive this value automatically, and session queries can be filtered to this user.

Request Body schema: application/json
required
required
Array of objects (Messages)

List of messages to be processed by the agent

Array of Data Filter Hints (objects) or Data Filter Hints (null) (Data Filter Hints)

Special metadata-like hints to be passed to the agent in order to instruct him on how to filter the data on some tools that support filter

auto_memory_retain
boolean (Auto Memory Retain)
Default: false

Indicates whether the agent should automatically retain information from the session in memory. When enabled, allows the agent to learn from experiences and feedback.

Array of Context Files (strings) or Context Files (null) (Context Files)

The path for files which the agent already has access to and should be considered by it when processing the messages

Array of Images (objects) or Images (null) (Images)

List of images associated with the message

RequestBudget (object) or null

Optional budget constraints for agent execution, including recursion limits.

Responses

Request samples

Content type
application/json
{
  • "messages": [
    ],
  • "data_filter_hints": [
    ],
  • "auto_memory_retain": false,
  • "context_files": [
    ],
  • "images": [
    ],
  • "budget": {
    }
}

Response samples

Content type
text/event-stream
data: {"v": 1, "type": "text-delta", "ts": 1763405791155, "source": {"type": "parent", "id": "agent-1", "name": "My Agent"}, "step": "TYPING_TEXT", "text": "A perspectiva econômica pode "}

Demand from the agent and get a fast ack response, use callback to receive the completion response

Requests Wabee AI Agent to answer a question asynchronously. If a callback_url is provided, the agent will send the response to the given URL.

The agent can make use of any of the available tools along with its own reasoning to complete the given task, depending on its complexity, the response might take some time to be returned to the user.

Note: session_id field on request body is kept for compatibility purposes, it will be overwritten with the header value during request processing Note: stream filed on request body is kept for compatibility purposes, it will be ignored during request processing

Authorizations:
APIKeyHeader
header Parameters
Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)

Optional partner user identifier. When provided, tools with 'partner_user_id' parameter receive this value automatically, and session queries can be filtered to this user.

Request Body schema: application/json
required
specversion
required
string (Specversion)

The version of the CloudEvents spec.

type
string (Type)
Default: "ai.wabee.agent.chain"

The type of the event. Use the value 'ai.wabee.agent.chain' for chain requests.

source
required
string (Source)

The source of the event.

id
required
string (Id)

A unique identifier for the event.

time
required
string (Time)

The time the event was created.

required
object (MessageInputModelWithCallback)

The data of the event.

Responses

Request samples

Content type
application/json
{
  • "specversion": "1.0",
  • "type": "ai.wabee.agent.chain",
  • "id": "A234-1234-1234",
  • "time": "2018-04-05T17:31:00Z",
  • "data": {
    }
}

Response samples

Content type
application/json
null

Get agent configuration

Returns the current agent configuration.

This endpoint allows you to retrieve the complete agent configuration that is currently loaded in memory. This includes all settings such as:

  • Agent description and metadata
  • LLM configurations
  • Tool definitions
  • Memory settings
  • Other agent-specific parameters

The configuration returned is the actual configuration being used by the agent, including any updates that have been applied via the PUT /agent/config endpoint.

Authorizations:
APIKeyHeader

Responses

Response samples

Content type
application/json
{
  • "configuration": {
    },
  • "timestamp": "2024-03-15T14:30:22.123456",
  • "version": "1.0"
}

Update agent configuration

Updates the agent configuration dynamically without restarting the service.

This endpoint allows you to:

  • Partially update the agent configuration (merges with existing config)
  • Update complete configuration sections or individual fields
  • Validate configuration before applying (using validate_only=true)
  • Automatically trigger agent re-initialization with new config

The provided configuration is merged with the existing configuration, so you only need to specify the fields you want to change. The configuration is written to the mounted volume and the agent is re-initialized.

Important Notes:

  • Only specify the fields you want to update - they will be merged with existing config
  • Nested objects are deep-merged (e.g., updating llms.primary.model preserves other llm settings)
  • The JSON file on the mounted volume will be updated with the merged configuration
  • The agent will be re-initialized, which may take a few seconds
  • In-flight requests will complete with the old configuration
  • New requests will use the updated configuration
  • A backup of the previous configuration is automatically created

Example Partial Updates:

Update just the agent description:

{
    "configuration": {
        "description": "Updated agent description"
    },
    "validate_only": false
}

Update a specific LLM model:

{
    "configuration": {
        "llms": {
            "primary": {
                "model": "gpt-4-turbo"
            }
        }
    },
    "validate_only": false
}

Add a new tool to the existing tools list:

{
    "configuration": {
        "tools": [
            {
                "name": "new_tool",
                "config": {...}
            }
        ]
    },
    "validate_only": false
}

In-memory only update (for read-only config files):

{
    "configuration": {
        "max_execution_time": 2000
    },
    "validate_only": false,
    "in_memory_only": true
}
Authorizations:
APIKeyHeader
Request Body schema: application/json
required
required
object (Configuration)

The new agent configuration to apply

validate_only
boolean (Validate Only)
Default: false

If true, only validate the configuration without applying it

in_memory_only
boolean (In Memory Only)
Default: false

If true, only update configuration in memory without persisting to file (useful for read-only config files)

Responses

Request samples

Content type
application/json
{
  • "configuration": {
    },
  • "validate_only": true,
  • "in_memory_only": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Configuration updated successfully. Backup created at: /volume/config/config.json.backup_20240315_143022",
  • "timestamp": "2024-03-15T14:30:22.123456",
  • "previous_config_backup": true
}

Get wabee AI agent metadata

Returns metadata information about the agent configuration, including its description, capabilities and conversation starters.

Authorizations:
APIKeyHeader

Responses

Response samples

Content type
application/json
{
  • "body": {
    }
}

Share an artifact generated by the agent

Copies a file artifact generated by the agent to a shared location.

This endpoint:

  1. Retrieves the session state using the provided session ID
  2. Gets the specified message by its index in the messages array
  3. Retrieves the generated_artifacts field from the message response_metadata
  4. Copies the file at the specified artifact index to /tmp/share

Returns the path to the copied file or an error if the file cannot be found/copied.

Authorizations:
APIKeyHeader
query Parameters
message_index
required
integer (Message Index)
artifact_index
required
integer (Artifact Index)
header Parameters
session-id
required
string (Session-Id)

Session unique identifier for which to share an artifact

user-name
required
string (User-Name)

User name for the request

Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)
Authorization (string) or Authorization (null) (Authorization)

Responses

Response samples

Content type
application/json
{
  • "body": {
    }
}

Generate a downloadable link for an artifact

Generates a downloadable link for a file artifact created by the agent.

This endpoint:

  1. Retrieves the session state using the provided session ID (from the 'session-id' header)
  2. Gets the specified message by its index in the messages array
  3. Retrieves the generated_artifacts field from the message response_metadata
  4. Generates a presigned URL for the file at the specified artifact index

Returns the presigned URL that can be used to download the file directly.

Authorizations:
APIKeyHeader
path Parameters
message_index
required
integer (Message Index)
artifact_index
required
integer (Artifact Index)
header Parameters
session-id
required
string (Session-Id)

Session unique identifier for which to download an artifact

Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)
Authorization (string) or Authorization (null) (Authorization)

Responses

Response samples

Content type
application/json
{}

Memory

Endpoints for managing agent memory

Observability

Endpoints for monitoring agent performance and logs

Get agent metrics

Returns quantitative information about agent runs for monitoring. The following metrics are provided:

  • status_value_counts (histogram)
  • total_requests
  • total_errors
  • total_tokens
  • mean_tokens
  • mean_latency
  • max_latency
  • min_latency
  • total_prompt_tokens
  • mean_prompt_tokens
  • total_completion_tokens
  • mean_completion_tokens
Authorizations:
APIKeyHeader

Responses

Response samples

Content type
application/json
{
  • "body": { }
}

Get agent logs

Returns run execution logs in stringify format. The logs contain the following fields:

  • name: run name
  • id: run unique identifier
  • model: model name
  • error: run error if exists, else null
  • status: run status
  • latency: run latency
  • end_time: terminated run timestamp
  • completion_tokens: number of tokens returned by the model when the run is finished
  • total_tokens: total number of tokens associated with the run

The results are paginated. Use offset and limit parameters to navigate through pages.

Authorizations:
APIKeyHeader
query Parameters
Run Id (string) or Run Id (null) (Run Id)
limit
integer (Limit) [ 1 .. 20 ]
Default: 10

Number of items to return per page

start_timestamp
integer (Start Timestamp) >= 0
Default: 0

The epoch timestamp to start the search

end_timestamp
integer (End Timestamp) >= 0
Default: 0

The epoch timestamp to end the search

Responses

Response samples

Content type
application/json
{
  • "data": "[{\"name\":\"Wabee LLM Advanced\",\"id\":\"70ea273b-c2ba-4c24-9a8b-aae2cda7c95e\",\"model\":\"llm-model-advanced\",\"error\":null,\"status\":\"success\",\"latency\":5.5,\"end_time\":1712076831672,\"completion_tokens\":150,\"total_tokens\":300}]",
  • "total": 100,
  • "has_more": true
}

Health check endpoint

Returns the health status of the API

Responses

Response samples

Content type
application/json
{ }

Sessions

Endpoints for managing agent sessions

Get structured execution trace for a session

Returns a hierarchical, step-based execution trace for a session.

This endpoint transforms flat streaming events into a structured format ideal for auditing, transparency, and debugging.

Key features:

  • Groups events by execution steps (agent phases)
  • Extracts tool call information with inputs/outputs
  • Provides timing information for each step
  • Supports filtering by specific request_id

Response structure:

  • execution_summary: Overall statistics (duration, step count, tool calls)
  • requests: List of request traces (a session may have multiple requests)
  • user_messages: The user inputs that triggered execution
  • errors: Any errors encountered

Each request contains:

  • steps: Hierarchical execution steps
  • status: Request status (completed, error, streaming)
  • duration_ms: Total request duration
  • total_tool_calls: Number of tools invoked

Each step contains:

  • step_name: The agent phase (PLANNING, REASONING, TOOL_EXECUTION, etc.)
  • type: Step type (generation, tool_call, flow-status-update)
  • content: Full concatenated content generated in this step
  • tool: Tool call details if applicable
  • duration_ms: Step duration

Query parameters:

  • request_id: Filter to a specific request within the session
  • max_content_length: Optional max length to truncate content (default: full content)
Authorizations:
APIKeyHeader
path Parameters
session_id
required
string (Session Id)

The session ID to get the trace for

query Parameters
Request Id (string) or Request Id (null) (Request Id)

Filter to a specific request within the session

Max Content Length (integer) or Max Content Length (null) (Max Content Length)

Optional max length to truncate content (default: full content)

header Parameters
Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)

Optional partner user identifier. When provided, validates that the session belongs to this user.

Responses

Response samples

Content type
application/json
{
  • "session_id": "VSkqDuv",
  • "execution_summary": {
    },
  • "requests": [
    ],
  • "user_messages": [
    ],
  • "errors": [ ]
}

Get the session data with streaming events

Retrieves the complete session data including user messages and streaming events from agent execution.

The response includes the same schema as the live streaming endpoint (/chain_streaming), allowing you to replay the agent's execution flow with all intermediate steps.

The session data includes:

  • User input messages that triggered the agent execution
  • Streaming events from agent execution (same as live stream)
  • Total event count
  • Session metadata with timestamp

User messages contain:

  • role: 'human' (user input)
  • content: The user's input message
  • timestamp: When the message was sent (Unix timestamp in seconds)

Each streaming event is a v1 wire event payload (see docs/api/streaming_events.md):

  • v: Contract version (1)
  • type: Semantic event type (text-delta, reasoning-delta, plan-delta, ...)
  • ts: Milliseconds since Unix epoch
  • source: {type, id, name} of the producing agent
  • step: Display phase (PLANNING, REASONING, ...)
  • request_id: The request the event belongs to
  • plus the type-specific payload field (text, message, plan, ...)

Note: This endpoint returns events in the same format as the /chain_streaming endpoint, making historical and live data consistent. Legacy sessions recorded before the v1 contract are reduced to text-delta events carrying the conversational text only.

Authorizations:
APIKeyHeader
path Parameters
session_id
required
string (Session Id)
header Parameters
Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)

Optional partner user identifier. When provided, validates that the session belongs to this user.

Responses

Response samples

Content type
application/json
{
  • "session_id": "sessionstreamtest",
  • "timestamp": "2025-11-17T21:23:16.918Z",
  • "total_events": 194,
  • "user_messages": [
    ],
  • "events": [
    ]
}

List the sessions

Returns a paginated list of all available chat sessions.

The response includes:

  • List of session summaries
  • Pagination information
  • Total count of returned sessions

Each session summary contains:

  • session_id: Unique identifier for the session
  • checkpoint_id: Internal reference ID
  • short_name: Brief description based on first message

Use the query parameters to navigate through pages:

  • before: Get sessions before this session ID
  • limit: Number of sessions per page (1-50)

Sessions are ordered by most recent first. Empty sessions (no messages) are automatically filtered out.

Authorizations:
APIKeyHeader
query Parameters
Before (string) or Before (null) (Before)

Filter sessions before this session id

limit
integer (Limit) [ 1 .. 100 ]
Default: 45

Limit the number of sessions to return

header Parameters
Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)

Optional partner user identifier. When provided, only sessions associated with this user are returned.

Responses

Response samples

Content type
application/json
{
  • "sessions": [
    ]
}

Set auth cookie header on the response

Set an HttpOnly authentication cookie for WebSocket connections.

This endpoint receives a JWT token via the Authorization header and sets it as an HttpOnly cookie. This is necessary because the browser's WebSocket API doesn't support custom headers, but cookies are automatically sent with the WebSocket handshake request.

The cookie is configured with security best practices:

  • HttpOnly: Prevents JavaScript access (XSS protection)
  • Secure: Only sent over HTTPS
  • SameSite=Strict: CSRF protection
  • Domain selected by Origin header:
    • .wabee.ai for https://*.wabee.ai origins
    • .usuro.ai for https://*.usuro.ai origins
    • fallback to .wabee.ai for other origins
  • Path=/: Available for all paths

Args: authorization: The Authorization header containing "Bearer " origin: Optional request Origin used to select cookie domain

Returns: JSONResponse with Set-Cookie header

header Parameters
authorization
required
string (Authorization)

Bearer token for authentication

origin
string (Origin)

Request origin for cookie domain selection

Responses

Response samples

Content type
application/json
null

Sub-Agents

Endpoints for managing sub-agents

List all sub-agents

Lists all sub-agents that have been created by the parent agent.

Authorizations:
APIKeyHeader

Responses

Response samples

Content type
application/json
{
  • "sub_agents": [
    ]
}

Create a new sub-agent

Creates a new specialized sub-agent that can handle specific tasks. The sub-agent will have access to the specified tools and can be assigned tasks.

Authorizations:
APIKeyHeader
Request Body schema: application/json
required
name
required
string (Name)

A descriptive name for the sub-agent

description
required
string (Description)

A detailed description of the sub-agent's purpose and capabilities

objective
required
string (Objective)

The primary goal or objective for the sub-agent

tools
Array of strings (Tools)

List of tool names to include for the sub-agent

workflow_type
string (Workflow Type)
Default: "react"
Enum: "react" "hierarchical"

The workflow type for the sub-agent

Responses

Request samples

Content type
application/json
{
  • "name": "Market Research Agent",
  • "description": "Specialized agent for conducting market research and competitive analysis",
  • "objective": "Gather and analyze market information to provide competitive insights",
  • "tools": [
    ],
  • "workflow_type": "react"
}

Response samples

Content type
application/json
{
  • "sub_agent_id": "sa-1234abcd",
  • "sub_agent_info": {
    }
}

Get a sub-agent's status

Retrieves information about a specific sub-agent, including its status and basic information.

Authorizations:
APIKeyHeader
path Parameters
sub_agent_id
required
string (Sub Agent Id)

ID of the sub-agent to retrieve

Responses

Response samples

Content type
application/json
{
  • "id": "sa-1234abcd",
  • "name": "Market Research Agent",
  • "description": "Specialized agent for conducting market research and competitive analysis",
  • "status": "ready",
  • "created_at": "2025-04-10T14:30:00Z",
  • "last_active": "2025-04-10T15:45:00Z"
}

Terminate a sub-agent

Terminates a specific sub-agent and cleans up its resources.

Authorizations:
APIKeyHeader
path Parameters
sub_agent_id
required
string (Sub Agent Id)

ID of the sub-agent to terminate

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Tool

Endpoints for managing tools

List all available tools

Returns a list of all available tools that the agent has access to.

Each tool entry includes:

  • Name: Unique identifier for the tool
  • Description: What the tool does and how it can be used
  • Status: Current initialization status (ready, initializing, error)
  • Schema: JSON schema defining the input parameters for the tool

Use this endpoint to discover available tools and their required parameters before using the /tool/execute endpoint.

Authentication

Requires API key via x-wabee-access header.

Authorizations:
APIKeyHeader
query Parameters
Tags (string) or Tags (null) (Tags)

Comma-separated tags to filter tools by (OR logic)

header Parameters
Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)

Optional partner user identifier. Used to determine per-user OAuth authentication status for tools.

Responses

Response samples

Content type
application/json
{
  • "tools": [
    ],
  • "count": 2
}

Execute a specific tool directly

This endpoint allows direct execution of a specific tool with given parameters.

The tool is executed outside the normal agent conversation flow, allowing users to:

  • Invoke tools programmatically
  • Test tool functionality independently
  • Access tool capabilities without engaging the full agent

Each tool has different input parameters. Refer to tool documentation for specific input schemas.

Authentication

Requires API key via x-wabee-access header.

Example Tool Inputs

Web Search:

{
    "tool_name": "web_search",
    "tool_input": {
        "query": "Latest market trends in AI"
    }
}

CSV Search:

{
    "tool_name": "csv_search",
    "tool_input": {
        "file_path": "data/sales.csv",
        "query": "Find total sales in Q1"
    }
}
Authorizations:
APIKeyHeader
header Parameters
session-id
any (Session-Id)

Session unique identifier, used to keep track of previous interactions and enhanced observability. We recommend using a UUID string.

Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)

Optional partner user identifier for tool isolation.

Request Body schema: application/json
required
tool_name
required
string (Tool Name)

The name of the tool to execute

required
object (Tool Input)

The input parameters for the tool execution

Responses

Request samples

Content type
application/json
{
  • "tool_name": "web_search",
  • "tool_input": {
    }
}

Response samples

Content type
application/json
{
  • "tool_name": "web_search",
  • "output": {
    },
  • "execution_time": 1.25,
  • "status": "success"
}

Upload a google service account JSON credential

Upload a Google Service Account JSON credential for an MCP tool.

Authorizations:
APIKeyHeader
header Parameters
Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)
Request Body schema: application/json
required
tool_name
required
string (Tool Name)

Name of the MCP tool/server to associate the credential with

credential_json
required
string (Credential Json)

Full content of the Google Service Account JSON key file

Responses

Request samples

Content type
application/json
{
  • "tool_name": "google-search-console",
  • "credential_json": "{\"type\": \"service_account\", \"project_id\": \"my-project\", \"private_key_id\": \"...\"}"
}

Response samples

Content type
application/json
null

Remove a google service account credential

Remove a Google Service Account credential for an MCP tool.

Authorizations:
APIKeyHeader
query Parameters
tool_name
required
string (Tool Name)

Name of the MCP tool/server

header Parameters
Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)

Responses

Response samples

Content type
application/json
null

Remove an oauth token for a tool

Remove an OAuth token and credential file for an MCP tool.

Authorizations:
APIKeyHeader
query Parameters
tool_name
required
string (Tool Name)

Name of the MCP tool/server

header Parameters
Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)

Responses

Response samples

Content type
application/json
null

Streaming

Endpoints for managing streaming subscriptions

Subscribe to an active or completed session's event stream

Subscribe to events from an existing streaming session.

This endpoint allows multiple clients to receive the same SSE events that were sent to the original client who initiated the request. Use cases include:

  • Live monitoring: Watch an ongoing agent execution from the frontend
  • Replay: Retrieve all events from a completed session
  • Late join: Start receiving events mid-stream with optional catch-up

Parameters

  • session_id (path): The session identifier
  • request_id (query, optional): Specific request to subscribe to. If not provided, subscribes to the latest request for the session
  • from_sequence (query, optional): Start from a specific event sequence number. 0 = from beginning, -1 = live only (no history)

Event Stream Behavior

  1. Historical events: If from_sequence >= 0, sends all past events first
  2. Live events: Then streams real-time events via MongoDB Change Streams
  3. Completion: Stream ends when the session completes or errors

Example Usage

const eventSource = new EventSource('/api/v1/sessions/abc123/stream?from_sequence=0');
eventSource.onmessage = (event) => {
    const data = JSON.parse(event.data.replace('data: ', ''));
    if (data.type === 'text-delta') console.log('Text:', data.text);
};

Note: Requires MongoDB replica set configuration for Change Streams support. Events are retained for 1 day before automatic cleanup.

Authorizations:
APIKeyHeader
path Parameters
session_id
required
string (Session Id)

Session identifier to subscribe to

query Parameters
Request Id (string) or Request Id (null) (Request Id)

Specific request ID to subscribe to (latest if not specified)

from_sequence
integer (From Sequence)
Default: 0

Start from this event sequence (0=beginning, -1=live only)

header Parameters
Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)

Optional partner user identifier. When provided, validates that the session belongs to this user.

Responses

Response samples

Content type
text/event-stream
data: {"v": 1, "type": "text-delta", "ts": 1763405791155, "source": {"type": "parent", "id": "agent-1", "name": "My Agent"}, "step": "TYPING_TEXT", "text": "Hello "}

List all currently active streaming sessions

Returns a list of all currently running streaming sessions.

This endpoint is useful for:

  • Monitoring active agent executions
  • Building dashboards to show running jobs
  • Finding streams to subscribe to

Each active stream includes:

  • Session and request identifiers
  • Current status (streaming, initializing)
  • Start time and duration
  • Number of events published so far
Authorizations:
APIKeyHeader
header Parameters
Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)

Optional partner user identifier. When provided, only active streams for sessions belonging to this user are returned.

Responses

Response samples

Content type
application/json
{
  • "streams": [
    ],
  • "count": 1
}

Get stream history for a session

Retrieves the history of streaming sessions for a given session ID.

Returns metadata about past streams including:

  • Stream status (completed, error, streaming)
  • Start and completion times
  • Total number of events
  • Any error messages

Useful for:

  • Auditing past executions
  • Debugging failed streams
  • Understanding session activity patterns
Authorizations:
APIKeyHeader
path Parameters
session_id
required
string (Session Id)

Session identifier

query Parameters
limit
integer (Limit) [ 1 .. 50 ]
Default: 10

Maximum number of streams to return

header Parameters
Partner-User-Id (string) or Partner-User-Id (null) (Partner-User-Id)

Optional partner user identifier. When provided, validates that the session belongs to this user.

Responses

Response samples

Content type
application/json
{
  • "streams": [
    ],
  • "count": 1
}

Skills

Manage agent skills

List all currently active skills

List all currently active skills.

Authorizations:
APIKeyHeader

Responses

Response samples

Content type
application/json
null

Add or replace a skill at runtime

Add or replace a skill at runtime. Takes effect immediately — no agent restart needed.

Authorizations:
APIKeyHeader
Request Body schema: application/json
required
name
required
string (Name)

Unique identifier for the skill. Must match ^[a-zA-Z0-9_-]{1,64}$

description
required
string (Description)

Human-readable description of what the skill does and when to use it. This is shown to the LLM so it can decide when to activate the skill.

Instructions (string) or Instructions (null) (Instructions)

Free-form markdown instructions for unstructured skills. The subagent receives these as its objective and reasons through them.

WorkflowPlan (object) or null

A structured WorkflowPlan for deterministic execution. Uses the existing PlanExecutorOrchestrator infrastructure.

Array of Candidate Tools (strings) or Candidate Tools (null) (Candidate Tools)

Tool names the skill's subagent can use. If None, inherits all parent tools.

Llm (string) or Llm (null) (Llm)

Override LLM key from the agent's llms dict. If None, inherits parent's default LLM.

Reasoning Type (string) or Reasoning Type (null) (Reasoning Type)

Override reasoning type for the skill's subagent.

Array of Personality Traits (strings) or Personality Traits (null) (Personality Traits)

Personality traits for the skill's subagent prompt.

Communication Style (string) or Communication Style (null) (Communication Style)

Communication style override for the skill's subagent.

SkillTrigger (object) or null

Advisory trigger conditions. The LLM makes the final activation decision.

enabled
boolean (Enabled)
Default: true

Whether this skill is available for activation.

supports_inline
boolean (Supports Inline)
Default: true

Whether the current agent may load and follow this skill inline via skill_view.

supports_delegation
boolean (Supports Delegation)
Default: true

Whether this skill may be executed in an isolated subagent via execute_skill.

requires_delegation
boolean (Requires Delegation)
Default: false

Whether this skill must run through execute_skill rather than inline.

tags
Array of strings (Tags)

Optional tags/categories for organizing skill discovery.

object (Linked Files)

Optional package-style linked files grouped by folder/category.

source_type
string (Source Type)
Default: "config"
Enum: "config" "package"

Where the skill definition was loaded from.

Source Path (string) or Source Path (null) (Source Path)

Absolute path to the package skill directory, when file-backed.

Source File (string) or Source File (null) (Source File)

Absolute path to the package SKILL.md file, when file-backed.

License (string) or License (null) (License)

Optional Agent Skills license frontmatter value.

Compatibility (string) or Compatibility (null) (Compatibility)

Optional Agent Skills compatibility frontmatter value.

object (Metadata)

Optional Agent Skills metadata frontmatter mapping.

Allowed-Tools (string) or Allowed-Tools (null) (Allowed-Tools)

Optional experimental Agent Skills allowed-tools frontmatter value.

Responses

Request samples

Content type
application/json
{
  • "name": "SkillName",
  • "description": "This is a skill description example",
  • "instructions": "An instruction",
  • "workflow_plan": {
    },
  • "candidate_tools": [
    ],
  • "llm": "gpt-4o",
  • "reasoning_type": "simple",
  • "personality_traits": [
    ],
  • "communication_style": "formal",
  • "trigger": {
    },
  • "enabled": true,
  • "supports_inline": true,
  • "supports_delegation": true,
  • "requires_delegation": true,
  • "tags": [
    ],
  • "linked_files": {
    },
  • "source_type": "config",
  • "source_path": "/home/user/project/.wabee/skills/code-review",
  • "source_file": "/home/user/project/.wabee/skills/code-review/SKILL.md",
  • "license": "Apache-2.0",
  • "compatibility": "Requires git and Python 3.12",
  • "metadata": {
    },
  • "allowed-tools": "Read Bash(git:*)"
}

Response samples

Content type
application/json
null

Remove a skill at runtime

Remove a skill at runtime. Takes effect immediately — no agent restart needed.

Authorizations:
APIKeyHeader
path Parameters
skill_name
required
string (Skill Name)

Name of the skill to remove

Responses

Response samples

Content type
application/json
null

Get a specific skill definition

Get a specific skill definition.

Authorizations:
APIKeyHeader
path Parameters
skill_name
required
string (Skill Name)

Name of the skill to retrieve

Responses

Response samples

Content type
application/json
null