1313from llama_stack_client .types .shared_params .response_format import ResponseFormat
1414from llama_stack_client .types .shared_params .sampling_params import SamplingParams
1515
16+ from ..._types import Headers
1617from ..agent import Agent , AgentUtils
1718from ..client_tool import ClientTool
1819from ..tool_parser import ToolParser
@@ -128,6 +129,7 @@ def __init__(
128129 builtin_toolgroups : Tuple [str ] = (), # DEPRECATED
129130 client_tools : Tuple [ClientTool ] = (), # DEPRECATED
130131 custom_agent_config : Optional [AgentConfig ] = None , # DEPRECATED
132+ extra_headers : Headers | None = None ,
131133 ):
132134 """Construct an Agent with the given parameters.
133135
@@ -156,6 +158,7 @@ def __init__(
156158 :param enable_session_persistence: Whether to enable session persistence.
157159 :param json_response_format: Whether to use the json response format with default ReAct output schema.
158160 ::deprecated: use response_format instead
161+ :param extra_headers: Extra headers to add to all requests sent by the agent.
159162 """
160163 use_deprecated_params = False
161164 if custom_agent_config is not None :
@@ -181,6 +184,7 @@ def __init__(
181184 agent_config = agent_config ,
182185 client_tools = client_tools ,
183186 tool_parser = tool_parser ,
187+ extra_headers = extra_headers ,
184188 )
185189
186190 else :
@@ -220,4 +224,5 @@ def __init__(
220224 output_shields = output_shields ,
221225 response_format = response_format ,
222226 enable_session_persistence = enable_session_persistence ,
227+ extra_headers = extra_headers ,
223228 )
0 commit comments