Skip to main content

Sending Input

send_input

Send user message to agent.

send

Send any InputMessage variant.

Permissions

send_permission_response

Respond to permission request.

set_dangerous_skip_permissions

Toggle permission bypass at runtime.

is_dangerous_skip_permissions_enabled

Check if permissions are bypassed.

Async Tools

send_tool_result

Send result for async tool.

Output Subscription

subscribe

Subscribe to output stream. MUST call before send_input.

State Management

state

Get current AgentState.

is_idle / is_processing / is_done

session_id

Get session ID.

Control

interrupt

Cancel current operation gracefully.

shutdown

Stop agent and clean up.

Metadata

set_custom_metadata

Update session metadata (works on running agent).

get_custom_metadata

Get custom metadata value.

set_conversation_name

Set conversation name.

conversation_name

Get conversation name.

Session Rules

add_session_rule

Add in-memory permission rule.