Wabee Agent Core API
Wabee Agent Core API (v1)
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.
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
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.
Requires API key via x-wabee-access header.
Use session-id header to maintain conversation context across requests.
Session unique identifier, used to keep track of previous interations and enhanced observability. We recommend using a UUID string.
List of messages to be processed by the agent
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
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
Indicates whether the agent should automatically retain information from the session in memory. When enabled, allows the agent to learn from experiences and feedback.
The path for files which the agent already has access to and should be considered by it when processing the messages
The path for files which the agent already has access to and should be considered by it when processing the messages
- Mock serverhttps://api.docs.wabee.ai/_mock/openapi/core/v1/chain
- Production serverhttps://<your_agent_uri>.wabee.ai/core/v1/chain
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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"
}
]
}'Successful Response
The complete agent response
The original input message sent to the agent
The final response generated by the agent
The sequence of steps taken by the agent to generate the response, including tool usage and reasoning
Represents a single step in the agent's reasoning process
The identifier of the tool used in this step
The input provided to the tool
Detailed log of the tool execution
The type of action performed in this step
Resource usage metrics for the request
The name of the resource being measured (e.g. model name)
{ "body": { "input": "What is the economic outlook?", "output": "The economic outlook varies significantly by region...", "intermediate_steps": [ … ], "usage": [ … ] } }
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.
Session unique identifier, used to keep track of previous interations and enhanced observability. We recommend using a UUID string.
List of messages to be processed by the agent
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
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
Indicates whether the agent should automatically retain information from the session in memory. When enabled, allows the agent to learn from experiences and feedback.
The path for files which the agent already has access to and should be considered by it when processing the messages
The path for files which the agent already has access to and should be considered by it when processing the messages
- Mock serverhttps://api.docs.wabee.ai/_mock/openapi/core/v1/chain_streaming
- Production serverhttps://<your_agent_uri>.wabee.ai/core/v1/chain_streaming
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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"
}
]
}'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"}]}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
The type of the event. Use the value 'ai.wabee.agent.chain' for chain requests.
The data of the event.
List of messages to be processed by the agent
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
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
Indicates whether the agent should automatically retain information from the session in memory. When enabled, allows the agent to learn from experiences and feedback.
The path for files which the agent already has access to and should be considered by it when processing the messages
The path for files which the agent already has access to and should be considered by it when processing the messages
List of images associated with the message
List of images associated with the message
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.
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.
- Mock serverhttps://api.docs.wabee.ai/_mock/openapi/core/v1/chain_async
- Production serverhttps://<your_agent_uri>.wabee.ai/core/v1/chain_async
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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"
}
}'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.
- Mock serverhttps://api.docs.wabee.ai/_mock/openapi/core/v1/agent/config
- Production serverhttps://<your_agent_uri>.wabee.ai/core/v1/agent/config
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://api.docs.wabee.ai/_mock/openapi/core/v1/agent/config \
-H 'x-wabee-access: YOUR_API_KEY_HERE'{ "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.
- 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
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
}The new agent configuration to apply
If true, only validate the configuration without applying it
- Mock serverhttps://api.docs.wabee.ai/_mock/openapi/core/v1/agent/config
- Production serverhttps://<your_agent_uri>.wabee.ai/core/v1/agent/config
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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
}'{ "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 }
- Mock serverhttps://api.docs.wabee.ai/_mock/openapi/core/v1/metadata
- Production serverhttps://<your_agent_uri>.wabee.ai/core/v1/metadata
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://api.docs.wabee.ai/_mock/openapi/core/v1/metadata \
-H 'x-wabee-access: YOUR_API_KEY_HERE'{ "body": { "id": "agent123", "name": "Wabee Agent", "description": "An AI agent that helps with specific tasks", "uri_id": "wabee-agent", "conversation_starters": [ … ] } }
Request
Generates a downloadable link for a file artifact created by the agent.
This endpoint:
- Retrieves the session state using the provided session ID (from the 'session-id' header)
- Gets the specified message by its index in the messages array
- Retrieves the generated_artifacts field from the message response_metadata
- 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.
- Mock serverhttps://api.docs.wabee.ai/_mock/openapi/core/v1/download_artifact/{message_index}/{artifact_index}
- Production serverhttps://<your_agent_uri>.wabee.ai/core/v1/download_artifact/{message_index}/{artifact_index}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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'{ "body": { "download_url": "https://s3.amazonaws.com/bucket-name/path/to/file.pdf?X-Amz-Algorithm=...", "file_name": "report.pdf", "file_type": "file" } }