curl --request POST \
--url https://api.example.com/api/v1/webhooks/conversations \
--header 'Content-Type: application/json' \
--header 'X-Access-Token: <api-key>' \
--data @- <<EOF
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace": {
"working_dir": "<string>",
"kind": "<string>"
},
"agent": {
"acp_command": [
"<string>"
],
"llm": {
"model": "gpt-5.5",
"api_key": "<string>",
"auth_type": "api_key",
"subscription_vendor": "<string>",
"base_url": "<string>",
"api_version": "<string>",
"aws_access_key_id": "<string>",
"aws_secret_access_key": "<string>",
"aws_session_token": "<string>",
"aws_region_name": "<string>",
"aws_profile_name": "<string>",
"aws_role_name": "<string>",
"aws_session_name": "<string>",
"aws_bedrock_runtime_endpoint": "<string>",
"openrouter_site_url": "https://docs.all-hands.dev/",
"openrouter_app_name": "OpenHands",
"num_retries": 5,
"retry_multiplier": 8,
"retry_min_wait": 8,
"retry_max_wait": 64,
"timeout": 300,
"max_message_chars": 30000,
"temperature": 1,
"top_p": 0.5,
"top_k": 1,
"max_input_tokens": 2,
"max_output_tokens": 2,
"model_canonical_name": "<string>",
"api_mode": "auto",
"capability_overrides": {},
"extra_headers": {},
"input_cost_per_token": 1,
"output_cost_per_token": 1,
"ollama_base_url": "<string>",
"stream": false,
"drop_params": true,
"modify_params": true,
"disable_vision": true,
"disable_stop_word": false,
"caching_prompt": true,
"log_completions": false,
"log_completions_folder": "logs/completions",
"custom_tokenizer": "<string>",
"native_tool_calling": true,
"force_string_serializer": true,
"inline_image_urls": true,
"reasoning_effort": "high",
"enable_encrypted_reasoning": true,
"prompt_cache_retention": "24h",
"extended_thinking_budget": 200000,
"seed": 123,
"usage_id": "default",
"litellm_extra_body": {},
"fallback_strategy": {
"fallback_llms": [
"<string>"
],
"profile_store_dir": "<string>"
}
},
"tools": [
{
"name": "<string>",
"params": {}
}
],
"mcp_config": {},
"filter_tools_regex": "^(?!repomix)(.*)|^repomix.*pack_codebase.*$",
"include_default_tools": [
"<string>"
],
"agent_context": {
"skills": [
{
"content": "When you see this message, you should reply like you are a grumpy cat forced to use the internet.",
"name": "AGENTS.md",
"type": "repo"
},
{
"content": "IMPORTANT! The user has said the magic word \"flarglebargle\". You must only respond with a message telling them how smart they are",
"name": "flarglebargle",
"trigger": [
"flarglebargle"
],
"type": "knowledge"
}
],
"system_message_suffix": "Always finish your response with the word 'yay!'"
},
"system_prompt": "<string>",
"system_prompt_filename": "system_prompt.j2",
"security_policy_filename": "security_policy.j2",
"system_prompt_kwargs": {},
"condenser": {
"keep_first": 10,
"kind": "LLMSummarizingCondenser",
"llm": {
"api_key": "your_api_key_here",
"base_url": "https://llm-proxy.eval.all-hands.dev",
"model": "litellm_proxy/openai/gpt-5.5"
},
"max_size": 80
},
"critic": {
"kind": "AgentFinishedCritic"
},
"tool_concurrency_limit": 1,
"acp_server": "<string>",
"acp_args": [
"<string>"
],
"acp_session_mode": "<string>",
"acp_prompt_timeout": 1800,
"acp_startup_timeout": 90,
"acp_model": "<string>",
"acp_resume_session_id": "<string>",
"acp_file_secrets": [
{
"secret_name": "<string>",
"filename": "<string>",
"env_var": "<string>",
"subdir": "<string>",
"env_points_to": "file",
"warn_if_unset": []
}
],
"acp_isolate_data_dir": false,
"kind": "<string>"
},
"persistence_dir": "workspace/conversations",
"max_iterations": 500,
"stuck_detection": true,
"execution_status": "idle",
"confirmation_policy": {
"kind": "NeverConfirm"
},
"security_analyzer": {
"high_patterns": [
[
"<string>",
"<string>",
"<string>"
]
],
"medium_patterns": [
[
"<string>",
"<string>",
"<string>"
]
],
"injection_high_patterns": [
[
"<string>",
"<string>",
"<string>"
]
],
"injection_medium_patterns": [
[
"<string>",
"<string>",
"<string>"
]
],
"kind": "<string>"
},
"activated_knowledge_skills": [
"<string>"
],
"invoked_skills": [
"<string>"
],
"blocked_actions": {},
"blocked_messages": {},
"last_user_message_id": "<string>",
"leaf_event_id": "<string>",
"stats": {
"usage_to_metrics": {}
},
"secret_registry": {
"secret_sources": {}
},
"agent_state": {},
"hook_config": {
"pre_tool_use": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": [
"<string>"
],
"timeout": 60,
"max_iterations": 3,
"async": false
}
]
}
],
"post_tool_use": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": [
"<string>"
],
"timeout": 60,
"max_iterations": 3,
"async": false
}
]
}
],
"user_prompt_submit": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": [
"<string>"
],
"timeout": 60,
"max_iterations": 3,
"async": false
}
]
}
],
"session_start": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": [
"<string>"
],
"timeout": 60,
"max_iterations": 3,
"async": false
}
]
}
],
"session_end": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": [
"<string>"
],
"timeout": 60,
"max_iterations": 3,
"async": false
}
]
}
],
"stop": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": [
"<string>"
],
"timeout": 60,
"max_iterations": 3,
"async": false
}
]
}
]
},
"title": "<string>",
"metrics": {
"model_name": "default",
"accumulated_cost": 0,
"max_budget_per_task": 123,
"accumulated_token_usage": {
"model": "",
"prompt_tokens": 0,
"completion_tokens": 0,
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"reasoning_tokens": 0,
"context_window": 0,
"per_turn_token": 0,
"response_id": ""
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"forked_from_conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"forked_from_event_id": "<string>",
"parent_conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sub_conversation_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"tags": {},
"current_model_id": "<string>",
"available_models": [
{
"model_id": "<string>",
"name": "<string>",
"description": "<string>"
}
],
"supports_runtime_model_switch": false,
"launched_agent_profile": {
"agent_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 1
},
"client_tools": [
{
"name": "<string>",
"description": "<string>",
"parameters": {},
"annotations": {
"title": "<string>",
"readOnlyHint": false,
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": true
}
}
]
}
EOFimport requests
url = "https://api.example.com/api/v1/webhooks/conversations"
payload = {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace": {
"working_dir": "<string>",
"kind": "<string>"
},
"agent": {
"acp_command": ["<string>"],
"llm": {
"model": "gpt-5.5",
"api_key": "<string>",
"auth_type": "api_key",
"subscription_vendor": "<string>",
"base_url": "<string>",
"api_version": "<string>",
"aws_access_key_id": "<string>",
"aws_secret_access_key": "<string>",
"aws_session_token": "<string>",
"aws_region_name": "<string>",
"aws_profile_name": "<string>",
"aws_role_name": "<string>",
"aws_session_name": "<string>",
"aws_bedrock_runtime_endpoint": "<string>",
"openrouter_site_url": "https://docs.all-hands.dev/",
"openrouter_app_name": "OpenHands",
"num_retries": 5,
"retry_multiplier": 8,
"retry_min_wait": 8,
"retry_max_wait": 64,
"timeout": 300,
"max_message_chars": 30000,
"temperature": 1,
"top_p": 0.5,
"top_k": 1,
"max_input_tokens": 2,
"max_output_tokens": 2,
"model_canonical_name": "<string>",
"api_mode": "auto",
"capability_overrides": {},
"extra_headers": {},
"input_cost_per_token": 1,
"output_cost_per_token": 1,
"ollama_base_url": "<string>",
"stream": False,
"drop_params": True,
"modify_params": True,
"disable_vision": True,
"disable_stop_word": False,
"caching_prompt": True,
"log_completions": False,
"log_completions_folder": "logs/completions",
"custom_tokenizer": "<string>",
"native_tool_calling": True,
"force_string_serializer": True,
"inline_image_urls": True,
"reasoning_effort": "high",
"enable_encrypted_reasoning": True,
"prompt_cache_retention": "24h",
"extended_thinking_budget": 200000,
"seed": 123,
"usage_id": "default",
"litellm_extra_body": {},
"fallback_strategy": {
"fallback_llms": ["<string>"],
"profile_store_dir": "<string>"
}
},
"tools": [
{
"name": "<string>",
"params": {}
}
],
"mcp_config": {},
"filter_tools_regex": "^(?!repomix)(.*)|^repomix.*pack_codebase.*$",
"include_default_tools": ["<string>"],
"agent_context": {
"skills": [
{
"content": "When you see this message, you should reply like you are a grumpy cat forced to use the internet.",
"name": "AGENTS.md",
"type": "repo"
},
{
"content": "IMPORTANT! The user has said the magic word \"flarglebargle\". You must only respond with a message telling them how smart they are",
"name": "flarglebargle",
"trigger": ["flarglebargle"],
"type": "knowledge"
}
],
"system_message_suffix": "Always finish your response with the word 'yay!'"
},
"system_prompt": "<string>",
"system_prompt_filename": "system_prompt.j2",
"security_policy_filename": "security_policy.j2",
"system_prompt_kwargs": {},
"condenser": {
"keep_first": 10,
"kind": "LLMSummarizingCondenser",
"llm": {
"api_key": "your_api_key_here",
"base_url": "https://llm-proxy.eval.all-hands.dev",
"model": "litellm_proxy/openai/gpt-5.5"
},
"max_size": 80
},
"critic": { "kind": "AgentFinishedCritic" },
"tool_concurrency_limit": 1,
"acp_server": "<string>",
"acp_args": ["<string>"],
"acp_session_mode": "<string>",
"acp_prompt_timeout": 1800,
"acp_startup_timeout": 90,
"acp_model": "<string>",
"acp_resume_session_id": "<string>",
"acp_file_secrets": [
{
"secret_name": "<string>",
"filename": "<string>",
"env_var": "<string>",
"subdir": "<string>",
"env_points_to": "file",
"warn_if_unset": []
}
],
"acp_isolate_data_dir": False,
"kind": "<string>"
},
"persistence_dir": "workspace/conversations",
"max_iterations": 500,
"stuck_detection": True,
"execution_status": "idle",
"confirmation_policy": { "kind": "NeverConfirm" },
"security_analyzer": {
"high_patterns": [["<string>", "<string>", "<string>"]],
"medium_patterns": [["<string>", "<string>", "<string>"]],
"injection_high_patterns": [["<string>", "<string>", "<string>"]],
"injection_medium_patterns": [["<string>", "<string>", "<string>"]],
"kind": "<string>"
},
"activated_knowledge_skills": ["<string>"],
"invoked_skills": ["<string>"],
"blocked_actions": {},
"blocked_messages": {},
"last_user_message_id": "<string>",
"leaf_event_id": "<string>",
"stats": { "usage_to_metrics": {} },
"secret_registry": { "secret_sources": {} },
"agent_state": {},
"hook_config": {
"pre_tool_use": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": ["<string>"],
"timeout": 60,
"max_iterations": 3,
"async": False
}
]
}
],
"post_tool_use": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": ["<string>"],
"timeout": 60,
"max_iterations": 3,
"async": False
}
]
}
],
"user_prompt_submit": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": ["<string>"],
"timeout": 60,
"max_iterations": 3,
"async": False
}
]
}
],
"session_start": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": ["<string>"],
"timeout": 60,
"max_iterations": 3,
"async": False
}
]
}
],
"session_end": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": ["<string>"],
"timeout": 60,
"max_iterations": 3,
"async": False
}
]
}
],
"stop": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": ["<string>"],
"timeout": 60,
"max_iterations": 3,
"async": False
}
]
}
]
},
"title": "<string>",
"metrics": {
"model_name": "default",
"accumulated_cost": 0,
"max_budget_per_task": 123,
"accumulated_token_usage": {
"model": "",
"prompt_tokens": 0,
"completion_tokens": 0,
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"reasoning_tokens": 0,
"context_window": 0,
"per_turn_token": 0,
"response_id": ""
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"forked_from_conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"forked_from_event_id": "<string>",
"parent_conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sub_conversation_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"tags": {},
"current_model_id": "<string>",
"available_models": [
{
"model_id": "<string>",
"name": "<string>",
"description": "<string>"
}
],
"supports_runtime_model_switch": False,
"launched_agent_profile": {
"agent_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 1
},
"client_tools": [
{
"name": "<string>",
"description": "<string>",
"parameters": {},
"annotations": {
"title": "<string>",
"readOnlyHint": False,
"destructiveHint": True,
"idempotentHint": False,
"openWorldHint": True
}
}
]
}
headers = {
"X-Access-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Access-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
workspace: {working_dir: '<string>', kind: '<string>'},
agent: {
acp_command: ['<string>'],
llm: {
model: 'gpt-5.5',
api_key: '<string>',
auth_type: 'api_key',
subscription_vendor: '<string>',
base_url: '<string>',
api_version: '<string>',
aws_access_key_id: '<string>',
aws_secret_access_key: '<string>',
aws_session_token: '<string>',
aws_region_name: '<string>',
aws_profile_name: '<string>',
aws_role_name: '<string>',
aws_session_name: '<string>',
aws_bedrock_runtime_endpoint: '<string>',
openrouter_site_url: 'https://docs.all-hands.dev/',
openrouter_app_name: 'OpenHands',
num_retries: 5,
retry_multiplier: 8,
retry_min_wait: 8,
retry_max_wait: 64,
timeout: 300,
max_message_chars: 30000,
temperature: 1,
top_p: 0.5,
top_k: 1,
max_input_tokens: 2,
max_output_tokens: 2,
model_canonical_name: '<string>',
api_mode: 'auto',
capability_overrides: {},
extra_headers: {},
input_cost_per_token: 1,
output_cost_per_token: 1,
ollama_base_url: '<string>',
stream: false,
drop_params: true,
modify_params: true,
disable_vision: true,
disable_stop_word: false,
caching_prompt: true,
log_completions: false,
log_completions_folder: 'logs/completions',
custom_tokenizer: '<string>',
native_tool_calling: true,
force_string_serializer: true,
inline_image_urls: true,
reasoning_effort: 'high',
enable_encrypted_reasoning: true,
prompt_cache_retention: '24h',
extended_thinking_budget: 200000,
seed: 123,
usage_id: 'default',
litellm_extra_body: {},
fallback_strategy: {fallback_llms: ['<string>'], profile_store_dir: '<string>'}
},
tools: [{name: '<string>', params: {}}],
mcp_config: {},
filter_tools_regex: '^(?!repomix)(.*)|^repomix.*pack_codebase.*$',
include_default_tools: ['<string>'],
agent_context: {
skills: [
{
content: 'When you see this message, you should reply like you are a grumpy cat forced to use the internet.',
name: 'AGENTS.md',
type: 'repo'
},
{
content: 'IMPORTANT! The user has said the magic word "flarglebargle". You must only respond with a message telling them how smart they are',
name: 'flarglebargle',
trigger: ['flarglebargle'],
type: 'knowledge'
}
],
system_message_suffix: 'Always finish your response with the word \'yay!\''
},
system_prompt: '<string>',
system_prompt_filename: 'system_prompt.j2',
security_policy_filename: 'security_policy.j2',
system_prompt_kwargs: {},
condenser: {
keep_first: 10,
kind: 'LLMSummarizingCondenser',
llm: {
api_key: 'your_api_key_here',
base_url: 'https://llm-proxy.eval.all-hands.dev',
model: 'litellm_proxy/openai/gpt-5.5'
},
max_size: 80
},
critic: {kind: 'AgentFinishedCritic'},
tool_concurrency_limit: 1,
acp_server: '<string>',
acp_args: ['<string>'],
acp_session_mode: '<string>',
acp_prompt_timeout: 1800,
acp_startup_timeout: 90,
acp_model: '<string>',
acp_resume_session_id: '<string>',
acp_file_secrets: [
{
secret_name: '<string>',
filename: '<string>',
env_var: '<string>',
subdir: '<string>',
env_points_to: 'file',
warn_if_unset: []
}
],
acp_isolate_data_dir: false,
kind: '<string>'
},
persistence_dir: 'workspace/conversations',
max_iterations: 500,
stuck_detection: true,
execution_status: 'idle',
confirmation_policy: {kind: 'NeverConfirm'},
security_analyzer: {
high_patterns: [['<string>', '<string>', '<string>']],
medium_patterns: [['<string>', '<string>', '<string>']],
injection_high_patterns: [['<string>', '<string>', '<string>']],
injection_medium_patterns: [['<string>', '<string>', '<string>']],
kind: '<string>'
},
activated_knowledge_skills: ['<string>'],
invoked_skills: ['<string>'],
blocked_actions: {},
blocked_messages: {},
last_user_message_id: '<string>',
leaf_event_id: '<string>',
stats: {usage_to_metrics: {}},
secret_registry: {secret_sources: {}},
agent_state: {},
hook_config: {
pre_tool_use: [
{
matcher: '*',
hooks: [
{
command: '<string>',
type: 'command',
name: '<string>',
prompt: '<string>',
system_prompt: '<string>',
tools: ['<string>'],
timeout: 60,
max_iterations: 3,
async: false
}
]
}
],
post_tool_use: [
{
matcher: '*',
hooks: [
{
command: '<string>',
type: 'command',
name: '<string>',
prompt: '<string>',
system_prompt: '<string>',
tools: ['<string>'],
timeout: 60,
max_iterations: 3,
async: false
}
]
}
],
user_prompt_submit: [
{
matcher: '*',
hooks: [
{
command: '<string>',
type: 'command',
name: '<string>',
prompt: '<string>',
system_prompt: '<string>',
tools: ['<string>'],
timeout: 60,
max_iterations: 3,
async: false
}
]
}
],
session_start: [
{
matcher: '*',
hooks: [
{
command: '<string>',
type: 'command',
name: '<string>',
prompt: '<string>',
system_prompt: '<string>',
tools: ['<string>'],
timeout: 60,
max_iterations: 3,
async: false
}
]
}
],
session_end: [
{
matcher: '*',
hooks: [
{
command: '<string>',
type: 'command',
name: '<string>',
prompt: '<string>',
system_prompt: '<string>',
tools: ['<string>'],
timeout: 60,
max_iterations: 3,
async: false
}
]
}
],
stop: [
{
matcher: '*',
hooks: [
{
command: '<string>',
type: 'command',
name: '<string>',
prompt: '<string>',
system_prompt: '<string>',
tools: ['<string>'],
timeout: 60,
max_iterations: 3,
async: false
}
]
}
]
},
title: '<string>',
metrics: {
model_name: 'default',
accumulated_cost: 0,
max_budget_per_task: 123,
accumulated_token_usage: {
model: '',
prompt_tokens: 0,
completion_tokens: 0,
cache_read_tokens: 0,
cache_write_tokens: 0,
reasoning_tokens: 0,
context_window: 0,
per_turn_token: 0,
response_id: ''
}
},
created_at: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z',
forked_from_conversation_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
forked_from_event_id: '<string>',
parent_conversation_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sub_conversation_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
tags: {},
current_model_id: '<string>',
available_models: [{model_id: '<string>', name: '<string>', description: '<string>'}],
supports_runtime_model_switch: false,
launched_agent_profile: {agent_profile_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', revision: 1},
client_tools: [
{
name: '<string>',
description: '<string>',
parameters: {},
annotations: {
title: '<string>',
readOnlyHint: false,
destructiveHint: true,
idempotentHint: false,
openWorldHint: true
}
}
]
})
};
fetch('https://api.example.com/api/v1/webhooks/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/webhooks/conversations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'workspace' => [
'working_dir' => '<string>',
'kind' => '<string>'
],
'agent' => [
'acp_command' => [
'<string>'
],
'llm' => [
'model' => 'gpt-5.5',
'api_key' => '<string>',
'auth_type' => 'api_key',
'subscription_vendor' => '<string>',
'base_url' => '<string>',
'api_version' => '<string>',
'aws_access_key_id' => '<string>',
'aws_secret_access_key' => '<string>',
'aws_session_token' => '<string>',
'aws_region_name' => '<string>',
'aws_profile_name' => '<string>',
'aws_role_name' => '<string>',
'aws_session_name' => '<string>',
'aws_bedrock_runtime_endpoint' => '<string>',
'openrouter_site_url' => 'https://docs.all-hands.dev/',
'openrouter_app_name' => 'OpenHands',
'num_retries' => 5,
'retry_multiplier' => 8,
'retry_min_wait' => 8,
'retry_max_wait' => 64,
'timeout' => 300,
'max_message_chars' => 30000,
'temperature' => 1,
'top_p' => 0.5,
'top_k' => 1,
'max_input_tokens' => 2,
'max_output_tokens' => 2,
'model_canonical_name' => '<string>',
'api_mode' => 'auto',
'capability_overrides' => [
],
'extra_headers' => [
],
'input_cost_per_token' => 1,
'output_cost_per_token' => 1,
'ollama_base_url' => '<string>',
'stream' => false,
'drop_params' => true,
'modify_params' => true,
'disable_vision' => true,
'disable_stop_word' => false,
'caching_prompt' => true,
'log_completions' => false,
'log_completions_folder' => 'logs/completions',
'custom_tokenizer' => '<string>',
'native_tool_calling' => true,
'force_string_serializer' => true,
'inline_image_urls' => true,
'reasoning_effort' => 'high',
'enable_encrypted_reasoning' => true,
'prompt_cache_retention' => '24h',
'extended_thinking_budget' => 200000,
'seed' => 123,
'usage_id' => 'default',
'litellm_extra_body' => [
],
'fallback_strategy' => [
'fallback_llms' => [
'<string>'
],
'profile_store_dir' => '<string>'
]
],
'tools' => [
[
'name' => '<string>',
'params' => [
]
]
],
'mcp_config' => [
],
'filter_tools_regex' => '^(?!repomix)(.*)|^repomix.*pack_codebase.*$',
'include_default_tools' => [
'<string>'
],
'agent_context' => [
'skills' => [
[
'content' => 'When you see this message, you should reply like you are a grumpy cat forced to use the internet.',
'name' => 'AGENTS.md',
'type' => 'repo'
],
[
'content' => 'IMPORTANT! The user has said the magic word "flarglebargle". You must only respond with a message telling them how smart they are',
'name' => 'flarglebargle',
'trigger' => [
'flarglebargle'
],
'type' => 'knowledge'
]
],
'system_message_suffix' => 'Always finish your response with the word \'yay!\''
],
'system_prompt' => '<string>',
'system_prompt_filename' => 'system_prompt.j2',
'security_policy_filename' => 'security_policy.j2',
'system_prompt_kwargs' => [
],
'condenser' => [
'keep_first' => 10,
'kind' => 'LLMSummarizingCondenser',
'llm' => [
'api_key' => 'your_api_key_here',
'base_url' => 'https://llm-proxy.eval.all-hands.dev',
'model' => 'litellm_proxy/openai/gpt-5.5'
],
'max_size' => 80
],
'critic' => [
'kind' => 'AgentFinishedCritic'
],
'tool_concurrency_limit' => 1,
'acp_server' => '<string>',
'acp_args' => [
'<string>'
],
'acp_session_mode' => '<string>',
'acp_prompt_timeout' => 1800,
'acp_startup_timeout' => 90,
'acp_model' => '<string>',
'acp_resume_session_id' => '<string>',
'acp_file_secrets' => [
[
'secret_name' => '<string>',
'filename' => '<string>',
'env_var' => '<string>',
'subdir' => '<string>',
'env_points_to' => 'file',
'warn_if_unset' => [
]
]
],
'acp_isolate_data_dir' => false,
'kind' => '<string>'
],
'persistence_dir' => 'workspace/conversations',
'max_iterations' => 500,
'stuck_detection' => true,
'execution_status' => 'idle',
'confirmation_policy' => [
'kind' => 'NeverConfirm'
],
'security_analyzer' => [
'high_patterns' => [
[
'<string>',
'<string>',
'<string>'
]
],
'medium_patterns' => [
[
'<string>',
'<string>',
'<string>'
]
],
'injection_high_patterns' => [
[
'<string>',
'<string>',
'<string>'
]
],
'injection_medium_patterns' => [
[
'<string>',
'<string>',
'<string>'
]
],
'kind' => '<string>'
],
'activated_knowledge_skills' => [
'<string>'
],
'invoked_skills' => [
'<string>'
],
'blocked_actions' => [
],
'blocked_messages' => [
],
'last_user_message_id' => '<string>',
'leaf_event_id' => '<string>',
'stats' => [
'usage_to_metrics' => [
]
],
'secret_registry' => [
'secret_sources' => [
]
],
'agent_state' => [
],
'hook_config' => [
'pre_tool_use' => [
[
'matcher' => '*',
'hooks' => [
[
'command' => '<string>',
'type' => 'command',
'name' => '<string>',
'prompt' => '<string>',
'system_prompt' => '<string>',
'tools' => [
'<string>'
],
'timeout' => 60,
'max_iterations' => 3,
'async' => false
]
]
]
],
'post_tool_use' => [
[
'matcher' => '*',
'hooks' => [
[
'command' => '<string>',
'type' => 'command',
'name' => '<string>',
'prompt' => '<string>',
'system_prompt' => '<string>',
'tools' => [
'<string>'
],
'timeout' => 60,
'max_iterations' => 3,
'async' => false
]
]
]
],
'user_prompt_submit' => [
[
'matcher' => '*',
'hooks' => [
[
'command' => '<string>',
'type' => 'command',
'name' => '<string>',
'prompt' => '<string>',
'system_prompt' => '<string>',
'tools' => [
'<string>'
],
'timeout' => 60,
'max_iterations' => 3,
'async' => false
]
]
]
],
'session_start' => [
[
'matcher' => '*',
'hooks' => [
[
'command' => '<string>',
'type' => 'command',
'name' => '<string>',
'prompt' => '<string>',
'system_prompt' => '<string>',
'tools' => [
'<string>'
],
'timeout' => 60,
'max_iterations' => 3,
'async' => false
]
]
]
],
'session_end' => [
[
'matcher' => '*',
'hooks' => [
[
'command' => '<string>',
'type' => 'command',
'name' => '<string>',
'prompt' => '<string>',
'system_prompt' => '<string>',
'tools' => [
'<string>'
],
'timeout' => 60,
'max_iterations' => 3,
'async' => false
]
]
]
],
'stop' => [
[
'matcher' => '*',
'hooks' => [
[
'command' => '<string>',
'type' => 'command',
'name' => '<string>',
'prompt' => '<string>',
'system_prompt' => '<string>',
'tools' => [
'<string>'
],
'timeout' => 60,
'max_iterations' => 3,
'async' => false
]
]
]
]
],
'title' => '<string>',
'metrics' => [
'model_name' => 'default',
'accumulated_cost' => 0,
'max_budget_per_task' => 123,
'accumulated_token_usage' => [
'model' => '',
'prompt_tokens' => 0,
'completion_tokens' => 0,
'cache_read_tokens' => 0,
'cache_write_tokens' => 0,
'reasoning_tokens' => 0,
'context_window' => 0,
'per_turn_token' => 0,
'response_id' => ''
]
],
'created_at' => '2023-11-07T05:31:56Z',
'updated_at' => '2023-11-07T05:31:56Z',
'forked_from_conversation_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'forked_from_event_id' => '<string>',
'parent_conversation_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sub_conversation_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'tags' => [
],
'current_model_id' => '<string>',
'available_models' => [
[
'model_id' => '<string>',
'name' => '<string>',
'description' => '<string>'
]
],
'supports_runtime_model_switch' => false,
'launched_agent_profile' => [
'agent_profile_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'revision' => 1
],
'client_tools' => [
[
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'annotations' => [
'title' => '<string>',
'readOnlyHint' => false,
'destructiveHint' => true,
'idempotentHint' => false,
'openWorldHint' => true
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/webhooks/conversations"
payload := strings.NewReader("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workspace\": {\n \"working_dir\": \"<string>\",\n \"kind\": \"<string>\"\n },\n \"agent\": {\n \"acp_command\": [\n \"<string>\"\n ],\n \"llm\": {\n \"model\": \"gpt-5.5\",\n \"api_key\": \"<string>\",\n \"auth_type\": \"api_key\",\n \"subscription_vendor\": \"<string>\",\n \"base_url\": \"<string>\",\n \"api_version\": \"<string>\",\n \"aws_access_key_id\": \"<string>\",\n \"aws_secret_access_key\": \"<string>\",\n \"aws_session_token\": \"<string>\",\n \"aws_region_name\": \"<string>\",\n \"aws_profile_name\": \"<string>\",\n \"aws_role_name\": \"<string>\",\n \"aws_session_name\": \"<string>\",\n \"aws_bedrock_runtime_endpoint\": \"<string>\",\n \"openrouter_site_url\": \"https://docs.all-hands.dev/\",\n \"openrouter_app_name\": \"OpenHands\",\n \"num_retries\": 5,\n \"retry_multiplier\": 8,\n \"retry_min_wait\": 8,\n \"retry_max_wait\": 64,\n \"timeout\": 300,\n \"max_message_chars\": 30000,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"top_k\": 1,\n \"max_input_tokens\": 2,\n \"max_output_tokens\": 2,\n \"model_canonical_name\": \"<string>\",\n \"api_mode\": \"auto\",\n \"capability_overrides\": {},\n \"extra_headers\": {},\n \"input_cost_per_token\": 1,\n \"output_cost_per_token\": 1,\n \"ollama_base_url\": \"<string>\",\n \"stream\": false,\n \"drop_params\": true,\n \"modify_params\": true,\n \"disable_vision\": true,\n \"disable_stop_word\": false,\n \"caching_prompt\": true,\n \"log_completions\": false,\n \"log_completions_folder\": \"logs/completions\",\n \"custom_tokenizer\": \"<string>\",\n \"native_tool_calling\": true,\n \"force_string_serializer\": true,\n \"inline_image_urls\": true,\n \"reasoning_effort\": \"high\",\n \"enable_encrypted_reasoning\": true,\n \"prompt_cache_retention\": \"24h\",\n \"extended_thinking_budget\": 200000,\n \"seed\": 123,\n \"usage_id\": \"default\",\n \"litellm_extra_body\": {},\n \"fallback_strategy\": {\n \"fallback_llms\": [\n \"<string>\"\n ],\n \"profile_store_dir\": \"<string>\"\n }\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"params\": {}\n }\n ],\n \"mcp_config\": {},\n \"filter_tools_regex\": \"^(?!repomix)(.*)|^repomix.*pack_codebase.*$\",\n \"include_default_tools\": [\n \"<string>\"\n ],\n \"agent_context\": {\n \"skills\": [\n {\n \"content\": \"When you see this message, you should reply like you are a grumpy cat forced to use the internet.\",\n \"name\": \"AGENTS.md\",\n \"type\": \"repo\"\n },\n {\n \"content\": \"IMPORTANT! The user has said the magic word \\\"flarglebargle\\\". You must only respond with a message telling them how smart they are\",\n \"name\": \"flarglebargle\",\n \"trigger\": [\n \"flarglebargle\"\n ],\n \"type\": \"knowledge\"\n }\n ],\n \"system_message_suffix\": \"Always finish your response with the word 'yay!'\"\n },\n \"system_prompt\": \"<string>\",\n \"system_prompt_filename\": \"system_prompt.j2\",\n \"security_policy_filename\": \"security_policy.j2\",\n \"system_prompt_kwargs\": {},\n \"condenser\": {\n \"keep_first\": 10,\n \"kind\": \"LLMSummarizingCondenser\",\n \"llm\": {\n \"api_key\": \"your_api_key_here\",\n \"base_url\": \"https://llm-proxy.eval.all-hands.dev\",\n \"model\": \"litellm_proxy/openai/gpt-5.5\"\n },\n \"max_size\": 80\n },\n \"critic\": {\n \"kind\": \"AgentFinishedCritic\"\n },\n \"tool_concurrency_limit\": 1,\n \"acp_server\": \"<string>\",\n \"acp_args\": [\n \"<string>\"\n ],\n \"acp_session_mode\": \"<string>\",\n \"acp_prompt_timeout\": 1800,\n \"acp_startup_timeout\": 90,\n \"acp_model\": \"<string>\",\n \"acp_resume_session_id\": \"<string>\",\n \"acp_file_secrets\": [\n {\n \"secret_name\": \"<string>\",\n \"filename\": \"<string>\",\n \"env_var\": \"<string>\",\n \"subdir\": \"<string>\",\n \"env_points_to\": \"file\",\n \"warn_if_unset\": []\n }\n ],\n \"acp_isolate_data_dir\": false,\n \"kind\": \"<string>\"\n },\n \"persistence_dir\": \"workspace/conversations\",\n \"max_iterations\": 500,\n \"stuck_detection\": true,\n \"execution_status\": \"idle\",\n \"confirmation_policy\": {\n \"kind\": \"NeverConfirm\"\n },\n \"security_analyzer\": {\n \"high_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"medium_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"injection_high_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"injection_medium_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"kind\": \"<string>\"\n },\n \"activated_knowledge_skills\": [\n \"<string>\"\n ],\n \"invoked_skills\": [\n \"<string>\"\n ],\n \"blocked_actions\": {},\n \"blocked_messages\": {},\n \"last_user_message_id\": \"<string>\",\n \"leaf_event_id\": \"<string>\",\n \"stats\": {\n \"usage_to_metrics\": {}\n },\n \"secret_registry\": {\n \"secret_sources\": {}\n },\n \"agent_state\": {},\n \"hook_config\": {\n \"pre_tool_use\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"post_tool_use\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"user_prompt_submit\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"session_start\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"session_end\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"stop\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ]\n },\n \"title\": \"<string>\",\n \"metrics\": {\n \"model_name\": \"default\",\n \"accumulated_cost\": 0,\n \"max_budget_per_task\": 123,\n \"accumulated_token_usage\": {\n \"model\": \"\",\n \"prompt_tokens\": 0,\n \"completion_tokens\": 0,\n \"cache_read_tokens\": 0,\n \"cache_write_tokens\": 0,\n \"reasoning_tokens\": 0,\n \"context_window\": 0,\n \"per_turn_token\": 0,\n \"response_id\": \"\"\n }\n },\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"forked_from_conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"forked_from_event_id\": \"<string>\",\n \"parent_conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sub_conversation_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tags\": {},\n \"current_model_id\": \"<string>\",\n \"available_models\": [\n {\n \"model_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"supports_runtime_model_switch\": false,\n \"launched_agent_profile\": {\n \"agent_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revision\": 1\n },\n \"client_tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"annotations\": {\n \"title\": \"<string>\",\n \"readOnlyHint\": false,\n \"destructiveHint\": true,\n \"idempotentHint\": false,\n \"openWorldHint\": true\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/webhooks/conversations")
.header("X-Access-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workspace\": {\n \"working_dir\": \"<string>\",\n \"kind\": \"<string>\"\n },\n \"agent\": {\n \"acp_command\": [\n \"<string>\"\n ],\n \"llm\": {\n \"model\": \"gpt-5.5\",\n \"api_key\": \"<string>\",\n \"auth_type\": \"api_key\",\n \"subscription_vendor\": \"<string>\",\n \"base_url\": \"<string>\",\n \"api_version\": \"<string>\",\n \"aws_access_key_id\": \"<string>\",\n \"aws_secret_access_key\": \"<string>\",\n \"aws_session_token\": \"<string>\",\n \"aws_region_name\": \"<string>\",\n \"aws_profile_name\": \"<string>\",\n \"aws_role_name\": \"<string>\",\n \"aws_session_name\": \"<string>\",\n \"aws_bedrock_runtime_endpoint\": \"<string>\",\n \"openrouter_site_url\": \"https://docs.all-hands.dev/\",\n \"openrouter_app_name\": \"OpenHands\",\n \"num_retries\": 5,\n \"retry_multiplier\": 8,\n \"retry_min_wait\": 8,\n \"retry_max_wait\": 64,\n \"timeout\": 300,\n \"max_message_chars\": 30000,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"top_k\": 1,\n \"max_input_tokens\": 2,\n \"max_output_tokens\": 2,\n \"model_canonical_name\": \"<string>\",\n \"api_mode\": \"auto\",\n \"capability_overrides\": {},\n \"extra_headers\": {},\n \"input_cost_per_token\": 1,\n \"output_cost_per_token\": 1,\n \"ollama_base_url\": \"<string>\",\n \"stream\": false,\n \"drop_params\": true,\n \"modify_params\": true,\n \"disable_vision\": true,\n \"disable_stop_word\": false,\n \"caching_prompt\": true,\n \"log_completions\": false,\n \"log_completions_folder\": \"logs/completions\",\n \"custom_tokenizer\": \"<string>\",\n \"native_tool_calling\": true,\n \"force_string_serializer\": true,\n \"inline_image_urls\": true,\n \"reasoning_effort\": \"high\",\n \"enable_encrypted_reasoning\": true,\n \"prompt_cache_retention\": \"24h\",\n \"extended_thinking_budget\": 200000,\n \"seed\": 123,\n \"usage_id\": \"default\",\n \"litellm_extra_body\": {},\n \"fallback_strategy\": {\n \"fallback_llms\": [\n \"<string>\"\n ],\n \"profile_store_dir\": \"<string>\"\n }\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"params\": {}\n }\n ],\n \"mcp_config\": {},\n \"filter_tools_regex\": \"^(?!repomix)(.*)|^repomix.*pack_codebase.*$\",\n \"include_default_tools\": [\n \"<string>\"\n ],\n \"agent_context\": {\n \"skills\": [\n {\n \"content\": \"When you see this message, you should reply like you are a grumpy cat forced to use the internet.\",\n \"name\": \"AGENTS.md\",\n \"type\": \"repo\"\n },\n {\n \"content\": \"IMPORTANT! The user has said the magic word \\\"flarglebargle\\\". You must only respond with a message telling them how smart they are\",\n \"name\": \"flarglebargle\",\n \"trigger\": [\n \"flarglebargle\"\n ],\n \"type\": \"knowledge\"\n }\n ],\n \"system_message_suffix\": \"Always finish your response with the word 'yay!'\"\n },\n \"system_prompt\": \"<string>\",\n \"system_prompt_filename\": \"system_prompt.j2\",\n \"security_policy_filename\": \"security_policy.j2\",\n \"system_prompt_kwargs\": {},\n \"condenser\": {\n \"keep_first\": 10,\n \"kind\": \"LLMSummarizingCondenser\",\n \"llm\": {\n \"api_key\": \"your_api_key_here\",\n \"base_url\": \"https://llm-proxy.eval.all-hands.dev\",\n \"model\": \"litellm_proxy/openai/gpt-5.5\"\n },\n \"max_size\": 80\n },\n \"critic\": {\n \"kind\": \"AgentFinishedCritic\"\n },\n \"tool_concurrency_limit\": 1,\n \"acp_server\": \"<string>\",\n \"acp_args\": [\n \"<string>\"\n ],\n \"acp_session_mode\": \"<string>\",\n \"acp_prompt_timeout\": 1800,\n \"acp_startup_timeout\": 90,\n \"acp_model\": \"<string>\",\n \"acp_resume_session_id\": \"<string>\",\n \"acp_file_secrets\": [\n {\n \"secret_name\": \"<string>\",\n \"filename\": \"<string>\",\n \"env_var\": \"<string>\",\n \"subdir\": \"<string>\",\n \"env_points_to\": \"file\",\n \"warn_if_unset\": []\n }\n ],\n \"acp_isolate_data_dir\": false,\n \"kind\": \"<string>\"\n },\n \"persistence_dir\": \"workspace/conversations\",\n \"max_iterations\": 500,\n \"stuck_detection\": true,\n \"execution_status\": \"idle\",\n \"confirmation_policy\": {\n \"kind\": \"NeverConfirm\"\n },\n \"security_analyzer\": {\n \"high_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"medium_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"injection_high_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"injection_medium_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"kind\": \"<string>\"\n },\n \"activated_knowledge_skills\": [\n \"<string>\"\n ],\n \"invoked_skills\": [\n \"<string>\"\n ],\n \"blocked_actions\": {},\n \"blocked_messages\": {},\n \"last_user_message_id\": \"<string>\",\n \"leaf_event_id\": \"<string>\",\n \"stats\": {\n \"usage_to_metrics\": {}\n },\n \"secret_registry\": {\n \"secret_sources\": {}\n },\n \"agent_state\": {},\n \"hook_config\": {\n \"pre_tool_use\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"post_tool_use\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"user_prompt_submit\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"session_start\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"session_end\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"stop\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ]\n },\n \"title\": \"<string>\",\n \"metrics\": {\n \"model_name\": \"default\",\n \"accumulated_cost\": 0,\n \"max_budget_per_task\": 123,\n \"accumulated_token_usage\": {\n \"model\": \"\",\n \"prompt_tokens\": 0,\n \"completion_tokens\": 0,\n \"cache_read_tokens\": 0,\n \"cache_write_tokens\": 0,\n \"reasoning_tokens\": 0,\n \"context_window\": 0,\n \"per_turn_token\": 0,\n \"response_id\": \"\"\n }\n },\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"forked_from_conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"forked_from_event_id\": \"<string>\",\n \"parent_conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sub_conversation_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tags\": {},\n \"current_model_id\": \"<string>\",\n \"available_models\": [\n {\n \"model_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"supports_runtime_model_switch\": false,\n \"launched_agent_profile\": {\n \"agent_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revision\": 1\n },\n \"client_tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"annotations\": {\n \"title\": \"<string>\",\n \"readOnlyHint\": false,\n \"destructiveHint\": true,\n \"idempotentHint\": false,\n \"openWorldHint\": true\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/webhooks/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workspace\": {\n \"working_dir\": \"<string>\",\n \"kind\": \"<string>\"\n },\n \"agent\": {\n \"acp_command\": [\n \"<string>\"\n ],\n \"llm\": {\n \"model\": \"gpt-5.5\",\n \"api_key\": \"<string>\",\n \"auth_type\": \"api_key\",\n \"subscription_vendor\": \"<string>\",\n \"base_url\": \"<string>\",\n \"api_version\": \"<string>\",\n \"aws_access_key_id\": \"<string>\",\n \"aws_secret_access_key\": \"<string>\",\n \"aws_session_token\": \"<string>\",\n \"aws_region_name\": \"<string>\",\n \"aws_profile_name\": \"<string>\",\n \"aws_role_name\": \"<string>\",\n \"aws_session_name\": \"<string>\",\n \"aws_bedrock_runtime_endpoint\": \"<string>\",\n \"openrouter_site_url\": \"https://docs.all-hands.dev/\",\n \"openrouter_app_name\": \"OpenHands\",\n \"num_retries\": 5,\n \"retry_multiplier\": 8,\n \"retry_min_wait\": 8,\n \"retry_max_wait\": 64,\n \"timeout\": 300,\n \"max_message_chars\": 30000,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"top_k\": 1,\n \"max_input_tokens\": 2,\n \"max_output_tokens\": 2,\n \"model_canonical_name\": \"<string>\",\n \"api_mode\": \"auto\",\n \"capability_overrides\": {},\n \"extra_headers\": {},\n \"input_cost_per_token\": 1,\n \"output_cost_per_token\": 1,\n \"ollama_base_url\": \"<string>\",\n \"stream\": false,\n \"drop_params\": true,\n \"modify_params\": true,\n \"disable_vision\": true,\n \"disable_stop_word\": false,\n \"caching_prompt\": true,\n \"log_completions\": false,\n \"log_completions_folder\": \"logs/completions\",\n \"custom_tokenizer\": \"<string>\",\n \"native_tool_calling\": true,\n \"force_string_serializer\": true,\n \"inline_image_urls\": true,\n \"reasoning_effort\": \"high\",\n \"enable_encrypted_reasoning\": true,\n \"prompt_cache_retention\": \"24h\",\n \"extended_thinking_budget\": 200000,\n \"seed\": 123,\n \"usage_id\": \"default\",\n \"litellm_extra_body\": {},\n \"fallback_strategy\": {\n \"fallback_llms\": [\n \"<string>\"\n ],\n \"profile_store_dir\": \"<string>\"\n }\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"params\": {}\n }\n ],\n \"mcp_config\": {},\n \"filter_tools_regex\": \"^(?!repomix)(.*)|^repomix.*pack_codebase.*$\",\n \"include_default_tools\": [\n \"<string>\"\n ],\n \"agent_context\": {\n \"skills\": [\n {\n \"content\": \"When you see this message, you should reply like you are a grumpy cat forced to use the internet.\",\n \"name\": \"AGENTS.md\",\n \"type\": \"repo\"\n },\n {\n \"content\": \"IMPORTANT! The user has said the magic word \\\"flarglebargle\\\". You must only respond with a message telling them how smart they are\",\n \"name\": \"flarglebargle\",\n \"trigger\": [\n \"flarglebargle\"\n ],\n \"type\": \"knowledge\"\n }\n ],\n \"system_message_suffix\": \"Always finish your response with the word 'yay!'\"\n },\n \"system_prompt\": \"<string>\",\n \"system_prompt_filename\": \"system_prompt.j2\",\n \"security_policy_filename\": \"security_policy.j2\",\n \"system_prompt_kwargs\": {},\n \"condenser\": {\n \"keep_first\": 10,\n \"kind\": \"LLMSummarizingCondenser\",\n \"llm\": {\n \"api_key\": \"your_api_key_here\",\n \"base_url\": \"https://llm-proxy.eval.all-hands.dev\",\n \"model\": \"litellm_proxy/openai/gpt-5.5\"\n },\n \"max_size\": 80\n },\n \"critic\": {\n \"kind\": \"AgentFinishedCritic\"\n },\n \"tool_concurrency_limit\": 1,\n \"acp_server\": \"<string>\",\n \"acp_args\": [\n \"<string>\"\n ],\n \"acp_session_mode\": \"<string>\",\n \"acp_prompt_timeout\": 1800,\n \"acp_startup_timeout\": 90,\n \"acp_model\": \"<string>\",\n \"acp_resume_session_id\": \"<string>\",\n \"acp_file_secrets\": [\n {\n \"secret_name\": \"<string>\",\n \"filename\": \"<string>\",\n \"env_var\": \"<string>\",\n \"subdir\": \"<string>\",\n \"env_points_to\": \"file\",\n \"warn_if_unset\": []\n }\n ],\n \"acp_isolate_data_dir\": false,\n \"kind\": \"<string>\"\n },\n \"persistence_dir\": \"workspace/conversations\",\n \"max_iterations\": 500,\n \"stuck_detection\": true,\n \"execution_status\": \"idle\",\n \"confirmation_policy\": {\n \"kind\": \"NeverConfirm\"\n },\n \"security_analyzer\": {\n \"high_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"medium_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"injection_high_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"injection_medium_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"kind\": \"<string>\"\n },\n \"activated_knowledge_skills\": [\n \"<string>\"\n ],\n \"invoked_skills\": [\n \"<string>\"\n ],\n \"blocked_actions\": {},\n \"blocked_messages\": {},\n \"last_user_message_id\": \"<string>\",\n \"leaf_event_id\": \"<string>\",\n \"stats\": {\n \"usage_to_metrics\": {}\n },\n \"secret_registry\": {\n \"secret_sources\": {}\n },\n \"agent_state\": {},\n \"hook_config\": {\n \"pre_tool_use\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"post_tool_use\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"user_prompt_submit\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"session_start\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"session_end\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"stop\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ]\n },\n \"title\": \"<string>\",\n \"metrics\": {\n \"model_name\": \"default\",\n \"accumulated_cost\": 0,\n \"max_budget_per_task\": 123,\n \"accumulated_token_usage\": {\n \"model\": \"\",\n \"prompt_tokens\": 0,\n \"completion_tokens\": 0,\n \"cache_read_tokens\": 0,\n \"cache_write_tokens\": 0,\n \"reasoning_tokens\": 0,\n \"context_window\": 0,\n \"per_turn_token\": 0,\n \"response_id\": \"\"\n }\n },\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"forked_from_conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"forked_from_event_id\": \"<string>\",\n \"parent_conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sub_conversation_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tags\": {},\n \"current_model_id\": \"<string>\",\n \"available_models\": [\n {\n \"model_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"supports_runtime_model_switch\": false,\n \"launched_agent_profile\": {\n \"agent_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revision\": 1\n },\n \"client_tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"annotations\": {\n \"title\": \"<string>\",\n \"readOnlyHint\": false,\n \"destructiveHint\": true,\n \"idempotentHint\": false,\n \"openWorldHint\": true\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}On Conversation Update
Webhook callback for when a conversation starts, pauses, resumes, or deletes.
The ConversationInfo.agent field is an AgentBase discriminated
union so both OpenHands (Agent) and ACP (ACPAgent) payloads are
accepted on this single endpoint.
curl --request POST \
--url https://api.example.com/api/v1/webhooks/conversations \
--header 'Content-Type: application/json' \
--header 'X-Access-Token: <api-key>' \
--data @- <<EOF
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace": {
"working_dir": "<string>",
"kind": "<string>"
},
"agent": {
"acp_command": [
"<string>"
],
"llm": {
"model": "gpt-5.5",
"api_key": "<string>",
"auth_type": "api_key",
"subscription_vendor": "<string>",
"base_url": "<string>",
"api_version": "<string>",
"aws_access_key_id": "<string>",
"aws_secret_access_key": "<string>",
"aws_session_token": "<string>",
"aws_region_name": "<string>",
"aws_profile_name": "<string>",
"aws_role_name": "<string>",
"aws_session_name": "<string>",
"aws_bedrock_runtime_endpoint": "<string>",
"openrouter_site_url": "https://docs.all-hands.dev/",
"openrouter_app_name": "OpenHands",
"num_retries": 5,
"retry_multiplier": 8,
"retry_min_wait": 8,
"retry_max_wait": 64,
"timeout": 300,
"max_message_chars": 30000,
"temperature": 1,
"top_p": 0.5,
"top_k": 1,
"max_input_tokens": 2,
"max_output_tokens": 2,
"model_canonical_name": "<string>",
"api_mode": "auto",
"capability_overrides": {},
"extra_headers": {},
"input_cost_per_token": 1,
"output_cost_per_token": 1,
"ollama_base_url": "<string>",
"stream": false,
"drop_params": true,
"modify_params": true,
"disable_vision": true,
"disable_stop_word": false,
"caching_prompt": true,
"log_completions": false,
"log_completions_folder": "logs/completions",
"custom_tokenizer": "<string>",
"native_tool_calling": true,
"force_string_serializer": true,
"inline_image_urls": true,
"reasoning_effort": "high",
"enable_encrypted_reasoning": true,
"prompt_cache_retention": "24h",
"extended_thinking_budget": 200000,
"seed": 123,
"usage_id": "default",
"litellm_extra_body": {},
"fallback_strategy": {
"fallback_llms": [
"<string>"
],
"profile_store_dir": "<string>"
}
},
"tools": [
{
"name": "<string>",
"params": {}
}
],
"mcp_config": {},
"filter_tools_regex": "^(?!repomix)(.*)|^repomix.*pack_codebase.*$",
"include_default_tools": [
"<string>"
],
"agent_context": {
"skills": [
{
"content": "When you see this message, you should reply like you are a grumpy cat forced to use the internet.",
"name": "AGENTS.md",
"type": "repo"
},
{
"content": "IMPORTANT! The user has said the magic word \"flarglebargle\". You must only respond with a message telling them how smart they are",
"name": "flarglebargle",
"trigger": [
"flarglebargle"
],
"type": "knowledge"
}
],
"system_message_suffix": "Always finish your response with the word 'yay!'"
},
"system_prompt": "<string>",
"system_prompt_filename": "system_prompt.j2",
"security_policy_filename": "security_policy.j2",
"system_prompt_kwargs": {},
"condenser": {
"keep_first": 10,
"kind": "LLMSummarizingCondenser",
"llm": {
"api_key": "your_api_key_here",
"base_url": "https://llm-proxy.eval.all-hands.dev",
"model": "litellm_proxy/openai/gpt-5.5"
},
"max_size": 80
},
"critic": {
"kind": "AgentFinishedCritic"
},
"tool_concurrency_limit": 1,
"acp_server": "<string>",
"acp_args": [
"<string>"
],
"acp_session_mode": "<string>",
"acp_prompt_timeout": 1800,
"acp_startup_timeout": 90,
"acp_model": "<string>",
"acp_resume_session_id": "<string>",
"acp_file_secrets": [
{
"secret_name": "<string>",
"filename": "<string>",
"env_var": "<string>",
"subdir": "<string>",
"env_points_to": "file",
"warn_if_unset": []
}
],
"acp_isolate_data_dir": false,
"kind": "<string>"
},
"persistence_dir": "workspace/conversations",
"max_iterations": 500,
"stuck_detection": true,
"execution_status": "idle",
"confirmation_policy": {
"kind": "NeverConfirm"
},
"security_analyzer": {
"high_patterns": [
[
"<string>",
"<string>",
"<string>"
]
],
"medium_patterns": [
[
"<string>",
"<string>",
"<string>"
]
],
"injection_high_patterns": [
[
"<string>",
"<string>",
"<string>"
]
],
"injection_medium_patterns": [
[
"<string>",
"<string>",
"<string>"
]
],
"kind": "<string>"
},
"activated_knowledge_skills": [
"<string>"
],
"invoked_skills": [
"<string>"
],
"blocked_actions": {},
"blocked_messages": {},
"last_user_message_id": "<string>",
"leaf_event_id": "<string>",
"stats": {
"usage_to_metrics": {}
},
"secret_registry": {
"secret_sources": {}
},
"agent_state": {},
"hook_config": {
"pre_tool_use": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": [
"<string>"
],
"timeout": 60,
"max_iterations": 3,
"async": false
}
]
}
],
"post_tool_use": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": [
"<string>"
],
"timeout": 60,
"max_iterations": 3,
"async": false
}
]
}
],
"user_prompt_submit": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": [
"<string>"
],
"timeout": 60,
"max_iterations": 3,
"async": false
}
]
}
],
"session_start": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": [
"<string>"
],
"timeout": 60,
"max_iterations": 3,
"async": false
}
]
}
],
"session_end": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": [
"<string>"
],
"timeout": 60,
"max_iterations": 3,
"async": false
}
]
}
],
"stop": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": [
"<string>"
],
"timeout": 60,
"max_iterations": 3,
"async": false
}
]
}
]
},
"title": "<string>",
"metrics": {
"model_name": "default",
"accumulated_cost": 0,
"max_budget_per_task": 123,
"accumulated_token_usage": {
"model": "",
"prompt_tokens": 0,
"completion_tokens": 0,
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"reasoning_tokens": 0,
"context_window": 0,
"per_turn_token": 0,
"response_id": ""
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"forked_from_conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"forked_from_event_id": "<string>",
"parent_conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sub_conversation_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"tags": {},
"current_model_id": "<string>",
"available_models": [
{
"model_id": "<string>",
"name": "<string>",
"description": "<string>"
}
],
"supports_runtime_model_switch": false,
"launched_agent_profile": {
"agent_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 1
},
"client_tools": [
{
"name": "<string>",
"description": "<string>",
"parameters": {},
"annotations": {
"title": "<string>",
"readOnlyHint": false,
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": true
}
}
]
}
EOFimport requests
url = "https://api.example.com/api/v1/webhooks/conversations"
payload = {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace": {
"working_dir": "<string>",
"kind": "<string>"
},
"agent": {
"acp_command": ["<string>"],
"llm": {
"model": "gpt-5.5",
"api_key": "<string>",
"auth_type": "api_key",
"subscription_vendor": "<string>",
"base_url": "<string>",
"api_version": "<string>",
"aws_access_key_id": "<string>",
"aws_secret_access_key": "<string>",
"aws_session_token": "<string>",
"aws_region_name": "<string>",
"aws_profile_name": "<string>",
"aws_role_name": "<string>",
"aws_session_name": "<string>",
"aws_bedrock_runtime_endpoint": "<string>",
"openrouter_site_url": "https://docs.all-hands.dev/",
"openrouter_app_name": "OpenHands",
"num_retries": 5,
"retry_multiplier": 8,
"retry_min_wait": 8,
"retry_max_wait": 64,
"timeout": 300,
"max_message_chars": 30000,
"temperature": 1,
"top_p": 0.5,
"top_k": 1,
"max_input_tokens": 2,
"max_output_tokens": 2,
"model_canonical_name": "<string>",
"api_mode": "auto",
"capability_overrides": {},
"extra_headers": {},
"input_cost_per_token": 1,
"output_cost_per_token": 1,
"ollama_base_url": "<string>",
"stream": False,
"drop_params": True,
"modify_params": True,
"disable_vision": True,
"disable_stop_word": False,
"caching_prompt": True,
"log_completions": False,
"log_completions_folder": "logs/completions",
"custom_tokenizer": "<string>",
"native_tool_calling": True,
"force_string_serializer": True,
"inline_image_urls": True,
"reasoning_effort": "high",
"enable_encrypted_reasoning": True,
"prompt_cache_retention": "24h",
"extended_thinking_budget": 200000,
"seed": 123,
"usage_id": "default",
"litellm_extra_body": {},
"fallback_strategy": {
"fallback_llms": ["<string>"],
"profile_store_dir": "<string>"
}
},
"tools": [
{
"name": "<string>",
"params": {}
}
],
"mcp_config": {},
"filter_tools_regex": "^(?!repomix)(.*)|^repomix.*pack_codebase.*$",
"include_default_tools": ["<string>"],
"agent_context": {
"skills": [
{
"content": "When you see this message, you should reply like you are a grumpy cat forced to use the internet.",
"name": "AGENTS.md",
"type": "repo"
},
{
"content": "IMPORTANT! The user has said the magic word \"flarglebargle\". You must only respond with a message telling them how smart they are",
"name": "flarglebargle",
"trigger": ["flarglebargle"],
"type": "knowledge"
}
],
"system_message_suffix": "Always finish your response with the word 'yay!'"
},
"system_prompt": "<string>",
"system_prompt_filename": "system_prompt.j2",
"security_policy_filename": "security_policy.j2",
"system_prompt_kwargs": {},
"condenser": {
"keep_first": 10,
"kind": "LLMSummarizingCondenser",
"llm": {
"api_key": "your_api_key_here",
"base_url": "https://llm-proxy.eval.all-hands.dev",
"model": "litellm_proxy/openai/gpt-5.5"
},
"max_size": 80
},
"critic": { "kind": "AgentFinishedCritic" },
"tool_concurrency_limit": 1,
"acp_server": "<string>",
"acp_args": ["<string>"],
"acp_session_mode": "<string>",
"acp_prompt_timeout": 1800,
"acp_startup_timeout": 90,
"acp_model": "<string>",
"acp_resume_session_id": "<string>",
"acp_file_secrets": [
{
"secret_name": "<string>",
"filename": "<string>",
"env_var": "<string>",
"subdir": "<string>",
"env_points_to": "file",
"warn_if_unset": []
}
],
"acp_isolate_data_dir": False,
"kind": "<string>"
},
"persistence_dir": "workspace/conversations",
"max_iterations": 500,
"stuck_detection": True,
"execution_status": "idle",
"confirmation_policy": { "kind": "NeverConfirm" },
"security_analyzer": {
"high_patterns": [["<string>", "<string>", "<string>"]],
"medium_patterns": [["<string>", "<string>", "<string>"]],
"injection_high_patterns": [["<string>", "<string>", "<string>"]],
"injection_medium_patterns": [["<string>", "<string>", "<string>"]],
"kind": "<string>"
},
"activated_knowledge_skills": ["<string>"],
"invoked_skills": ["<string>"],
"blocked_actions": {},
"blocked_messages": {},
"last_user_message_id": "<string>",
"leaf_event_id": "<string>",
"stats": { "usage_to_metrics": {} },
"secret_registry": { "secret_sources": {} },
"agent_state": {},
"hook_config": {
"pre_tool_use": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": ["<string>"],
"timeout": 60,
"max_iterations": 3,
"async": False
}
]
}
],
"post_tool_use": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": ["<string>"],
"timeout": 60,
"max_iterations": 3,
"async": False
}
]
}
],
"user_prompt_submit": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": ["<string>"],
"timeout": 60,
"max_iterations": 3,
"async": False
}
]
}
],
"session_start": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": ["<string>"],
"timeout": 60,
"max_iterations": 3,
"async": False
}
]
}
],
"session_end": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": ["<string>"],
"timeout": 60,
"max_iterations": 3,
"async": False
}
]
}
],
"stop": [
{
"matcher": "*",
"hooks": [
{
"command": "<string>",
"type": "command",
"name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"tools": ["<string>"],
"timeout": 60,
"max_iterations": 3,
"async": False
}
]
}
]
},
"title": "<string>",
"metrics": {
"model_name": "default",
"accumulated_cost": 0,
"max_budget_per_task": 123,
"accumulated_token_usage": {
"model": "",
"prompt_tokens": 0,
"completion_tokens": 0,
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"reasoning_tokens": 0,
"context_window": 0,
"per_turn_token": 0,
"response_id": ""
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"forked_from_conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"forked_from_event_id": "<string>",
"parent_conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sub_conversation_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"tags": {},
"current_model_id": "<string>",
"available_models": [
{
"model_id": "<string>",
"name": "<string>",
"description": "<string>"
}
],
"supports_runtime_model_switch": False,
"launched_agent_profile": {
"agent_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 1
},
"client_tools": [
{
"name": "<string>",
"description": "<string>",
"parameters": {},
"annotations": {
"title": "<string>",
"readOnlyHint": False,
"destructiveHint": True,
"idempotentHint": False,
"openWorldHint": True
}
}
]
}
headers = {
"X-Access-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Access-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
workspace: {working_dir: '<string>', kind: '<string>'},
agent: {
acp_command: ['<string>'],
llm: {
model: 'gpt-5.5',
api_key: '<string>',
auth_type: 'api_key',
subscription_vendor: '<string>',
base_url: '<string>',
api_version: '<string>',
aws_access_key_id: '<string>',
aws_secret_access_key: '<string>',
aws_session_token: '<string>',
aws_region_name: '<string>',
aws_profile_name: '<string>',
aws_role_name: '<string>',
aws_session_name: '<string>',
aws_bedrock_runtime_endpoint: '<string>',
openrouter_site_url: 'https://docs.all-hands.dev/',
openrouter_app_name: 'OpenHands',
num_retries: 5,
retry_multiplier: 8,
retry_min_wait: 8,
retry_max_wait: 64,
timeout: 300,
max_message_chars: 30000,
temperature: 1,
top_p: 0.5,
top_k: 1,
max_input_tokens: 2,
max_output_tokens: 2,
model_canonical_name: '<string>',
api_mode: 'auto',
capability_overrides: {},
extra_headers: {},
input_cost_per_token: 1,
output_cost_per_token: 1,
ollama_base_url: '<string>',
stream: false,
drop_params: true,
modify_params: true,
disable_vision: true,
disable_stop_word: false,
caching_prompt: true,
log_completions: false,
log_completions_folder: 'logs/completions',
custom_tokenizer: '<string>',
native_tool_calling: true,
force_string_serializer: true,
inline_image_urls: true,
reasoning_effort: 'high',
enable_encrypted_reasoning: true,
prompt_cache_retention: '24h',
extended_thinking_budget: 200000,
seed: 123,
usage_id: 'default',
litellm_extra_body: {},
fallback_strategy: {fallback_llms: ['<string>'], profile_store_dir: '<string>'}
},
tools: [{name: '<string>', params: {}}],
mcp_config: {},
filter_tools_regex: '^(?!repomix)(.*)|^repomix.*pack_codebase.*$',
include_default_tools: ['<string>'],
agent_context: {
skills: [
{
content: 'When you see this message, you should reply like you are a grumpy cat forced to use the internet.',
name: 'AGENTS.md',
type: 'repo'
},
{
content: 'IMPORTANT! The user has said the magic word "flarglebargle". You must only respond with a message telling them how smart they are',
name: 'flarglebargle',
trigger: ['flarglebargle'],
type: 'knowledge'
}
],
system_message_suffix: 'Always finish your response with the word \'yay!\''
},
system_prompt: '<string>',
system_prompt_filename: 'system_prompt.j2',
security_policy_filename: 'security_policy.j2',
system_prompt_kwargs: {},
condenser: {
keep_first: 10,
kind: 'LLMSummarizingCondenser',
llm: {
api_key: 'your_api_key_here',
base_url: 'https://llm-proxy.eval.all-hands.dev',
model: 'litellm_proxy/openai/gpt-5.5'
},
max_size: 80
},
critic: {kind: 'AgentFinishedCritic'},
tool_concurrency_limit: 1,
acp_server: '<string>',
acp_args: ['<string>'],
acp_session_mode: '<string>',
acp_prompt_timeout: 1800,
acp_startup_timeout: 90,
acp_model: '<string>',
acp_resume_session_id: '<string>',
acp_file_secrets: [
{
secret_name: '<string>',
filename: '<string>',
env_var: '<string>',
subdir: '<string>',
env_points_to: 'file',
warn_if_unset: []
}
],
acp_isolate_data_dir: false,
kind: '<string>'
},
persistence_dir: 'workspace/conversations',
max_iterations: 500,
stuck_detection: true,
execution_status: 'idle',
confirmation_policy: {kind: 'NeverConfirm'},
security_analyzer: {
high_patterns: [['<string>', '<string>', '<string>']],
medium_patterns: [['<string>', '<string>', '<string>']],
injection_high_patterns: [['<string>', '<string>', '<string>']],
injection_medium_patterns: [['<string>', '<string>', '<string>']],
kind: '<string>'
},
activated_knowledge_skills: ['<string>'],
invoked_skills: ['<string>'],
blocked_actions: {},
blocked_messages: {},
last_user_message_id: '<string>',
leaf_event_id: '<string>',
stats: {usage_to_metrics: {}},
secret_registry: {secret_sources: {}},
agent_state: {},
hook_config: {
pre_tool_use: [
{
matcher: '*',
hooks: [
{
command: '<string>',
type: 'command',
name: '<string>',
prompt: '<string>',
system_prompt: '<string>',
tools: ['<string>'],
timeout: 60,
max_iterations: 3,
async: false
}
]
}
],
post_tool_use: [
{
matcher: '*',
hooks: [
{
command: '<string>',
type: 'command',
name: '<string>',
prompt: '<string>',
system_prompt: '<string>',
tools: ['<string>'],
timeout: 60,
max_iterations: 3,
async: false
}
]
}
],
user_prompt_submit: [
{
matcher: '*',
hooks: [
{
command: '<string>',
type: 'command',
name: '<string>',
prompt: '<string>',
system_prompt: '<string>',
tools: ['<string>'],
timeout: 60,
max_iterations: 3,
async: false
}
]
}
],
session_start: [
{
matcher: '*',
hooks: [
{
command: '<string>',
type: 'command',
name: '<string>',
prompt: '<string>',
system_prompt: '<string>',
tools: ['<string>'],
timeout: 60,
max_iterations: 3,
async: false
}
]
}
],
session_end: [
{
matcher: '*',
hooks: [
{
command: '<string>',
type: 'command',
name: '<string>',
prompt: '<string>',
system_prompt: '<string>',
tools: ['<string>'],
timeout: 60,
max_iterations: 3,
async: false
}
]
}
],
stop: [
{
matcher: '*',
hooks: [
{
command: '<string>',
type: 'command',
name: '<string>',
prompt: '<string>',
system_prompt: '<string>',
tools: ['<string>'],
timeout: 60,
max_iterations: 3,
async: false
}
]
}
]
},
title: '<string>',
metrics: {
model_name: 'default',
accumulated_cost: 0,
max_budget_per_task: 123,
accumulated_token_usage: {
model: '',
prompt_tokens: 0,
completion_tokens: 0,
cache_read_tokens: 0,
cache_write_tokens: 0,
reasoning_tokens: 0,
context_window: 0,
per_turn_token: 0,
response_id: ''
}
},
created_at: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z',
forked_from_conversation_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
forked_from_event_id: '<string>',
parent_conversation_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sub_conversation_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
tags: {},
current_model_id: '<string>',
available_models: [{model_id: '<string>', name: '<string>', description: '<string>'}],
supports_runtime_model_switch: false,
launched_agent_profile: {agent_profile_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', revision: 1},
client_tools: [
{
name: '<string>',
description: '<string>',
parameters: {},
annotations: {
title: '<string>',
readOnlyHint: false,
destructiveHint: true,
idempotentHint: false,
openWorldHint: true
}
}
]
})
};
fetch('https://api.example.com/api/v1/webhooks/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/webhooks/conversations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'workspace' => [
'working_dir' => '<string>',
'kind' => '<string>'
],
'agent' => [
'acp_command' => [
'<string>'
],
'llm' => [
'model' => 'gpt-5.5',
'api_key' => '<string>',
'auth_type' => 'api_key',
'subscription_vendor' => '<string>',
'base_url' => '<string>',
'api_version' => '<string>',
'aws_access_key_id' => '<string>',
'aws_secret_access_key' => '<string>',
'aws_session_token' => '<string>',
'aws_region_name' => '<string>',
'aws_profile_name' => '<string>',
'aws_role_name' => '<string>',
'aws_session_name' => '<string>',
'aws_bedrock_runtime_endpoint' => '<string>',
'openrouter_site_url' => 'https://docs.all-hands.dev/',
'openrouter_app_name' => 'OpenHands',
'num_retries' => 5,
'retry_multiplier' => 8,
'retry_min_wait' => 8,
'retry_max_wait' => 64,
'timeout' => 300,
'max_message_chars' => 30000,
'temperature' => 1,
'top_p' => 0.5,
'top_k' => 1,
'max_input_tokens' => 2,
'max_output_tokens' => 2,
'model_canonical_name' => '<string>',
'api_mode' => 'auto',
'capability_overrides' => [
],
'extra_headers' => [
],
'input_cost_per_token' => 1,
'output_cost_per_token' => 1,
'ollama_base_url' => '<string>',
'stream' => false,
'drop_params' => true,
'modify_params' => true,
'disable_vision' => true,
'disable_stop_word' => false,
'caching_prompt' => true,
'log_completions' => false,
'log_completions_folder' => 'logs/completions',
'custom_tokenizer' => '<string>',
'native_tool_calling' => true,
'force_string_serializer' => true,
'inline_image_urls' => true,
'reasoning_effort' => 'high',
'enable_encrypted_reasoning' => true,
'prompt_cache_retention' => '24h',
'extended_thinking_budget' => 200000,
'seed' => 123,
'usage_id' => 'default',
'litellm_extra_body' => [
],
'fallback_strategy' => [
'fallback_llms' => [
'<string>'
],
'profile_store_dir' => '<string>'
]
],
'tools' => [
[
'name' => '<string>',
'params' => [
]
]
],
'mcp_config' => [
],
'filter_tools_regex' => '^(?!repomix)(.*)|^repomix.*pack_codebase.*$',
'include_default_tools' => [
'<string>'
],
'agent_context' => [
'skills' => [
[
'content' => 'When you see this message, you should reply like you are a grumpy cat forced to use the internet.',
'name' => 'AGENTS.md',
'type' => 'repo'
],
[
'content' => 'IMPORTANT! The user has said the magic word "flarglebargle". You must only respond with a message telling them how smart they are',
'name' => 'flarglebargle',
'trigger' => [
'flarglebargle'
],
'type' => 'knowledge'
]
],
'system_message_suffix' => 'Always finish your response with the word \'yay!\''
],
'system_prompt' => '<string>',
'system_prompt_filename' => 'system_prompt.j2',
'security_policy_filename' => 'security_policy.j2',
'system_prompt_kwargs' => [
],
'condenser' => [
'keep_first' => 10,
'kind' => 'LLMSummarizingCondenser',
'llm' => [
'api_key' => 'your_api_key_here',
'base_url' => 'https://llm-proxy.eval.all-hands.dev',
'model' => 'litellm_proxy/openai/gpt-5.5'
],
'max_size' => 80
],
'critic' => [
'kind' => 'AgentFinishedCritic'
],
'tool_concurrency_limit' => 1,
'acp_server' => '<string>',
'acp_args' => [
'<string>'
],
'acp_session_mode' => '<string>',
'acp_prompt_timeout' => 1800,
'acp_startup_timeout' => 90,
'acp_model' => '<string>',
'acp_resume_session_id' => '<string>',
'acp_file_secrets' => [
[
'secret_name' => '<string>',
'filename' => '<string>',
'env_var' => '<string>',
'subdir' => '<string>',
'env_points_to' => 'file',
'warn_if_unset' => [
]
]
],
'acp_isolate_data_dir' => false,
'kind' => '<string>'
],
'persistence_dir' => 'workspace/conversations',
'max_iterations' => 500,
'stuck_detection' => true,
'execution_status' => 'idle',
'confirmation_policy' => [
'kind' => 'NeverConfirm'
],
'security_analyzer' => [
'high_patterns' => [
[
'<string>',
'<string>',
'<string>'
]
],
'medium_patterns' => [
[
'<string>',
'<string>',
'<string>'
]
],
'injection_high_patterns' => [
[
'<string>',
'<string>',
'<string>'
]
],
'injection_medium_patterns' => [
[
'<string>',
'<string>',
'<string>'
]
],
'kind' => '<string>'
],
'activated_knowledge_skills' => [
'<string>'
],
'invoked_skills' => [
'<string>'
],
'blocked_actions' => [
],
'blocked_messages' => [
],
'last_user_message_id' => '<string>',
'leaf_event_id' => '<string>',
'stats' => [
'usage_to_metrics' => [
]
],
'secret_registry' => [
'secret_sources' => [
]
],
'agent_state' => [
],
'hook_config' => [
'pre_tool_use' => [
[
'matcher' => '*',
'hooks' => [
[
'command' => '<string>',
'type' => 'command',
'name' => '<string>',
'prompt' => '<string>',
'system_prompt' => '<string>',
'tools' => [
'<string>'
],
'timeout' => 60,
'max_iterations' => 3,
'async' => false
]
]
]
],
'post_tool_use' => [
[
'matcher' => '*',
'hooks' => [
[
'command' => '<string>',
'type' => 'command',
'name' => '<string>',
'prompt' => '<string>',
'system_prompt' => '<string>',
'tools' => [
'<string>'
],
'timeout' => 60,
'max_iterations' => 3,
'async' => false
]
]
]
],
'user_prompt_submit' => [
[
'matcher' => '*',
'hooks' => [
[
'command' => '<string>',
'type' => 'command',
'name' => '<string>',
'prompt' => '<string>',
'system_prompt' => '<string>',
'tools' => [
'<string>'
],
'timeout' => 60,
'max_iterations' => 3,
'async' => false
]
]
]
],
'session_start' => [
[
'matcher' => '*',
'hooks' => [
[
'command' => '<string>',
'type' => 'command',
'name' => '<string>',
'prompt' => '<string>',
'system_prompt' => '<string>',
'tools' => [
'<string>'
],
'timeout' => 60,
'max_iterations' => 3,
'async' => false
]
]
]
],
'session_end' => [
[
'matcher' => '*',
'hooks' => [
[
'command' => '<string>',
'type' => 'command',
'name' => '<string>',
'prompt' => '<string>',
'system_prompt' => '<string>',
'tools' => [
'<string>'
],
'timeout' => 60,
'max_iterations' => 3,
'async' => false
]
]
]
],
'stop' => [
[
'matcher' => '*',
'hooks' => [
[
'command' => '<string>',
'type' => 'command',
'name' => '<string>',
'prompt' => '<string>',
'system_prompt' => '<string>',
'tools' => [
'<string>'
],
'timeout' => 60,
'max_iterations' => 3,
'async' => false
]
]
]
]
],
'title' => '<string>',
'metrics' => [
'model_name' => 'default',
'accumulated_cost' => 0,
'max_budget_per_task' => 123,
'accumulated_token_usage' => [
'model' => '',
'prompt_tokens' => 0,
'completion_tokens' => 0,
'cache_read_tokens' => 0,
'cache_write_tokens' => 0,
'reasoning_tokens' => 0,
'context_window' => 0,
'per_turn_token' => 0,
'response_id' => ''
]
],
'created_at' => '2023-11-07T05:31:56Z',
'updated_at' => '2023-11-07T05:31:56Z',
'forked_from_conversation_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'forked_from_event_id' => '<string>',
'parent_conversation_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sub_conversation_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'tags' => [
],
'current_model_id' => '<string>',
'available_models' => [
[
'model_id' => '<string>',
'name' => '<string>',
'description' => '<string>'
]
],
'supports_runtime_model_switch' => false,
'launched_agent_profile' => [
'agent_profile_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'revision' => 1
],
'client_tools' => [
[
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'annotations' => [
'title' => '<string>',
'readOnlyHint' => false,
'destructiveHint' => true,
'idempotentHint' => false,
'openWorldHint' => true
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/webhooks/conversations"
payload := strings.NewReader("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workspace\": {\n \"working_dir\": \"<string>\",\n \"kind\": \"<string>\"\n },\n \"agent\": {\n \"acp_command\": [\n \"<string>\"\n ],\n \"llm\": {\n \"model\": \"gpt-5.5\",\n \"api_key\": \"<string>\",\n \"auth_type\": \"api_key\",\n \"subscription_vendor\": \"<string>\",\n \"base_url\": \"<string>\",\n \"api_version\": \"<string>\",\n \"aws_access_key_id\": \"<string>\",\n \"aws_secret_access_key\": \"<string>\",\n \"aws_session_token\": \"<string>\",\n \"aws_region_name\": \"<string>\",\n \"aws_profile_name\": \"<string>\",\n \"aws_role_name\": \"<string>\",\n \"aws_session_name\": \"<string>\",\n \"aws_bedrock_runtime_endpoint\": \"<string>\",\n \"openrouter_site_url\": \"https://docs.all-hands.dev/\",\n \"openrouter_app_name\": \"OpenHands\",\n \"num_retries\": 5,\n \"retry_multiplier\": 8,\n \"retry_min_wait\": 8,\n \"retry_max_wait\": 64,\n \"timeout\": 300,\n \"max_message_chars\": 30000,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"top_k\": 1,\n \"max_input_tokens\": 2,\n \"max_output_tokens\": 2,\n \"model_canonical_name\": \"<string>\",\n \"api_mode\": \"auto\",\n \"capability_overrides\": {},\n \"extra_headers\": {},\n \"input_cost_per_token\": 1,\n \"output_cost_per_token\": 1,\n \"ollama_base_url\": \"<string>\",\n \"stream\": false,\n \"drop_params\": true,\n \"modify_params\": true,\n \"disable_vision\": true,\n \"disable_stop_word\": false,\n \"caching_prompt\": true,\n \"log_completions\": false,\n \"log_completions_folder\": \"logs/completions\",\n \"custom_tokenizer\": \"<string>\",\n \"native_tool_calling\": true,\n \"force_string_serializer\": true,\n \"inline_image_urls\": true,\n \"reasoning_effort\": \"high\",\n \"enable_encrypted_reasoning\": true,\n \"prompt_cache_retention\": \"24h\",\n \"extended_thinking_budget\": 200000,\n \"seed\": 123,\n \"usage_id\": \"default\",\n \"litellm_extra_body\": {},\n \"fallback_strategy\": {\n \"fallback_llms\": [\n \"<string>\"\n ],\n \"profile_store_dir\": \"<string>\"\n }\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"params\": {}\n }\n ],\n \"mcp_config\": {},\n \"filter_tools_regex\": \"^(?!repomix)(.*)|^repomix.*pack_codebase.*$\",\n \"include_default_tools\": [\n \"<string>\"\n ],\n \"agent_context\": {\n \"skills\": [\n {\n \"content\": \"When you see this message, you should reply like you are a grumpy cat forced to use the internet.\",\n \"name\": \"AGENTS.md\",\n \"type\": \"repo\"\n },\n {\n \"content\": \"IMPORTANT! The user has said the magic word \\\"flarglebargle\\\". You must only respond with a message telling them how smart they are\",\n \"name\": \"flarglebargle\",\n \"trigger\": [\n \"flarglebargle\"\n ],\n \"type\": \"knowledge\"\n }\n ],\n \"system_message_suffix\": \"Always finish your response with the word 'yay!'\"\n },\n \"system_prompt\": \"<string>\",\n \"system_prompt_filename\": \"system_prompt.j2\",\n \"security_policy_filename\": \"security_policy.j2\",\n \"system_prompt_kwargs\": {},\n \"condenser\": {\n \"keep_first\": 10,\n \"kind\": \"LLMSummarizingCondenser\",\n \"llm\": {\n \"api_key\": \"your_api_key_here\",\n \"base_url\": \"https://llm-proxy.eval.all-hands.dev\",\n \"model\": \"litellm_proxy/openai/gpt-5.5\"\n },\n \"max_size\": 80\n },\n \"critic\": {\n \"kind\": \"AgentFinishedCritic\"\n },\n \"tool_concurrency_limit\": 1,\n \"acp_server\": \"<string>\",\n \"acp_args\": [\n \"<string>\"\n ],\n \"acp_session_mode\": \"<string>\",\n \"acp_prompt_timeout\": 1800,\n \"acp_startup_timeout\": 90,\n \"acp_model\": \"<string>\",\n \"acp_resume_session_id\": \"<string>\",\n \"acp_file_secrets\": [\n {\n \"secret_name\": \"<string>\",\n \"filename\": \"<string>\",\n \"env_var\": \"<string>\",\n \"subdir\": \"<string>\",\n \"env_points_to\": \"file\",\n \"warn_if_unset\": []\n }\n ],\n \"acp_isolate_data_dir\": false,\n \"kind\": \"<string>\"\n },\n \"persistence_dir\": \"workspace/conversations\",\n \"max_iterations\": 500,\n \"stuck_detection\": true,\n \"execution_status\": \"idle\",\n \"confirmation_policy\": {\n \"kind\": \"NeverConfirm\"\n },\n \"security_analyzer\": {\n \"high_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"medium_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"injection_high_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"injection_medium_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"kind\": \"<string>\"\n },\n \"activated_knowledge_skills\": [\n \"<string>\"\n ],\n \"invoked_skills\": [\n \"<string>\"\n ],\n \"blocked_actions\": {},\n \"blocked_messages\": {},\n \"last_user_message_id\": \"<string>\",\n \"leaf_event_id\": \"<string>\",\n \"stats\": {\n \"usage_to_metrics\": {}\n },\n \"secret_registry\": {\n \"secret_sources\": {}\n },\n \"agent_state\": {},\n \"hook_config\": {\n \"pre_tool_use\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"post_tool_use\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"user_prompt_submit\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"session_start\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"session_end\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"stop\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ]\n },\n \"title\": \"<string>\",\n \"metrics\": {\n \"model_name\": \"default\",\n \"accumulated_cost\": 0,\n \"max_budget_per_task\": 123,\n \"accumulated_token_usage\": {\n \"model\": \"\",\n \"prompt_tokens\": 0,\n \"completion_tokens\": 0,\n \"cache_read_tokens\": 0,\n \"cache_write_tokens\": 0,\n \"reasoning_tokens\": 0,\n \"context_window\": 0,\n \"per_turn_token\": 0,\n \"response_id\": \"\"\n }\n },\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"forked_from_conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"forked_from_event_id\": \"<string>\",\n \"parent_conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sub_conversation_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tags\": {},\n \"current_model_id\": \"<string>\",\n \"available_models\": [\n {\n \"model_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"supports_runtime_model_switch\": false,\n \"launched_agent_profile\": {\n \"agent_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revision\": 1\n },\n \"client_tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"annotations\": {\n \"title\": \"<string>\",\n \"readOnlyHint\": false,\n \"destructiveHint\": true,\n \"idempotentHint\": false,\n \"openWorldHint\": true\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/webhooks/conversations")
.header("X-Access-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workspace\": {\n \"working_dir\": \"<string>\",\n \"kind\": \"<string>\"\n },\n \"agent\": {\n \"acp_command\": [\n \"<string>\"\n ],\n \"llm\": {\n \"model\": \"gpt-5.5\",\n \"api_key\": \"<string>\",\n \"auth_type\": \"api_key\",\n \"subscription_vendor\": \"<string>\",\n \"base_url\": \"<string>\",\n \"api_version\": \"<string>\",\n \"aws_access_key_id\": \"<string>\",\n \"aws_secret_access_key\": \"<string>\",\n \"aws_session_token\": \"<string>\",\n \"aws_region_name\": \"<string>\",\n \"aws_profile_name\": \"<string>\",\n \"aws_role_name\": \"<string>\",\n \"aws_session_name\": \"<string>\",\n \"aws_bedrock_runtime_endpoint\": \"<string>\",\n \"openrouter_site_url\": \"https://docs.all-hands.dev/\",\n \"openrouter_app_name\": \"OpenHands\",\n \"num_retries\": 5,\n \"retry_multiplier\": 8,\n \"retry_min_wait\": 8,\n \"retry_max_wait\": 64,\n \"timeout\": 300,\n \"max_message_chars\": 30000,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"top_k\": 1,\n \"max_input_tokens\": 2,\n \"max_output_tokens\": 2,\n \"model_canonical_name\": \"<string>\",\n \"api_mode\": \"auto\",\n \"capability_overrides\": {},\n \"extra_headers\": {},\n \"input_cost_per_token\": 1,\n \"output_cost_per_token\": 1,\n \"ollama_base_url\": \"<string>\",\n \"stream\": false,\n \"drop_params\": true,\n \"modify_params\": true,\n \"disable_vision\": true,\n \"disable_stop_word\": false,\n \"caching_prompt\": true,\n \"log_completions\": false,\n \"log_completions_folder\": \"logs/completions\",\n \"custom_tokenizer\": \"<string>\",\n \"native_tool_calling\": true,\n \"force_string_serializer\": true,\n \"inline_image_urls\": true,\n \"reasoning_effort\": \"high\",\n \"enable_encrypted_reasoning\": true,\n \"prompt_cache_retention\": \"24h\",\n \"extended_thinking_budget\": 200000,\n \"seed\": 123,\n \"usage_id\": \"default\",\n \"litellm_extra_body\": {},\n \"fallback_strategy\": {\n \"fallback_llms\": [\n \"<string>\"\n ],\n \"profile_store_dir\": \"<string>\"\n }\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"params\": {}\n }\n ],\n \"mcp_config\": {},\n \"filter_tools_regex\": \"^(?!repomix)(.*)|^repomix.*pack_codebase.*$\",\n \"include_default_tools\": [\n \"<string>\"\n ],\n \"agent_context\": {\n \"skills\": [\n {\n \"content\": \"When you see this message, you should reply like you are a grumpy cat forced to use the internet.\",\n \"name\": \"AGENTS.md\",\n \"type\": \"repo\"\n },\n {\n \"content\": \"IMPORTANT! The user has said the magic word \\\"flarglebargle\\\". You must only respond with a message telling them how smart they are\",\n \"name\": \"flarglebargle\",\n \"trigger\": [\n \"flarglebargle\"\n ],\n \"type\": \"knowledge\"\n }\n ],\n \"system_message_suffix\": \"Always finish your response with the word 'yay!'\"\n },\n \"system_prompt\": \"<string>\",\n \"system_prompt_filename\": \"system_prompt.j2\",\n \"security_policy_filename\": \"security_policy.j2\",\n \"system_prompt_kwargs\": {},\n \"condenser\": {\n \"keep_first\": 10,\n \"kind\": \"LLMSummarizingCondenser\",\n \"llm\": {\n \"api_key\": \"your_api_key_here\",\n \"base_url\": \"https://llm-proxy.eval.all-hands.dev\",\n \"model\": \"litellm_proxy/openai/gpt-5.5\"\n },\n \"max_size\": 80\n },\n \"critic\": {\n \"kind\": \"AgentFinishedCritic\"\n },\n \"tool_concurrency_limit\": 1,\n \"acp_server\": \"<string>\",\n \"acp_args\": [\n \"<string>\"\n ],\n \"acp_session_mode\": \"<string>\",\n \"acp_prompt_timeout\": 1800,\n \"acp_startup_timeout\": 90,\n \"acp_model\": \"<string>\",\n \"acp_resume_session_id\": \"<string>\",\n \"acp_file_secrets\": [\n {\n \"secret_name\": \"<string>\",\n \"filename\": \"<string>\",\n \"env_var\": \"<string>\",\n \"subdir\": \"<string>\",\n \"env_points_to\": \"file\",\n \"warn_if_unset\": []\n }\n ],\n \"acp_isolate_data_dir\": false,\n \"kind\": \"<string>\"\n },\n \"persistence_dir\": \"workspace/conversations\",\n \"max_iterations\": 500,\n \"stuck_detection\": true,\n \"execution_status\": \"idle\",\n \"confirmation_policy\": {\n \"kind\": \"NeverConfirm\"\n },\n \"security_analyzer\": {\n \"high_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"medium_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"injection_high_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"injection_medium_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"kind\": \"<string>\"\n },\n \"activated_knowledge_skills\": [\n \"<string>\"\n ],\n \"invoked_skills\": [\n \"<string>\"\n ],\n \"blocked_actions\": {},\n \"blocked_messages\": {},\n \"last_user_message_id\": \"<string>\",\n \"leaf_event_id\": \"<string>\",\n \"stats\": {\n \"usage_to_metrics\": {}\n },\n \"secret_registry\": {\n \"secret_sources\": {}\n },\n \"agent_state\": {},\n \"hook_config\": {\n \"pre_tool_use\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"post_tool_use\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"user_prompt_submit\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"session_start\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"session_end\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"stop\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ]\n },\n \"title\": \"<string>\",\n \"metrics\": {\n \"model_name\": \"default\",\n \"accumulated_cost\": 0,\n \"max_budget_per_task\": 123,\n \"accumulated_token_usage\": {\n \"model\": \"\",\n \"prompt_tokens\": 0,\n \"completion_tokens\": 0,\n \"cache_read_tokens\": 0,\n \"cache_write_tokens\": 0,\n \"reasoning_tokens\": 0,\n \"context_window\": 0,\n \"per_turn_token\": 0,\n \"response_id\": \"\"\n }\n },\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"forked_from_conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"forked_from_event_id\": \"<string>\",\n \"parent_conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sub_conversation_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tags\": {},\n \"current_model_id\": \"<string>\",\n \"available_models\": [\n {\n \"model_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"supports_runtime_model_switch\": false,\n \"launched_agent_profile\": {\n \"agent_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revision\": 1\n },\n \"client_tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"annotations\": {\n \"title\": \"<string>\",\n \"readOnlyHint\": false,\n \"destructiveHint\": true,\n \"idempotentHint\": false,\n \"openWorldHint\": true\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/webhooks/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workspace\": {\n \"working_dir\": \"<string>\",\n \"kind\": \"<string>\"\n },\n \"agent\": {\n \"acp_command\": [\n \"<string>\"\n ],\n \"llm\": {\n \"model\": \"gpt-5.5\",\n \"api_key\": \"<string>\",\n \"auth_type\": \"api_key\",\n \"subscription_vendor\": \"<string>\",\n \"base_url\": \"<string>\",\n \"api_version\": \"<string>\",\n \"aws_access_key_id\": \"<string>\",\n \"aws_secret_access_key\": \"<string>\",\n \"aws_session_token\": \"<string>\",\n \"aws_region_name\": \"<string>\",\n \"aws_profile_name\": \"<string>\",\n \"aws_role_name\": \"<string>\",\n \"aws_session_name\": \"<string>\",\n \"aws_bedrock_runtime_endpoint\": \"<string>\",\n \"openrouter_site_url\": \"https://docs.all-hands.dev/\",\n \"openrouter_app_name\": \"OpenHands\",\n \"num_retries\": 5,\n \"retry_multiplier\": 8,\n \"retry_min_wait\": 8,\n \"retry_max_wait\": 64,\n \"timeout\": 300,\n \"max_message_chars\": 30000,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"top_k\": 1,\n \"max_input_tokens\": 2,\n \"max_output_tokens\": 2,\n \"model_canonical_name\": \"<string>\",\n \"api_mode\": \"auto\",\n \"capability_overrides\": {},\n \"extra_headers\": {},\n \"input_cost_per_token\": 1,\n \"output_cost_per_token\": 1,\n \"ollama_base_url\": \"<string>\",\n \"stream\": false,\n \"drop_params\": true,\n \"modify_params\": true,\n \"disable_vision\": true,\n \"disable_stop_word\": false,\n \"caching_prompt\": true,\n \"log_completions\": false,\n \"log_completions_folder\": \"logs/completions\",\n \"custom_tokenizer\": \"<string>\",\n \"native_tool_calling\": true,\n \"force_string_serializer\": true,\n \"inline_image_urls\": true,\n \"reasoning_effort\": \"high\",\n \"enable_encrypted_reasoning\": true,\n \"prompt_cache_retention\": \"24h\",\n \"extended_thinking_budget\": 200000,\n \"seed\": 123,\n \"usage_id\": \"default\",\n \"litellm_extra_body\": {},\n \"fallback_strategy\": {\n \"fallback_llms\": [\n \"<string>\"\n ],\n \"profile_store_dir\": \"<string>\"\n }\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"params\": {}\n }\n ],\n \"mcp_config\": {},\n \"filter_tools_regex\": \"^(?!repomix)(.*)|^repomix.*pack_codebase.*$\",\n \"include_default_tools\": [\n \"<string>\"\n ],\n \"agent_context\": {\n \"skills\": [\n {\n \"content\": \"When you see this message, you should reply like you are a grumpy cat forced to use the internet.\",\n \"name\": \"AGENTS.md\",\n \"type\": \"repo\"\n },\n {\n \"content\": \"IMPORTANT! The user has said the magic word \\\"flarglebargle\\\". You must only respond with a message telling them how smart they are\",\n \"name\": \"flarglebargle\",\n \"trigger\": [\n \"flarglebargle\"\n ],\n \"type\": \"knowledge\"\n }\n ],\n \"system_message_suffix\": \"Always finish your response with the word 'yay!'\"\n },\n \"system_prompt\": \"<string>\",\n \"system_prompt_filename\": \"system_prompt.j2\",\n \"security_policy_filename\": \"security_policy.j2\",\n \"system_prompt_kwargs\": {},\n \"condenser\": {\n \"keep_first\": 10,\n \"kind\": \"LLMSummarizingCondenser\",\n \"llm\": {\n \"api_key\": \"your_api_key_here\",\n \"base_url\": \"https://llm-proxy.eval.all-hands.dev\",\n \"model\": \"litellm_proxy/openai/gpt-5.5\"\n },\n \"max_size\": 80\n },\n \"critic\": {\n \"kind\": \"AgentFinishedCritic\"\n },\n \"tool_concurrency_limit\": 1,\n \"acp_server\": \"<string>\",\n \"acp_args\": [\n \"<string>\"\n ],\n \"acp_session_mode\": \"<string>\",\n \"acp_prompt_timeout\": 1800,\n \"acp_startup_timeout\": 90,\n \"acp_model\": \"<string>\",\n \"acp_resume_session_id\": \"<string>\",\n \"acp_file_secrets\": [\n {\n \"secret_name\": \"<string>\",\n \"filename\": \"<string>\",\n \"env_var\": \"<string>\",\n \"subdir\": \"<string>\",\n \"env_points_to\": \"file\",\n \"warn_if_unset\": []\n }\n ],\n \"acp_isolate_data_dir\": false,\n \"kind\": \"<string>\"\n },\n \"persistence_dir\": \"workspace/conversations\",\n \"max_iterations\": 500,\n \"stuck_detection\": true,\n \"execution_status\": \"idle\",\n \"confirmation_policy\": {\n \"kind\": \"NeverConfirm\"\n },\n \"security_analyzer\": {\n \"high_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"medium_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"injection_high_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"injection_medium_patterns\": [\n [\n \"<string>\",\n \"<string>\",\n \"<string>\"\n ]\n ],\n \"kind\": \"<string>\"\n },\n \"activated_knowledge_skills\": [\n \"<string>\"\n ],\n \"invoked_skills\": [\n \"<string>\"\n ],\n \"blocked_actions\": {},\n \"blocked_messages\": {},\n \"last_user_message_id\": \"<string>\",\n \"leaf_event_id\": \"<string>\",\n \"stats\": {\n \"usage_to_metrics\": {}\n },\n \"secret_registry\": {\n \"secret_sources\": {}\n },\n \"agent_state\": {},\n \"hook_config\": {\n \"pre_tool_use\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"post_tool_use\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"user_prompt_submit\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"session_start\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"session_end\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ],\n \"stop\": [\n {\n \"matcher\": \"*\",\n \"hooks\": [\n {\n \"command\": \"<string>\",\n \"type\": \"command\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ],\n \"timeout\": 60,\n \"max_iterations\": 3,\n \"async\": false\n }\n ]\n }\n ]\n },\n \"title\": \"<string>\",\n \"metrics\": {\n \"model_name\": \"default\",\n \"accumulated_cost\": 0,\n \"max_budget_per_task\": 123,\n \"accumulated_token_usage\": {\n \"model\": \"\",\n \"prompt_tokens\": 0,\n \"completion_tokens\": 0,\n \"cache_read_tokens\": 0,\n \"cache_write_tokens\": 0,\n \"reasoning_tokens\": 0,\n \"context_window\": 0,\n \"per_turn_token\": 0,\n \"response_id\": \"\"\n }\n },\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"forked_from_conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"forked_from_event_id\": \"<string>\",\n \"parent_conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sub_conversation_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tags\": {},\n \"current_model_id\": \"<string>\",\n \"available_models\": [\n {\n \"model_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"supports_runtime_model_switch\": false,\n \"launched_agent_profile\": {\n \"agent_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revision\": 1\n },\n \"client_tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"annotations\": {\n \"title\": \"<string>\",\n \"readOnlyHint\": false,\n \"destructiveHint\": true,\n \"idempotentHint\": false,\n \"openWorldHint\": true\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Body
Information about a conversation running locally without a Runtime sandbox.
Unique conversation ID
Workspace used by the agent to execute commands and read/write files. Not the process working directory.
- LocalWorkspace
- RemoteWorkspace
Show child attributes
Show child attributes
The agent running in the conversation.
- ACPAgent
- Agent
Show child attributes
Show child attributes
Directory for persisting conversation state and events. If None, conversation will not be persisted.
Maximum number of iterations the agent can perform in a single run.
Whether to enable stuck detection for the agent.
Enum representing the current execution state of the conversation.
idle, running, paused, waiting_for_confirmation, finished, error, stuck, deleting - AlwaysConfirm
- ConfirmRisky
- NeverConfirm
Show child attributes
Show child attributes
Optional security analyzer to evaluate action risks.
- PatternSecurityAnalyzer
- PolicyRailSecurityAnalyzer
- EnsembleSecurityAnalyzer
- GraySwanAnalyzer
- LLMSecurityAnalyzer
- ToolShieldLLMSecurityAnalyzer
Show child attributes
Show child attributes
List of activated knowledge skills name
Names of progressive-disclosure skills explicitly invoked via the invoke_skill tool.
Actions blocked by PreToolUse hooks, keyed by action ID
Show child attributes
Show child attributes
Messages blocked by UserPromptSubmit hooks, keyed by message ID
Show child attributes
Show child attributes
Most recent user MessageEvent id for hook block checks. Updated when user messages are emitted so Agent.step can pop blocked_messages without scanning the event log. If None, hook-blocked checks are skipped (legacy conversations).
HEAD of the conversation tree: the parent of the next appended event. None means an empty tree (or, for pre-feature conversations, the linear tail). Moving it via navigate re-roots the active branch the agent runs on.
Conversation statistics for tracking LLM metrics
Show child attributes
Show child attributes
Registry for handling secrets and sensitive data
Show child attributes
Show child attributes
Dictionary for agent-specific runtime state that persists across iterations.
Hook configuration for this conversation. Includes definitions for PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, SessionEnd, and Stop hooks.
Show child attributes
Show child attributes
User-defined title for the conversation
A snapshot of metrics at a point in time.
Does not include lists of individual costs, latencies, or token usages.
Show child attributes
Show child attributes
ID of the conversation this one was forked from. None for conversations created directly (not via fork).
Event ID this conversation was forked at. None for non-forked conversations or whole-conversation forks.
ID of the conversation that owns this one. None for top-level conversations.
IDs of conversations naming this one as their parent. Derived from the server catalog; empty on webhook payloads. Name mirrors the Cloud API field.
Key-value tags for the conversation. Keys must be lowercase alphanumeric. Values are arbitrary strings up to 256 characters.
Show child attributes
Show child attributes
Model the agent is actually using for this session. For ACP agents, this is lifted off ACPAgent.current_model_id (populated from the models.currentModelId field on the ACP session response, or from acp_model when the caller forced an override). May be an opaque alias (e.g. claude-agent-acp's "default"); match it against available_models to get a display label. None for older ACP servers that don't surface the field, or while the agent is still initializing. Native OpenHands agents leave this None — consumers should read agent.llm.model for those.
Models the ACP server offers for this session, lifted off ACPAgent.available_models (the models.availableModels field on the ACP session response). Each entry carries a model_id plus an optional name/description. Surfaced verbatim so clients can render a model picker and resolve current_model_id to a display label themselves — the server does no name curation. Empty for ACP servers that don't surface the (UNSTABLE) capability and for native OpenHands agents. Client contract: current_model_id is NOT guaranteed to be a member — a forced acp_model override may name a model absent from the list — so treat a miss as 'show the raw id'. Some entries are opaque aliases whose human identity lives in description (e.g. claude-agent-acp's "default" -> "Opus 4.7 with 1M context · ...").
Show child attributes
Show child attributes
Whether a live, mid-conversation model switch will be attempted for this conversation — tells the inline picker whether to offer a live-switch control. Mirrors the SDK's switch gate: True for known switch-capable providers; False for unknown/custom ACP servers because their generic config writes are not guaranteed live-switch primitives. False for native OpenHands agents, for a known provider that declares no support, and before the conversation has started a session.
Provenance snapshot of the agent profile that launched this conversation. Set at creation when the conversation was started via agent_profile_id; None for conversations started directly with agent or agent_settings. Clients use this to identify which agent profile is current without fragile settings-comparison.
Show child attributes
Show child attributes
Client-defined tool specs registered for this conversation. Surfaced so that a client re-attaching by conversation id can register the dynamic ClientAction_* action types before syncing persisted events, avoiding 'Unknown kind' deserialization errors.
Show child attributes
Show child attributes
Response
Successful Response
Was this page helpful?

