Skip to content

Conversation

@KevinWu06
Copy link
Contributor

@KevinWu06 KevinWu06 commented Feb 1, 2026

Summary

Previously, the show tool calls toggle was not working for the LLM and NLU agents for both text and voice features. In the call history, the toggle would not show the tool call logs.

This fix ensures that the tool calls are emitted to the message queue to be picked up and added to the call transcript.

https://linear.app/arklex/issue/AGML-229/agents-fix-tool-call-toggle-for-pipecat-chat-and-voice-transcripts

Description

The previous problem with the NLU agent (voice) was that the tool calls weren't appearing in the call transcript, while regular user/bot messages were. This was because, even though there were listeners to add tool calls to the transcript, the tool calls weren't even being emitted to the message queue. This change ensures that the tool calls are emitted such that the tool calls can populate the call transcipt.

Tests

  • Pre-commit code format check: Run pip install pre-commit and pre-commit install before committing changes
  • Attach one of run-coverage-tests label, run-diff-coverage-tests label, or run-integration-tests label (to skip test coverage) and ensure the check passes.
  • Test case 1: Conversation with LLM agent. Used tool calls, and ended conversation. In chat history, the toggle worked to show/unshow tool call logs.
  • Test case 2: Text and Voice conversation with NLU agent. Used tool calls, and ended conversation. In chat history, the toggle worked as expected.

Reviewers

@arklexai/agent-leads


Note

Medium Risk
Touches core execution flow by adding new message-queue events for every tool invocation, which could affect downstream stream/transcript consumers if they assume a different event cadence or payload shape.

Overview
Ensures tool invocations executed via Executor.step() publish structured EventType.TOOL_CALL and EventType.TOOL_CALL_OUTPUT messages to orch_state.message_queue (including tool name, extracted slot arguments, and a best-effort output string).

This makes tool calls show up in streamed call transcripts for NLU/LLM agent flows when the "show tool calls" toggle is enabled.

Written by Cursor Bugbot for commit 28e3a22. This will update automatically on new commits. Configure here.

@KevinWu06 KevinWu06 requested a review from KathyLiu20 February 1, 2026 01:20
@KevinWu06 KevinWu06 added the live-integration-tests Label a pull request before merging to trigger live integration tests label Feb 1, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@KevinWu06 KevinWu06 added bug Something isn't working run-coverage-tests Label a pull request before merging to trigger test coverage and removed live-integration-tests Label a pull request before merging to trigger live integration tests labels Feb 1, 2026
@KevinWu06 KevinWu06 force-pushed the fix/show-tool-call branch 3 times, most recently from bb790e7 to c29df74 Compare February 1, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working run-coverage-tests Label a pull request before merging to trigger test coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant