Skip to main content
POST

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme.

Query Parameters

x-cancel-id
string

Cancel identifier for this assistant invocation. NOTE: this endpoint does NOT read this query param (nor the request-body cancel_token) — to cancel a running invocation, call POST /hub/agent/cancel instead. Kept for compatibility.

Body

application/json

Provide either subject (an existing assistant) OR an inline agent definition — 400 if neither. prompt (string or object) is expected but not strictly enforced by the engine. The old example field agent_subject is NOT read — use subject.

agent
object

Inline assistant definition - use this to define assistant configuration directly in the request.

subject
string

Subject of assistant assistant to invoke - use this to reference a pre-configured assistant.

Example:

"ms.hub.config.agent.8f5568aa-c88c-32d7-adfb-8565d367fb24"

prompt

The input prompt or query for the assistant to process - can be string or structured object.

Example:

"Analyze sales trends"

session_id
string

Session identifier for conversation continuity - omit for one-shot interactions.

Example:

"session_abc123"

cancel_token
string

NOTE: not read on invoke. To cancel a running invocation, call POST /hub/agent/cancel instead.

Example:

"my-session-token-123"

visibility
enum<string>

Visibility level for the invocation (user: private, team: shared).

Available options:
user,
team
knowledge
string[]

Additional knowledge sources for this specific invocation using URI schemes (kv://, obj://, str://, sid://, dta://).

response_subject
any

Subject for async response publishing.

await
boolean

Whether to wait for synchronous response (true) or return immediately (false).

folder
string

Optional folder/space path to organise the resulting session.

llm_provider
enum<string>

Override the provider for this invocation (requires model).

Available options:
claude,
anthropic
model
string

Override the model for this invocation (requires llm_provider).

no_invoke
boolean

If true, persist the message but do not run the assistant.

Response

Assistant invoked successfully.

name
string
required

Assistant name from the request.

session_id
string
required

Session ID for conversation continuity.

success
boolean
required

Whether the invocation succeeded.

duration_ms
integer
required

Total execution time in milliseconds.

provider
string
required

LLM provider used for this invocation.

model
string
required

Model identifier used for this invocation.

complete
boolean

Whether the assistant has completed its task (true) or requires more interaction (false).

escalate
boolean

Whether the assistant is requesting human intervention or admin escalation.

result
any

Assistant response - structured according to OutputSchema if defined, otherwise free-form string.

thinking
string

Model's reasoning or thought process extracted from the response.

error
object

Error details if success is false.

warnings
string[]

Non-fatal warnings from provisioning or execution.

input_tokens
integer

Number of input tokens consumed.

output_tokens
integer

Number of output tokens generated.

total_tokens
integer

Total tokens used (input + output).

cost
number<float>

Estimated cost in USD for this invocation.

summarization_status
enum<string>

Status of conversation summarization.

Available options:
none,
pending,
completed
message_count
integer

Total number of messages in the session conversation history.

token_usage
integer

Current conversation context usage in tokens.

instruction_metadata
object

Metadata about instruction processing if instructions were provided.

ai_summary_metadata
object

Metadata about AI summarization if performed.