Repository navigation
fix(replay): map and narrate unnamed agents (Agent(instructions=...)) - #318
Conversation
An agent created without name= records agent_name null. The Replay map skipped every such event, so watch(Agent(instructions=...)) showed "Nothing to map yet" and its steps were narrated as "The run". - agentOf(ev): agent_name, else the package's id (agent:Agent from the companion core fix), else tool:None/<tool> or nothing in 4.7.19 traces, falling back to "Agent" for an agent's own run events. - deriveGraph / nodeIdsForEvent / narrate use it, so the agent and its tools are drawn and lit, and steps read "Agent started.". - Only when no graph was recorded: a team graph leaves unnamed agents out on purpose, and they must not reappear as "Outside the team". Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@claude You are the FINAL architecture reviewer. If the branch is under MervinPraison/PraisonAIUI (not a fork), you are able to make modifications to this branch and push directly. SCOPE: Focus ONLY on PraisonAIUI (src/praisonaiui, src/frontend, tests, docs). Do NOT expand into praisonaiagents or the monorepo unless the PR explicitly requires it. Read ALL comments above from Gemini, Qodo, CodeRabbit, and Copilot carefully before responding. Phase 1: Review per AGENTS.md
Phase 2: FIX Valid Issues Phase 3: Final Verdict |
Final architecture reviewOther reviewers: none to act on. Copilot did not run (quota), and Gemini, Qodo and CodeRabbit left no comments. Phase 1: review against AGENTS.md
Phase 2: fixes pushed (8add511)
Skipped: nothing else needed changing. Tests: Phase 3: verdict. I found no blocking issues, and the PR is ready to merge ✅ |
Bug:
watch(Agent(instructions="..."))shows "Nothing to map yet", and its steps read "The run started", "The run thought with…". An agent created withoutname=recordsagent_name: null, and the Replay map skipped every such event. This reproduces on the released aiui 0.3.148 / praisonai 4.7.19.Fix (
replay-core.js, about 25 lines):agentOf(ev)works out which agent an event belongs to, in this order:agent_name;agent:Agent, from the companion core fix);tool:None/<tool>, or nothing at all on the agent's own run events, which falls back to Agent.deriveGraph,nodeIdsForEventandnarrateuse it. The agent and its tools are drawn and change state, steps read "Agent started.", and notool:Noneid reaches the map.observedGraphasks for them only when there is no graph; they don't reappear as "Outside the team".Tests
tests/js/replay-core.test.mjs: 46 pass, 6 of them new:The two map tests fail on the old code.
tests/unit: 1646 passed. Browser tests with axe: 19 passed.End to end with real gpt-4o-mini:
watch(Agent(instructions=...))now shows one Agent box, done, both with the companion core fix and on praisonai 4.7.19 as released.The companion core PR in MervinPraison/PraisonAI fixes the trace ids at the source.
🤖 Generated with Claude Code