Skip to content

Wabee Agent Core API (v1)

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.

Download OpenAPI description
Overview
License
Wabee License
Languages
Servers
Mock server
https://api.docs.wabee.ai/_mock/openapi
Production server
https://<your_agent_uri>.wabee.ai

Agent

Endpoints for interacting with the AI agent

Operations

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

Request

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.

Security
APIKeyHeader
Headers
session-idany(Session-Id)

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

request-idany(Request-Id)

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

Bodyapplication/jsonrequired
messagesArray of objects(Messages)required

List of messages to be processed by the agent

Example: [{"content":"What is the economic outlook?","role":"user"}]
messages[].​rolestring(Role)required

defines the role associated with the message

Example: "assistant"
messages[].​contentstring(Content)required

message content

Example: "Hello, I am your virtual assistant"
data_filter_hintsArray 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

Example: [{"filter_key":"unitname","filter_type":"equals","filter_value":"Unit 1","tool_name":"bubble_data"}]
Any of:

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_retainboolean(Auto Memory Retain)

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

Default false
context_filesArray 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

Example: ["inputs/chat-files/test123/file.pdf"]
Any of:

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

imagesArray of Images (objects) or Images (null)(Images)

List of images associated with the message

Any of:

List of images associated with the message

curl -i -X POST \
  https://api.docs.wabee.ai/_mock/openapi/core/v1/chain \
  -H 'Content-Type: application/json' \
  -H 'request-id: ' \
  -H 'session-id: ' \
  -H 'x-wabee-access: YOUR_API_KEY_HERE' \
  -d '{
    "messages": [
      {
        "content": "What is the economic outlook?",
        "role": "user"
      }
    ],
    "data_filter_hints": [
      {
        "filter_key": "unitname",
        "filter_type": "equals",
        "filter_value": "Unit 1",
        "tool_name": "bubble_data"
      }
    ],
    "auto_memory_retain": false,
    "context_files": [
      "inputs/chat-files/test123/file.pdf"
    ],
    "images": [
      {
        "content": "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nOydd3gU5f7/3+9z",
        "type": "base64"
      }
    ]
  }'

Responses

Successful Response

Headers
session-idany

session unique identifier

request-idany

an auto-generated request unique identifier

Bodyapplication/json
bodyobject(ChainResponseModelBody)required

The complete agent response

body.​inputstring(Input)required

The original input message sent to the agent

Example: "What is the economic outlook?"
body.​outputstring(Output)required

The final response generated by the agent

Example: "The economic outlook varies significantly by region..."
body.​intermediate_stepsArray of ChainResponseModelBodyIntermediateStep (object) or strings(Intermediate Steps)required

The sequence of steps taken by the agent to generate the response, including tool usage and reasoning

Example: [[{"log":"Retrieving news data","tool":"api_tool","tool_input":"curl https://newsapi.org/v2/everything","type":"AgentAction"},"Explanation: Gathering real-time economic data from trusted sources"]]
Array [
Any of:

Represents a single step in the agent's reasoning process

body.​intermediate_steps[][].​toolstring(Tool)required

The identifier of the tool used in this step

Example: "api_tool"
body.​intermediate_steps[][].​tool_inputstring(Tool Input)required

The input provided to the tool

Example: "curl https://newsapi.org/v2/everything"
body.​intermediate_steps[][].​logstring(Log)required

Detailed log of the tool execution

Example: "Retrieving news data"
body.​intermediate_steps[][].​typestring(Type)required

The type of action performed in this step

Example: "AgentAction"
]
body.​usageArray of objects(Usage)required

Resource usage metrics for the request

body.​usage[].​costAttributestring(Costattribute)required

The name of the resource being measured (e.g. model name)

Example: "gpt-4-32k"
body.​usage[].​usagestring(Usage)required

The quantity of the resource used

Example: "100"
body.​usage[].​unitstring(Unit)required

The unit of measurement (e.g. tokens, requests)

Example: "tokens"
Response
application/json
{ "body": { "input": "What is the economic outlook?", "output": "The economic outlook varies significantly by region...", "intermediate_steps": [ … ], "usage": [ … ] } }

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

Request

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: the id on the streamming response refers to the current request Note: the streamming response ends when finish_reason is different than null Note: All headers starting with stix will be sent as context for tools.

Security
APIKeyHeader
Headers
session-idany(Session-Id)

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

request-idany(Request-Id)

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

Bodyapplication/jsonrequired
messagesArray of objects(Messages)required

List of messages to be processed by the agent

Example: [{"content":"What is the economic outlook?","role":"user"}]
messages[].​rolestring(Role)required

defines the role associated with the message

Example: "assistant"
messages[].​contentstring(Content)required

message content

Example: "Hello, I am your virtual assistant"
data_filter_hintsArray 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

Example: [{"filter_key":"unitname","filter_type":"equals","filter_value":"Unit 1","tool_name":"bubble_data"}]
Any of:

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_retainboolean(Auto Memory Retain)

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

