AgentConfig Class
Resolved configuration for an agent server host.
All values are populated from environment variables at creation time.
Access via app.config:
app = InvocationAgentServerHost()
print(app.config.agent_name)
print(app.config.project_endpoint)
Constructor
AgentConfig(*, agent_name: str, agent_version: str, agent_id: str, is_hosted: bool, project_endpoint: str, project_id: str, session_id: str, port: int, appinsights_connection_string: str, otlp_endpoint: str, sse_keepalive_interval: int)
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
Agent name from |
|
agent_version
Required
|
Agent version from |
|
agent_id
Required
|
Combined identifier ( |
|
is_hosted
Required
|
Whether the agent is running in a Foundry-hosted container environment,
derived from |
|
project_endpoint
Required
|
Foundry project endpoint from |
|
project_id
Required
|
Foundry project ARM resource ID from |
|
session_id
Required
|
Default session ID from |
|
port
Required
|
Server port from |
|
appinsights_connection_string
Required
|
Application Insights connection string. |
|
otlp_endpoint
Required
|
OTLP exporter endpoint. |
|
sse_keepalive_interval
Required
|
SSE keep-alive interval in seconds (0 = disabled). |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
|
|
agent_version
Required
|
|
|
agent_id
Required
|
|
|
is_hosted
Required
|
|
|
project_endpoint
Required
|
|
|
project_id
Required
|
|
|
session_id
Required
|
|
|
port
Required
|
|
|
appinsights_connection_string
Required
|
|
|
otlp_endpoint
Required
|
|
|
sse_keepalive_interval
Required
|
|
Methods
| from_env |
Create an |
from_env
Create an AgentConfig by reading all platform environment variables.
from_env() -> Self
Returns
| Type | Description |
|---|---|
|
A frozen config with resolved values. |