Workers API
Calling your worker
curl -XPOST \
https://agents.toolhouse.ai/$AGENT_ID \
-H 'Authorization: Bearer YOUR_TOOLHOUSE_API_KEY'
--json '{"message": "Book at meeting over lunch with Jessica."}'Handling the response from the worker
Continuing an interaction with an agent
# Initial request to execute the worker, assuming $AGENT_ID finds pro
curl -XPOST https://agents.toolhouse.ai/$AGENT_ID \
-v -H 'Authorization: Bearer YOUR_TOOLHOUSE_API_KEY' \
# Headers will contain x-toolhouse-run-id: $RUN_ID
# Worker will stream the response
# Continuing the conversation using the X-Toolhouse-Run-ID
curl -XPUT https://agents.toolhouse.ai/$AGENT_ID/$RUN_ID \
-H 'Authorization: Bearer YOUR_TOOLHOUSE_API_KEY' \
--json '{
"message": "thank you, now find products similar to an iPhone"
}'
# Headers will contain x-toolhouse-run-id: $RUN_ID
# Agent will stream a new response using the current contextLast updated