Skip to content

Conversation

@automationpi
Copy link

@automationpi automationpi commented Oct 4, 2025

Add support for displaying nested agent calls (agent -> subagent -> subagent) with proper indentation and visual indicators.

The UI now shows delegated calls in a collapsible section with:

  • Indented display for each nesting level
  • Level indicators showing nesting depth
  • Protection against excessive nesting (max 10 levels)

Includes test coverage for nested call scenarios.

Screenshot:

image

Fixes #972

@automationpi automationpi requested a review from peterj as a code owner October 4, 2025 21:42
@automationpi automationpi force-pushed the fix/nested-agent-calls-972 branch from 3a85910 to 4a5e725 Compare October 6, 2025 20:05
Add support for displaying nested agent calls (agent -> subagent -> subagent)
with proper indentation and visual indicators.

The UI now shows delegated calls in a collapsible section with:
- Indented display for each nesting level
- Colored borders to indicate hierarchy depth
- Level indicators showing nesting depth
- Protection against excessive nesting (max 10 levels)

Includes comprehensive test coverage for nested call scenarios.

Fixes kagent-dev#972

Signed-off-by: Naveen Alok <[email protected]>
@automationpi automationpi force-pushed the fix/nested-agent-calls-972 branch from 4a5e725 to 51c4877 Compare October 6, 2025 20:14
@peterj
Copy link
Collaborator

peterj commented Oct 7, 2025

Could you add a couple of screenshots to the PR? (I'll try to test it out tomorrow, but I am curious to see how it looks like :))

@peterj
Copy link
Collaborator

peterj commented Oct 9, 2025

I think there might be some issues with how this works -- I've created a nested agent that references k8s, istio and helm agents - and the nested display looks incorrect.

Screenshot 2025-10-09 at 11 46 23 AM

so it shows the k8s-agent being called which is correct, but then it shows k8s-agent twice as nested calls and then again at the top level (and nested again) with same inputs.

Screenshot 2025-10-09 at 11 47 38 AM

Copy link
Collaborator

@peterj peterj left a comment

Choose a reason for hiding this comment

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

the display is not correct -- check the comment.

@dimetron dimetron mentioned this pull request Oct 9, 2025
3 tasks
@dimetron
Copy link
Contributor

dimetron commented Oct 9, 2025

@peterj how those events are propagated from nested ?

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.

show nested agent tool calls

4 participants