Skip to navigation

Agents

Serve coding agents and multi-step agent sessions faster

View as Markdown

Agent traffic looks different from chat. Each turn repeats a growing prefix, tool calls leave the GPU idle between turns, and some requests (the one a user is waiting on) matter more than others (a background subagent). Dynamo does not run your agent loop. Your harness still owns prompts, tools, subagents, and reasoning state. Dynamo reads a little metadata on each request and uses it to route and schedule better, keep reusable KV cache, and record what happened.

What You Can Do

I want to…UseGuide
Point a coding agent at DynamoA local endpoint and a harness configRun an agent on Dynamo
Tell Dynamo which requests belong to which agentSession IDsIdentify agent sessions
Keep a session’s turns on the worker that holds its KV cacheSession affinityMaintain session affinity
Let interactive requests go ahead of background workPriority hintsPrioritize requests
See where time goes between LLM calls and toolsRequest tracingTrace an Agent Run
Compare serving configurations without rerunning the agentTrace replaySimulate an Agent Run
Free KV cache held by agents that are waiting on toolsThunderAgentSchedule Agents with ThunderAgent

Try It

Send a request that carries a session ID and a priority hint:

curl http://localhost:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-H 'x-dynamo-session-id: research-run-42:researcher' \
-d '{
"model": "my-model",
"messages": [{"role": "user", "content": "..."}],
"nvext": {
"agent_hints": { "priority": 5, "osl": 1024 }
}
}'

The response is a normal chat completion. The session ID labels the request for tracing. The hints change queueing, scheduling, and cache eviction only under load, and only for the priority layers you turn on. With the launcher defaults they are metadata. See Prioritize requests for the switches. Neither one pins the session to a worker; for that, see Maintain session affinity.

How Dynamo Uses the Metadata

The agent harness sends each LLM request with a session ID and optional hints. The Dynamo frontend normalizes the metadata, the router uses it for placement, session binding, and queue order, and the backend engine uses priority for scheduling and eviction. The frontend also records a request trace.

LayerSignalWhat Dynamo does with it
Frontend APISession headers and nvext request extensionsNormalizes agent identity and serving intent across the Chat Completions, Responses, and Messages APIs.
RouterSession ID, priority, expected output length, cache overlapPlaces requests for KV reuse, binds sessions to workers when affinity is on, and orders queued work.
Backend enginePriority forwarded by the routerInfluences engine scheduling and cache eviction where the backend supports it.

Where to Start

  1. Follow Run an agent on Dynamo to get an agent talking to a local deployment.
  2. Add session IDs so every request is attributable.
  3. Turn on session affinity if your agents run many turns on the same context.
  4. Add priority once interactive and background requests compete for the same workers.
  5. Use tracing to measure each change before you keep it.

For SGLang engine flags and subagent KV isolation, see Agents on SGLang.