[Experimental] HTTP agent runtime#6356
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6356 +/- ##
==========================================
- Coverage 79.52% 78.85% -0.67%
==========================================
Files 225 230 +5
Lines 16641 17280 +639
==========================================
+ Hits 13233 13627 +394
- Misses 3408 3653 +245
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
yogitasrivastava
left a comment
There was a problem hiding this comment.
-
Content-type
Consider enforcing a stricter Content‑Type: application/json on incoming requests early, with clear 415/400 responses for bad payloads. -
Runtime vs. Host separation
The split between HttpWorkerAgentRuntime and HttpWorkerAgentRuntimeHost is clean, but the naming feels a bit opaque (the “HostServicer” suffix sounds gRPC‑ish). Kindly consider renaming the host side to something like HttpAgentServer or HttpAgentHost for clarity.
|
Orb Code Review (powered by GLM 5.1 on Orb Cloud) PR #6356 — [Experimental] HTTP agent runtimeThanks for this ambitious contribution! An HTTP-based distributed runtime is a valuable addition to AutoGen. Here are my findings from a thorough review: 🔴 Security concerns (expected for experimental, but worth documenting)
🔴 Potential bugs
🟡 Design observations
🟡 Missing for production use (document as experimental limitations)
✅ Good aspects
SummaryA promising experimental runtime with solid architecture but needs security documentation, test consistency fixes, and attention to pending request tracking. As an experimental feature, clearly documenting the security and completeness gaps would help set expectations. Assessment: request-changes — Please fix the test import mismatch, verify pending future tracking in |
|
The HTTP agent runtime + JSON-RPC approach enables a class of deployments that the in-process model cannot support — agents running in separate processes, on different hosts, or behind load balancers. The middleware system for authentication is the right extension point. One authentication dimension worth designing for from the start: agent identity as a first-class HTTP credential, not just user identity. The current framing (FastAPI + JSON-RPC) naturally maps to user-facing auth (Bearer tokens, API keys). But in multi-agent AutoGen deployments, the caller is often another agent, not a user. Agent-to-agent authentication over HTTP needs a different credential model than user authentication:
A lightweight addition to the middleware design: class AgentAuthMiddleware:
async def __call__(self, request: Request, call_next):
agent_id = request.headers.get("X-Agent-ID")
if agent_id:
# Verify agent identity + behavioral trust
trust = await satp.verify(agent_id)
if trust.score < self.config.min_agent_trust:
return Response(status_code=403, content="Agent trust below threshold")
request.state.agent_trust = trust
return await call_next(request)This plugs into the existing middleware system without changing the JSON-RPC layer — agent callers get trust-gated access, human callers continue through standard Bearer token auth. |
Why are these changes needed?
This is an initial proposal for an experimental http agent runtime based on fastapi and json-rpc. The goal is to support existing middleware system to facilitate enhancement of agent functionality such as enabling authentication.
Related issue number
Related to #6355
Checks