Skip to content

Comments

Initial multi-agent scenario#11

Merged
anirbanbasu merged 32 commits intomasterfrom
multi-agent
Nov 3, 2025
Merged

Initial multi-agent scenario#11
anirbanbasu merged 32 commits intomasterfrom
multi-agent

Conversation

@anirbanbasu
Copy link
Owner

Major changes:

  • Simple multi-agent workflow.
  • Removed LlamaIndex and switched to Pydantic AI.
  • Added OAuth authentication for the web frontend when exposed using ngrok using a traffic policy.
  • Added live streaming in command line mode.

Known bug:

  • anyio task group exception while streaming -- this will not affect the main functionality.

broken: Agent workflow stops executing after the first handoff.
… hand-off. Why does the `Responder` agent generate a `StopEvent`?
…their first chat.

chore: Added a unified start-stop script for Dapr-based apps and the web app.
todo: Handle timeout errors of actor proxy based method invocations from the A2A executor.
…ry using Pydantic AI. Time to get rid of LlamaIndex.
… event handler for the Dapr actor -- currently, does not work.
chore: Shortened CLI command names.
…pted to exit cancel scope in a different task than it was entered in.
bug: Somehow the memory is not being considered even though message history is correctly retrieved from state storage.
…than one subsequent conversation is lost.

Debug this using the worflow orchestrator for simplicity.
…istory was not presented in the right format.
@anirbanbasu anirbanbasu requested a review from Copilot November 2, 2025 21:27
@anirbanbasu anirbanbasu self-assigned this Nov 2, 2025
@anirbanbasu anirbanbasu added the enhancement New feature or request label Nov 2, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the DQA application's architecture by replacing the llama-index-based agent implementation with pydantic-ai, removing the deprecated Echo agent functionality, and adding OAuth authentication support. The changes consolidate the agent workflow system, improve type safety, and enhance the web UI with user authentication features.

  • Migrated agent framework from llama-index to pydantic-ai with graph-based workflow orchestration
  • Removed Echo agent and all related A2A endpoints, actors, executors, models, and CLI commands
  • Added OAuth authentication support via ngrok traffic policy with user namespace isolation for chat IDs
  • Refactored environment variable management from ParsedEnvVars instance to EnvVars class attributes

Reviewed Changes

Copilot reviewed 26 out of 28 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/dqa/__init__.py Renamed ParsedEnvVars to EnvVars, changed to class attributes pattern, added new validation rules and HTTPX_TIMEOUT
src/dqa/actor/mhqa.py Replaced llama-index workflow with pydantic-ai agent workflow, removed MCP parsing logic moved to orchestrator
src/dqa/actor/echo_task.py Deleted entire Echo actor implementation
src/dqa/agent_workflow/*.py Added new workflow orchestrator and helper classes using pydantic-ai and pydantic-graph
src/dqa/web/gradio.py Added OAuth user capture, namespace isolation for chat IDs, improved UI controls and error handling
src/dqa/cli/a2a.py Removed all Echo-related commands, renamed MHQA commands, added streaming visualization
src/dqa/client/a2a_mixin.py Added configurable HTTPX timeout from environment variables
src/dqa/executor/mhqa.py Updated pubsub handling, improved error handling, fixed stream management issues
src/dqa/executor/echo_task.py Deleted entire Echo executor
src/dqa/model/mhqa.py Added MHQAResponsesTypeAdapter, tool_call_id field, default values for optional fields
src/dqa/model/echo_task.py Deleted entire Echo model
src/dqa/server/*.py Removed Echo A2A server, updated to use EnvVars class attributes
tests/test_cli.py Removed all Echo-related tests, cleaned up unused imports
Configuration files Updated MCP/LLM config structure, added ngrok traffic policy, updated dapr.yaml
Shell scripts Added unified webapp runner, ngrok runner with OAuth, updated upgrade script

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@anirbanbasu anirbanbasu requested a review from Copilot November 2, 2025 22:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 26 out of 28 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

APP_DAPR_PUBSUB_MEMORY_STREAM_BUFFER_SIZE: int = env.int(
"APP_DAPR_PUBSUB_MEMORY_STREAM_BUFFER_SIZE",
default=65536,
validate=Range(min=32768, max=math.inf),
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

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

Using math.inf as the maximum value in Range validation may cause issues with the marshmallow validator. Consider using a concrete upper bound like 2**31 - 1 (max signed 32-bit integer) or sys.maxsize instead.

Copilot uses AI. Check for mistakes.
@anirbanbasu
Copy link
Owner Author

Will merge for now but separate patches are required to address the bugs in this PR.

@anirbanbasu anirbanbasu merged commit f5b8833 into master Nov 3, 2025
2 checks passed
@anirbanbasu anirbanbasu deleted the multi-agent branch November 3, 2025 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant