Skip to content

adding support meta data flow#45256

Open
achauhan-scc wants to merge 3 commits intoAzure:lusu/agentserver-1110from
achauhan-scc:agent-hosting-change
Open

adding support meta data flow#45256
achauhan-scc wants to merge 3 commits intoAzure:lusu/agentserver-1110from
achauhan-scc:agent-hosting-change

Conversation

@achauhan-scc
Copy link
Member

@achauhan-scc achauhan-scc commented Feb 19, 2026

Adding support for metadata flow - request headers and user token propagation to agent tools.
This pull request enhances how HTTP request headers and metadata are passed through the agent server, making selected headers and request metadata available to the agent and its tools without involving the LLM. The changes introduce a mechanism for capturing specific headers from incoming requests, storing them in the agent context, and making them accessible throughout the agent's lifecycle.

Core improvements to request context handling:

  • Added a _PASSTHROUGH_HEADERS set in base.py to specify which headers (such as authorization, x-request-id, and x-user-authorization) should be captured from incoming HTTP requests.
  • Modified the dispatch method in base.py to extract and log all incoming headers, filter for passthrough headers, and include them in the AgentRunContext for each request.

Agent run context enhancements:

  • Updated the AgentRunContext class to accept an optional headers dictionary, store it, and provide a headers property for access. This allows downstream consumers to retrieve the captured headers as needed. [1] [2]

Agent framework integration:

  • In the agent adapter, attached a combined dictionary of captured headers and request metadata to the agent instance (_request_headers), making it accessible to tools during agent execution without LLM involvement.

@github-actions github-actions bot added the Hosted Agents sdk/agentserver/* label Feb 19, 2026
achauhan-scc and others added 2 commits February 19, 2026 15:29
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ific logic

The hosting framework now merges all request metadata into request_context
as-is, letting the agent/tool layer handle interpretation (e.g. token
reassembly for the 512-char metadata limit).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hosted Agents sdk/agentserver/*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments