Registry / azure / azure-ai-agentserver-core

azure-ai-agentserver-core

JSON →
library2.0.0b6pypypiunverified

Azure AI Agent Server Core (azure-ai-agentserver-core) provides foundational utilities and a host framework for deploying Azure AI Hosted Agents. It enables developers to host their agents as containers in the cloud, allowing interaction via the `azure-ai-projects` SDK. The library is part of the broader Azure SDK for Python, with a current version of 2.0.0b1, reflecting active development and frequent beta releases within the ecosystem.

pip install azure-ai-agentserver-core
INSTALL
IMPORT
SIG · AZURE-AI-AGENTSERV
A
azure-ai-agentserver-core
azurepythonv2.0.0b6
Install
9.5s avg
Import
Disk
79MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.0b6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 11.28s
py 3.11
✓ —
✓ 10.08s
py 3.12
✓ —
✓ 8.25s
py 3.13
✓ —
✓ 8.23s
py 3.9
✕ build_error
✕ build_error
79MB installed
● package 79MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FoundryCBAgent
from azure.ai.agentserver.core import FoundryCBAgent
from azure.ai.agentserver.core import FoundryCBAgent

This quickstart demonstrates how to define and run a simple mock agent using `azure-ai-agentserver-core`. It sets up a `FoundryCBAgent` with an `agent_run` method that can handle streaming or non-streaming responses. This example focuses on the server-side implementation of an agent that would be hosted in Azure AI Foundry. For actual deployment, environment variables for Azure authentication and project endpoint would be required.

import os import datetime from azure.ai.agentserver.core import FoundryCBAgent from azure.ai.agentserver.core.models import ( CreateResponse, Response as OpenAIResponse, ) from azure.ai.agentserver.core.models.projects import ( ItemContentOutputText, ResponsesAssistantMessageItemResource, ResponseTextDeltaEvent, ResponseTextDoneEvent, ) def stream_events(text: str): assembled = "" for i, token in enumerate(text.split(" ")): piece = token if i == len(text.split(" ")) - 1 else token + " " assembled += piece yield ResponseTextDeltaEvent(delta=piece) yield ResponseTextDoneEvent(text=assembled) async def agent_run(request_body: CreateResponse): print(f"Agent request received: {request_body.agent}") if request_body.stream: return stream_events("I am a mock agent with no intelligence in stream mode.") # Build assistant output content output_content = [ ItemContentOutputText( text="I am a mock agent with no intelligence, responding to your request.", annotations=[], ) ] response = OpenAIResponse( metadata={}, temperature=0.0, top_p=0.0, user="mock_user", id="mock_id", created_at=datetime.datetime.now(), output=[ ResponsesAssistantMessageItemResource( status="completed", content=output_content, ) ], ) return response my_agent = FoundryCBAgent() my_agent.agent_run = agent_run if __name__ == "__main__": # Ensure environment variables are set for actual deployment # For local testing, you might not need all env vars for simple mock agents. # However, for cloud deployment, you'd need specifics like AZURE_AI_PROJECT_ENDPOINT # os.environ['AZURE_AI_PROJECT_ENDPOINT'] = 'your_project_endpoint' # os.environ['AZURE_CLIENT_ID'] = 'your_client_id' # os.environ['AZURE_TENANT_ID'] = 'your_tenant_id' # os.environ['AZURE_CLIENT_SECRET'] = 'your_client_secret' print("Starting Azure AI Agent Server Core mock agent...") my_agent.run()
Debug
Known issues
breakingThe Agent Framework, which `azure-ai-agentserver-core` is part of, underwent a significant architectural shift leading up to its 1.0.0 release. Provider-specific implementations (e.g., for OpenAI or Azure AI Projects directly creating agents) were moved out of the core package into dedicated, lightweight packages.
fix
Migrate agent definitions and interactions to use the new `FoundryAgent` pattern, focusing on connecting to pre-configured agents rather than creating them programmatically from the core framework. Refer to the latest Azure AI Agent Framework documentation and samples for correct usage.
affects: <1.0.0 of underlying agent framework components
gotchaThis library (`azure-ai-agentserver-core`) is primarily a *host framework* for your agent's logic. To interact with or manage agents hosted in Azure AI Foundry (e.g., sending messages, creating threads), you typically use the `azure-ai-projects` client library or `azure-ai-agents` SDK.
fix
Understand the distinction: use `azure-ai-agentserver-core` to *implement* the agent's server-side logic, and `azure-ai-projects` (or `azure-ai-agents`) to *build client applications* that interact with the hosted agent.
affects: All versions
gotchaAs a beta package (indicated by `b1` in the version), the API of `azure-ai-agentserver-core` is subject to change. Breaking changes may occur in future beta or stable releases without prior deprecation warnings typical of stable versions.
fix
Regularly consult the official Azure SDK for Python release notes and documentation. Pin dependencies to specific beta versions during development and test thoroughly before upgrading.
affects: All beta versions
Upgrade
Version history
2.0.0b6latest on PyPI · released Jun 12, 2026
Audit
Dependencies
pythonrequiredRequired Python version
azure-identityoptionalCommonly used for authenticating with Azure services, including Azure AI Foundry projects.
azure-ai-projectsoptionalCompanion SDK for interacting with agents hosted by azure-ai-agentserver-core.
Agent activity
53 hits · last 30 days
node
44
OpenAI (training)
1
Resources
azure-ai-agentserver-core — pip install azure-ai-agentserver-core · libregistry