Skip to content

feat(agent): introduce generalized reverse proxy bidirectional streaming evaluation - #575

Draft
saurabh-net wants to merge 3 commits into
mainfrom
feat/agentic-reverse-proxy
Draft

feat(agent): introduce generalized reverse proxy bidirectional streaming evaluation#575
saurabh-net wants to merge 3 commits into
mainfrom
feat/agentic-reverse-proxy

Conversation

@saurabh-net

Copy link
Copy Markdown
Collaborator

Summary

This PR introduces generalized reverse proxy bidirectional streaming evaluation into Evalbench, enabling multi-turn autonomous agents running in remote/sandboxed environments to connect via an outbound gRPC stream (rpc AgentInteract).

Key Features

  1. Typed Agent Streaming Envelopes (evalproto/eval_agent.proto):
    • TurnRequest / TurnResponse: Carries prompts, multi-turn tool call trajectories (tool_name, parameters_json, output, duration_ms), token statistics, and status codes.
    • ScoringRequest / ScoringResponse: Generic container for named in-flight remote scorers.
    • ArtifactRequest / ArtifactResponse: Generic container for remote workspace archival to GCS.
    • SessionSummaryMessage: Delivers final job score rollups to the connected client upon run completion.
  2. Dedicated RPC Endpoint (evalproto/eval_service.proto & eval_service.py):
    • Added rpc AgentInteract(stream AgentStreamMessage) returns (stream AgentStreamMessage).
    • Bridges client streaming sessions with in-memory AGENT_PROXY_QUEUES and correlation inboxes.
  3. AgenticReverseProxyGenerator (evalbench/generators/models/agentic_reverse_proxy.py):
    • Conforms to AgentCliGenerator to execute multi-turn agent conversations over the reverse stream.
  4. Transparent Remote Scoring (evalbench/scorers/score.py):
    • Any scorer configured with remote: true is automatically routed via RemoteScorerProxy across the reverse queue.
  5. Transparent Remote Artifact Archiving (evalbench/reporting/__init__.py):
    • Any GCS reporter configured with remote: true delegates workspace archival to the client over ArtifactRequest.
  6. Unit Tests (evalbench/test/agentic_reverse_proxy_test.py):
    • Full test coverage for generator turn cycles, remote scoring delegation, and artifact archival.

Testing

  • python -m unittest evalbench/test/agentic_reverse_proxy_test.py passes (3/3 tests).
  • End-to-end multi-turn evaluated and verified against live streaming clients with 100% Goal Completion.
Implements generalized reverse proxy bidirectional streaming architecture for
autonomous multi-turn agent evaluation in Evalbench.

Key Changes:
- evalproto/eval_agent.proto: Defined typed AgentStreamMessage envelopes for
  turn requests/responses, in-flight remote scoring, remote workspace archival,
  and session summary delivery.
- evalproto/eval_service.proto: Added rpc AgentInteract streaming endpoint.
- evalbench/eval_service.py: Implemented AgentInteract servicer bridging streaming
  clients with in-memory AGENT_PROXY_QUEUES.
- evalbench/generators/models/agentic_reverse_proxy.py: Added AgenticReverseProxyGenerator
  implementing AgentCliGenerator.
- evalbench/scorers/remote_scorer.py: Added RemoteScorerProxy and transparent
  `remote: true` delegation in score.py.
- evalbench/reporting/remote_artifact_reporter.py: Added RemoteArtifactReporter and
  transparent `reporting.gcs.remote: true` delegation.
- evalbench/test/agentic_reverse_proxy_test.py: Added comprehensive unit tests.
Comment thread evalbench/generators/models/agentic_reverse_proxy.py Fixed
Comment thread evalbench/generators/models/agentic_reverse_proxy.py Fixed
Comment thread evalbench/test/agentic_reverse_proxy_test.py Fixed
Comment thread evalbench/reporting/remote_artifact_reporter.py Fixed
Comment thread evalbench/eval_service.py Fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant