skillfed

azure-ai-agentserver-core

Foundation utilities and host framework for Azure AI Hosted Agents

azure-ai-agentserver-core v2.0.0 813.1K downloads/30d#4,997 on PyPI5,588
Permissive license MIT Active released

What it is and what it does

Azure AI Agent Server Core is a Python framework for hosting containerized Azure AI agents. It abstracts away the operational plumbing — HTTP serving via Hypercorn on a configurable port, health readiness probes, graceful shutdown with request draining, and automatic OpenTelemetry tracing with Azure Monitor and OTLP export — so that protocol-specific packages can focus on endpoint logic. You subclass AgentServerHost, add your routes, and call run().

The package includes a durable state store (FoundryStateStore) for persisting agent session memory and per-user state, a @task decorator for building crash-resilient long-running agents that survive container restarts, and request context utilities for multi-user sessions that partition state by user ID while forwarding only the opaque call ID on outbound Foundry calls. Configuration is driven by environment variables (PORT, FOUNDRY_AGENT_NAME, APPLICATIONINSIGHTS_CONNECTION_STRING, OTEL_EXPORTER_OTLP_ENDPOINT, etc.), making it container-friendly.

Use it for:

  • Build a containerized agent that handles HTTP requests, exports traces to Azure Monitor, and serves on a configurable port with health probes.
  • Implement multi-user agent sessions where each request carries user identity and call context, with state partitioned per user.
  • Create a crash-resilient agent using the @task decorator that persists state across container restarts and redeployments.
  • Set up graceful shutdown for an agent container that drains in-flight requests before exiting with a default 30 s timeout.
  • Store agent session memory, conversation checkpoints, and per-user preferences in a durable state store with optimistic concurrency.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides the host framework and infrastructure for building Azure AI Hosted Agent containers, handling health probes, graceful shutdown, OpenTelemetry tracing, and ASGI serving.

Yes. The package is actively maintained (released 8 days ago), has low install friction, carries a permissive MIT license, and solves a concrete problem — hosting Azure AI agents with production-grade infrastructure (tracing, graceful shutdown, health probes, state persistence) built in. It's in the top 5000 PyPI packages by download volume. Install it if you are building agents for Azure Foundry or need a structured ASGI host with OpenTelemetry and graceful shutdown.

Install

azure-ai-agentserver-core on PyPI

pip

pip install azure-ai-agentserver-core

uv

uv add azure-ai-agentserver-core

poetry

poetry add azure-ai-agentserver-core

Installing azure-ai-agentserver-core

Before you install

Low install friction with a pure-Python wheel. Active maintenance — released 8 days ago with recent commits. Requires Python 3.10 or later and brings 9 runtime dependencies including starlette, hypercorn, and OpenTelemetry libraries.

License in practice

MIT license (permissive) — you can use, modify, and distribute this package freely with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

pip install azure-ai-agentserver-core

from azure.ai.agentserver.core import AgentServerHost
from starlette.responses import JSONResponse
from starlette.routing import Route

class MyAgent(AgentServerHost):
    def __init__(self, **kwargs):
        routes = [Route("/my-endpoint", self._handle, methods=["POST"])]
        super().__init__(routes=routes, **kwargs)
    
    async def _handle(self, request):
        return JSONResponse({"status": "ok"})

app = MyAgent()
app.run()

Requires Python 3.10 or later. Optional azure-identity package needed for DefaultAzureCredential; optional gRPC extra for OTLP/gRPC protocol support.

Verify before relying

  • Whether the state store's optimistic concurrency model and tag-filtered listing cover all common use cases for agent session memory.
  • Performance characteristics and throughput limits of FoundryStateStore under concurrent multi-user load.
  • How the @task decorator's crash recovery and resume patterns interact with distributed deployments or container orchestration platforms.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 9 — azure-core, isodate, starlette, hypercorn, opentelemetry-api, opentelemetry-sdk, microsoft-opentelemetry, aiohttp, azure-identity
Maintenance actively maintained — 8 days since the last release
Last repo commit
First released
Downloads 813,097/month — #4,997 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: azure_ai_agentserver_core-2.0.0-py3-none-any.whl

Keywords: azure, azure sdk, agent, agentserver, core

Development Status :: 5 - Production/StableProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

azure ai agent server frameworkasgi host for azure agentsopentelemetry tracing azureagent container infrastructuregraceful shutdown http serverazure foundry agent hostinghealth probe readiness check
azure-sdkasgi-frameworkobservability

More Application Frameworks packages

fastapi

FastAPI is a Python web framework for building…

permissive · top 100 on PyPI

annotated-doc

Provides a way to document function parameters,…

permissive · top 100 on PyPI

textual

Textual is a Python framework for building…

permissive · top 100 on PyPI

typer

Typer builds command-line applications from…

permissive · top 1,000 on PyPI

mcp

Build and connect to Model Context Protocol…

permissive · top 1,000 on PyPI

Werkzeug

Werkzeug is a WSGI utility library providing…

permissive · top 1,000 on PyPI

azure-ai-agentserver-agentframework

Wraps an Agent-framework agent to host it on…

unclear · top 15,000 on PyPI

azure-ai-agentserver-invocations

Provides HTTP and WebSocket invocation protocol…

permissive · top 15,000 on PyPI

azure-ai-agentserver-responses

Provides the Responses protocol endpoints for…

permissive · top 15,000 on PyPI

agent-framework-foundry-hosting

Integrates Agent Framework agents and workflows…

permissive · top 15,000 on PyPI

azure-ai-projects

Provides a Python client for Microsoft Foundry…

permissive · top 5,000 on PyPI

agent-framework

Builds and orchestrates AI agents powered by…

permissive · top 5,000 on PyPI

agent-framework-foundry

Provides Microsoft Foundry integrations for the…

permissive · top 15,000 on PyPI

agent-framework-foundry-local

Integrates Microsoft Agent Framework with…

permissive · top 15,000 on PyPI

spotinst-agent

Spotinst-agent is a remote execution agent that…

permissive · top 15,000 on PyPI

spotinst-agent-2

Spotinst Agent is a remote script executor that…

permissive · top 15,000 on PyPI

Further reading