Skip to content

fix(crew): emit tool_call events so crew tool calls show on the platform - #102

Merged
abhishekmishragithub merged 1 commit into
mainfrom
fix-crew-tool-call-events
Aug 20, 2026
Merged

fix(crew): emit tool_call events so crew tool calls show on the platform#102
abhishekmishragithub merged 1 commit into
mainfrom
fix-crew-tool-call-events

Conversation

@abhishekmishragithub

Copy link
Copy Markdown
Collaborator

Problem

Crew agents show no tool-call events on the platform's Events tab, while single-prompt agents do. A customer reported their crew transfer_call was invisible on the call detail page even though the transfer fired. (Screenshot: single-prompt agent showing a transfer_call Tool Call event — crew agents produce none.)

Root cause

Crew tools run inside the deployed pod. The ToolRegistry executed them silently and emitted nothing. Single-prompt agents show tool calls because the platform LLM emits tool_call_* events; crew tools are invisible to the platform.

The rest of the pipeline already exists: pipecat's agent_log_router maps agent.log events named tool_call_start/end/error → platform TOOL_CALL_* events, on_agent_log is wired for crew agents (AgentSDKProcessor), and /events allowlists + ClickHouse-persists them. The only missing link was the SDK emitting them.

Fix (SDK-only, no pipecat/atoms change)

  • ToolRegistry.discover(self) now captures the owning crew node.
  • _execute_single emits SDKAgentLogEvent(name=tool_call_start|tool_call_end|tool_call_error) over the node's websocket around each tool, with {turn_id, tool_call_id, function_name, context:{arguments, response}, latency, success}.
  • Emission never breaks tool execution (all failures swallowed); standalone registries (no node) stay silent.

Zero change to user crew code — transfer_call and every other @function_tool get Events-tab parity with single-prompt agents as soon as a crew redeploys on this SDK.

Tests

Success emits start+end (with response + latency), error emits start+error, standalone registry stays silent. ruff clean; crew suite (29) green. (crew module is excluded from CI mypy by repo config.)

Rollout

Needs a patch release (5.11.1) + crew redeploy to take effect (the pod pulls smallestai from PyPI). The customer's live crews should be redeployed after release.

…how on the platform

Crew tools run inside the deployed pod, so the platform never saw them: the
ToolRegistry executed tools silently and emitted nothing. Single-prompt agents
show tool calls because the platform LLM emits the events; crew agents showed
none, so a crew transfer_call (and every other @function_tool) was invisible on
the call's Events tab even though it fired.

ToolRegistry.discover() now captures the owning crew node, and _execute_single
emits SDKAgentLogEvent(name=tool_call_start|tool_call_end|tool_call_error) over
the node's websocket around each call. pipecat's agent_log_router already maps
those to the platform TOOL_CALL_* events (allowlisted on /events + persisted to
ClickHouse), so no pipecat/atoms change is needed. Zero change to user crew
code — the events flow as soon as a crew redeploys on this SDK. Emission never
breaks tool execution (all failures swallowed); standalone registries stay silent.

Covers transfer_call, giving crew agents the same Events-tab visibility as
single-prompt agents.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant