@cuylabs/agent-foundry-agentserver-core
v7.4.0
Published
Shared TypeScript host utilities for Foundry Agent Server protocol packages
Maintainers
Readme
@cuylabs/agent-foundry-agentserver-core
Shared host utilities for TypeScript Foundry Agent Server protocol packages.
This package mirrors the protocol-agnostic parts of Python
azure-ai-agentserver-core: configuration resolution, request/session ID
sanitization, request correlation IDs, server-version header formatting,
standard error envelopes, common Express host middleware, readiness/liveness
handlers, request logging, graceful shutdown helpers, and startup configuration
logging. Protocol packages such as
@cuylabs/agent-foundry-agentserver-invocations build their HTTP surface on top
of these helpers.
Observability
Core always creates OpenTelemetry-compatible request spans and installs the Node async context manager so protocol handlers can read active baggage. It sets the Foundry baggage keys used by the Python host:
azure.ai.agentserver.invocation_id
azure.ai.agentserver.session_id
azure.ai.agentserver.response_id
azure.ai.agentserver.conversation_id
azure.ai.agentserver.streaming
azure.ai.agentserver.x-request-idExporter setup is optional and is driven by the same environment variables used by hosted agents:
| Variable | Behavior |
| --- | --- |
| APPLICATIONINSIGHTS_CONNECTION_STRING | Enables Azure Monitor export through the package's optional @azure/monitor-opentelemetry dependency |
| OTEL_EXPORTER_OTLP_ENDPOINT | Enables OTLP HTTP trace export through the package's optional OpenTelemetry exporter dependencies |
Protocol packages call configureAgentServerObservability() by default. Apps
that already own OpenTelemetry setup can disable package-managed exporter setup
at the protocol layer and keep the span/baggage helpers.
Python Comparison
Compare this package to Python azure-ai-agentserver-core, not to a protocol
package. Python exposes an AgentServerHost built on ASGI, Starlette, and
Hypercorn. This TypeScript package exposes the equivalent protocol-agnostic
host pieces for Express and Node HTTP, then protocol packages compose those
pieces into their own server entry points.
@cuylabs/agent-foundry-agentserver-responses depends on this package in the
same way Python azure-ai-agentserver-responses depends on
azure-ai-agentserver-core. The local @cuylabs/agent-foundry-hosting
package is different: it is agents-ts runtime glue, not a direct Python SDK
peer.
