This repository was archived by the owner on Nov 15, 2025. It is now read-only.

Description
Problem
DSPy-based agents (e.g., ReAct for code gen) need prompt optimization while routing through AgentGateway for secure A2A/MCP comms, but current opt lacks protocol-aware tuning.
Proposed Solution
Add --mode dspy-agent to bbeval opt:
- Setup: Wrap DSPy module (e.g., ReAct) with Agenspy for MCP output; proxy via AgentGateway endpoint (
--gateway-url http://localhost:8080).
- Optimization: Tune agent instructions/tools using bbeval metric; enforce guidelines (e.g., "use MCP for tool calls").
- Output: JSON config with optimized signatures + gateway routes.
- Example: Optimize coding agent on 10 tasks, evaluating end-to-end latency/accuracy.
Benefits: Production-ready tuning for scaled, observable agents; supports <10 LLM calls.
Resources
AgentGateway