Default false
context_filesArray 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

Example: ["inputs/chat-files/test123/file.pdf"]
Any of:

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

imagesArray of Images (objects) or Images (null)(Images)

List of images associated with the message

Any of:

List of images associated with the message

curl -i -X POST \
  https://api.docs.wabee.ai/_mock/openapi/core/v1/chain_streaming \
  -H 'Content-Type: application/json' \
  -H 'request-id: ' \
  -H 'session-id: ' \
  -H 'x-wabee-access: YOUR_API_KEY_HERE' \
  -d '{
    "messages": [
      {
        "content": "What is the economic outlook?",
        "role": "user"
      }
    ],
    "data_filter_hints": [
      {
        "filter_key": "unitname",
        "filter_type": "equals",
        "filter_value": "Unit 1",
        "tool_name": "bubble_data"
      }
    ],
    "auto_memory_retain": false,
    "context_files": [
      "inputs/chat-files/test123/file.pdf"
    ],
    "images": [
      {
        "content": "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nOydd3gU5f7/3+9z",
        "type": "base64"
      }
    ]
  }'

Responses

Successful Response

Headers
session-idany

session unique identifier

request-idany

an auto-generated request unique identifier

Bodytext/event-stream
Response
text/event-stream
data: {"id": "3f364df0-a4e5-41b1-bb33-eeaa616a8060", "token": "A perspectiva econômica pode ", "agent_step": "PERGUNTA", "finish_reason": "null", "usage": [{"costAttribute": "gpt-4-32k", "usage": 100, "unit": "tokens"}]}

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

Request

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

Security
APIKeyHeader
Bodyapplication/jsonrequired
specversionstring(Specversion)required

The version of the CloudEvents spec.

Example: "1.0"
typestring(Type)

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

Default "ai.wabee.agent.chain"
sourcestring(Source)required

The source of the event.

Example: "https://wabee.ai/agent"
idstring(Id)required

A unique identifier for the event.

Example: "A234-1234-1234"
timestring(Time)required

The time the event was created.

Example: "2018-04-05T17:31:00Z"
dataobject(MessageInputModelWithCallback)required

The data of the event.

data.​messagesArray of objects(Messages)required

List of messages to be processed by the agent

Example: [{"content":"What is the economic outlook?","role":"user"}]
data.​messages[].​rolestring(Role)required

defines the role associated with the message

Example: "assistant"
data.​messages[].​contentstring(Content)required

message content

Example: "Hello, I am your virtual assistant"
data.​data_filter_hintsArray 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

Example: [{"filter_key":"unitname","filter_type":"equals","filter_value":"Unit 1","tool_name":"bubble_data"}]
Any of:

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

data.​auto_memory_retainboolean(Auto Memory Retain)

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

Default false
data.​context_filesArray 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

Example: ["inputs/chat-files/test123/file.pdf"]
Any of:

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

data.​imagesArray of Images (objects) or Images (null)(Images)

List of images associated with the message

Any of:

List of images associated with the message

data.​session_idSession Id (string) or Session Id (null)(Session Id)

An optional session ID to associate with the chain. This can be used to track multiple interactions with the chain across different requests. If not provided, a session ID will be generated.

Any of:

An optional session ID to associate with the chain. This can be used to track multiple interactions with the chain across different requests. If not provided, a session ID will be generated.

string(Session Id)
data.​callback_urlCallback Url (string) or Callback Url (null)(Callback Url)

An optional callback URL to send the response to.

Any of:

An optional callback URL to send the response to.

string(Callback Url)
curl -i -X POST \
  https://api.docs.wabee.ai/_mock/openapi/core/v1/chain_async \
  -H 'Content-Type: application/json' \
  -H 'x-wabee-access: YOUR_API_KEY_HERE' \
  -d '{
    "specversion": "1.0",
    "type": "ai.wabee.agent.chain",
    "source": "https://wabee.ai/agent",
    "id": "A234-1234-1234",
    "time": "2018-04-05T17:31:00Z",
    "data": {
      "messages": [
        {
          "content": "What is the economic outlook?",
          "role": "user"
        }
      ],
      "data_filter_hints": [
        {
          "filter_key": "unitname",
          "filter_type": "equals",
          "filter_value": "Unit 1",
          "tool_name": "bubble_data"
        }
      ],
      "auto_memory_retain": false,
      "context_files": [
        "inputs/chat-files/test123/file.pdf"
      ],
      "images": [
        {
          "content": "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nOydd3gU5f7/3+9z",
          "type": "base64"
        }
      ],
      "session_id": "string",
      "callback_url": "string"
    }
  }'

Responses

Successful Response

Bodyapplication/json
any
Response
application/json
null

Request

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.

Security
APIKeyHeader
curl -i -X GET \
  https://api.docs.wabee.ai/_mock/openapi/core/v1/agent/config \
  -H 'x-wabee-access: YOUR_API_KEY_HERE'

Responses

Successful Response

Bodyapplication/json
configurationobject(Configuration)required

Current agent configuration

configuration.​property name*anyadditional property
timestampstring(Timestamp)

Configuration retrieval timestamp

versionVersion (string) or Version (null)(Version)

Configuration version (if applicable)

Any of:

Configuration version (if applicable)

string(Version)
Response
application/json
{ "configuration": { "description": "Example agent configuration", "llms": { … }, "tools": [], "memory": { … } }, "timestamp": "2024-03-15T14:30:22.123456", "version": "1.0" }

Request

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
}
Security
APIKeyHeader
Bodyapplication/jsonrequired
configurationobject(Configuration)required

The new agent configuration to apply

configuration.​property name*anyadditional property
validate_onlyboolean(Validate Only)

If true, only validate the configuration without applying it

Default false
in_memory_onlyboolean(In Memory Only)

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

Default false
curl -i -X PUT \
  https://api.docs.wabee.ai/_mock/openapi/core/v1/agent/config \
  -H 'Content-Type: application/json' \
  -H 'x-wabee-access: YOUR_API_KEY_HERE' \
  -d '{
    "configuration": {
      "key1": "value1",
      "key2": "value2"
    },
    "validate_only": true,
    "in_memory_only": true
  }'

Responses

Successful Response

Bodyapplication/json
successboolean(Success)required

Whether the update was successful

messagestring(Message)required

Status message

timestampstring(Timestamp)

Update timestamp

versionVersion (string) or Version (null)(Version)

Configuration version (if applicable)

Any of:

Configuration version (if applicable)

string(Version)
validation_errorsValidation Errors (object) or Validation Errors (null)(Validation Errors)

Validation errors if any

Any of:

Validation errors if any

previous_config_backupPrevious Config Backup (boolean) or Previous Config Backup (null)(Previous Config Backup)

Whether previous config was backed up

Any of:

Whether previous config was backed up

boolean(Previous Config Backup)
Response
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 }

Request

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

Security
APIKeyHeader
curl -i -X GET \
  https://api.docs.wabee.ai/_mock/openapi/core/v1/metadata \
  -H 'x-wabee-access: YOUR_API_KEY_HERE'

Responses

Successful Response

Bodyapplication/json
bodyobject(MetadataResponseModelBody)required

The agent metadata

body.​idstring(Id)required

Agent unique identifier

Example: "agent-123-xyz"
body.​namestring(Name)required

Agent name

Example: "Sales Assistant"
body.​descriptionstring(Description)required

Agent description

Example: "An AI assistant to help with sales tasks."
body.​uri_idstring(Uri Id)required

Agent URI identifier

Example: "sales-assistant"
body.​conversation_startersArray of objects(Conversation Starters)

List of conversation starter prompts

Response
application/json
{ "body": { "id": "agent123", "name": "Wabee Agent", "description": "An AI agent that helps with specific tasks", "uri_id": "wabee-agent", "conversation_starters": [ … ] } }

Share an artifact generated by the agent

Request

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.

Security
APIKeyHeader
Query
message_indexinteger(Message Index)required
artifact_indexinteger(Artifact Index)required
Headers
session-idstring(Session-Id)required

Session unique identifier for which to share an artifact

user-namestring(User-Name)required

User name for the request

curl -i -X POST \
  'https://api.docs.wabee.ai/_mock/openapi/core/v1/share_agent_artifact?message_index=0&artifact_index=0' \
  -H 'session-id: string' \
  -H 'user-name: string' \
  -H 'x-wabee-access: YOUR_API_KEY_HERE'

Responses

Successful Response

Bodyapplication/json
any
Response
application/json
{ "body": { "shared_file_path": "/tmp/share/report.pdf", "original_file_path": "outputs/report.pdf", "file_type": "file" } }

Generate a downloadable link for an artifact

Request

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.

Security
APIKeyHeader
Path
message_indexinteger(Message Index)required
artifact_indexinteger(Artifact Index)required
Headers
session-idstring(Session-Id)required

Session unique identifier for which to download an artifact

curl -i -X GET \
  'https://api.docs.wabee.ai/_mock/openapi/core/v1/download_artifact/{message_index}/{artifact_index}' \
  -H 'session-id: string' \
  -H 'x-wabee-access: YOUR_API_KEY_HERE'

Responses

Successful Response

Headers
session-idany

session unique identifier

Bodyapplication/json
any
Response
application/json
{ "body": { "download_url": "https://s3.amazonaws.com/bucket-name/path/to/file.pdf?X-Amz-Algorithm=...", "file_name": "report.pdf", "file_type": "file" } }

Memory

Endpoints for managing agent memory

Observability

Endpoints for monitoring agent performance and logs

Operations

Sessions

Endpoints for managing agent sessions

Operations

Sub-Agents

Endpoints for managing sub-agents

Operations
Operations