Webhook Streaming ↗
noOriginal Documentation
Documentation Index#
Fetch the complete documentation index at: https://docs.crewai.com/llms.txt Use this file to discover all available pages before exploring further.
Using Webhook Streaming to stream events to your webhook
Overview#
Enterprise Event Streaming lets you receive real-time webhook updates about your crews and flows deployed to CrewAI AMP, such as model calls, tool usage, and flow steps.
Usage#
When using the Kickoff API, include a webhooks object to your request, for example:
{
"inputs": { "foo": "bar" },
"webhooks": {
"events": ["crew_kickoff_started", "llm_call_started"],
"url": "https://your.endpoint/webhook",
"realtime": false,
"authentication": {
"strategy": "bearer",
"token": "my-secret-token"
}
}
}If realtime is set to true, each event is delivered individually and immediately, at the cost of crew/flow performance.
Webhook Format#
Each webhook sends a list of events:
{
"events": [
{
"id": "event-id",
"execution_id": "crew-run-id",
"timestamp": "2025-02-16T10:58:44.965Z",
"type": "llm_call_started",
"data": {
"model": "gpt-4",
"messages": [
{ "role": "system", "content": "You are an assistant." },
{ "role": "user", "content": "Summarize this article." }
]
}
}
]
}The data object structure varies by event type. Refer to the event list on GitHub.
As requests are sent over HTTP, the order of events can’t be guaranteed. If you need ordering, use the timestamp field.
Supported Events#
CrewAI supports both system events and custom events in Enterprise Event Streaming. These events are sent to your configured webhook endpoint during crew and flow execution.
Flow Events:#
flow_createdflow_startedflow_finishedflow_plotmethod_execution_startedmethod_execution_finishedmethod_execution_failed
Agent Events:#
agent_execution_startedagent_execution_completedagent_execution_errorlite_agent_execution_startedlite_agent_execution_completedlite_agent_execution_erroragent_logs_startedagent_logs_executionagent_evaluation_startedagent_evaluation_completedagent_evaluation_failed
Crew Events:#
crew_kickoff_startedcrew_kickoff_completedcrew_kickoff_failedcrew_train_startedcrew_train_completedcrew_train_failedcrew_test_startedcrew_test_completedcrew_test_failedcrew_test_result
Task Events:#
task_startedtask_completedtask_failedtask_evaluation
Tool Usage Events:#
tool_usage_startedtool_usage_finishedtool_usage_errortool_validate_input_errortool_selection_errortool_execution_error
LLM Events:#
llm_call_startedllm_call_completedllm_call_failedllm_stream_chunk
LLM Guardrail Events:#
llm_guardrail_startedllm_guardrail_completed
Memory Events:#
memory_query_startedmemory_query_completedmemory_query_failedmemory_save_startedmemory_save_completedmemory_save_failedmemory_retrieval_startedmemory_retrieval_completed
Knowledge Events:#
knowledge_search_query_startedknowledge_search_query_completedknowledge_search_query_failedknowledge_query_startedknowledge_query_completedknowledge_query_failed
Reasoning Events:#
agent_reasoning_startedagent_reasoning_completedagent_reasoning_failed
Event names match the internal event bus. See GitHub for the full list of events.
You can emit your own custom events, and they will be delivered through the webhook stream alongside system events.
Full list of events
Contact our support team for assistance with webhook integration or troubleshooting.