Skip to main content
POST
Chat with Agent

Authorizations

Authorization
string
header
required

Enter your API key

Body

application/json
project_id
string
required

Project ID

bot_id
string
required

Agent ID

message
string
required

The user's message

provider_key
string

Optional API key for the AI provider

provider_host
string

Optional host URL for the AI provider

model
string

Override the default model for this request

source_ids
string[]

Specific memory sources to use

tags
string[]

Filter memory by tags

top
integer
default:5

Number of memory results to include

instruction
string

Override system instructions for this request

max_reply_tokens
integer

Maximum tokens in the response

stream
boolean
default:false

Enable streaming response

chat_id
string

Chat conversation ID (creates new if not provided)

reasoning_mode
enum<string>
default:auto

Reasoning mode for the agent response. 'auto' selects the best approach automatically, 'standard' for quick single-pass answers (1x credit), 'agent' for autonomous multi-step reasoning with tool use (up to 10x credit)

Available options:
auto,
standard,
agent
chat_mode
enum<string>
default:ask

Chat mode. 'ask' for normal chat, 'edit' for agent-powered code editing, 'plan' for conversational plan-then-execute workflow

Available options:
ask,
edit,
plan

Response

200 - application/json

Chat response received successfully

Response structure varies based on reasoning_mode. Contains 'chat' object with mode-specific fields.

chat
object

Chat response data with mode-specific structure