Skip to content

Conversation

@devin-ai-integration
Copy link

@devin-ai-integration devin-ai-integration bot commented Jan 7, 2026

Summary

Adds a new "processing" state to AgentState to distinguish when the agent is executing function tools vs thinking (LLM inference). This allows applications to show appropriate UI/animations when the agent is executing tool calls, which typically take time and are silent.

Changes:

  • Added "processing" to the AgentState Literal type in events.py
  • Updated two state transitions in agent_activity.py to emit "processing" instead of "thinking" when tool execution begins:
    • Pipeline LLM path (line 2058): after speech playout when there are tool outputs
    • Realtime model path (line 2548): when first tool starts executing
  • Updated test_tool_call test to verify the new state transition sequence (now expects 7 state events instead of 6)

State transition during tool calls:
speakingprocessing (tool execution) → thinking (LLM inference for response) → speakinglistening

Closes #4460

Review & Testing Checklist for Human

  • Verify state name choice: Confirm "processing" is the preferred name vs alternatives like "tool_calling" - this affects the public API
  • Breaking change assessment: Adding a new state to the Literal type may affect consumers who exhaustively match on agent states - consider if this needs a migration note or changelog entry
  • Verify completeness: Confirm there are no other code paths where tool execution should emit "processing" state (only two locations were changed)
  • End-to-end test: Test with an agent that uses function tools to verify the state transitions work correctly in both pipeline and realtime model paths

Notes

devin-ai-integration bot and others added 2 commits January 7, 2026 16:21
This adds a new 'processing' state to AgentState to distinguish when
the agent is executing function tools vs just thinking (LLM processing).

This allows applications to show appropriate UI/animations when the
agent is executing tool calls, which typically take time and are silent.

Closes #4460

Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@chenghao-mou chenghao-mou requested a review from a team January 7, 2026 16:30
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.

Support agent state of tool calling

1 participant