Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Microsoft Agent framework Pip Install Agent Framework

From Leeroopedia
Revision as of 11:31, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Microsoft_Agent_framework_Pip_Install_Agent_Framework.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Property Value
Implementation Name Pip Install Agent Framework
SDK Microsoft Agent Framework
Repository agent-framework
Source File python/packages/core/pyproject.toml
Line Range L1-132
Type External Tool Doc
Domains AI_Infrastructure, DevOps

Overview

The Pip Install Agent Framework implementation covers the installation of the agent-framework-core package via pip and the configuration of environment variables required for LLM provider authentication. The package specification is defined in python/packages/core/pyproject.toml and targets Python >= 3.10. Installation supports optional extras for Azure integration, while companion packages provide declarative agent definitions and multi-agent orchestrations.

Code Reference

Source Location

Property Value
File python/packages/core/pyproject.toml
Lines 1-132
Package Name agent-framework-core
Python Requirement >= 3.10

Key Dependencies

Dependency Version Constraint Purpose
pydantic >= 2 Data validation and schema enforcement for agent configuration, tool parameters, and model options.
openai >= 1.99.0 OpenAI Python SDK providing the Responses API client.
azure-identity >= 1 Azure credential management for authenticating with Azure OpenAI endpoints (via [azure] extra).
opentelemetry-api >= 1.39.0 Distributed tracing and observability hooks for agent execution pipelines.

I/O Contract

Inputs

Input Type Required Description
pip install command Shell command Yes The pip install invocation specifying the package name and optional extras.
OPENAI_API_KEY Environment variable Conditional API key for OpenAI. Required when using OpenAIResponsesClient.
OPENAI_RESPONSES_MODEL_ID Environment variable No Model identifier for the Responses API (e.g., gpt-4o). Falls back to a default if unset.
AZURE_OPENAI_API_KEY Environment variable Conditional API key for Azure OpenAI. Required when using AzureOpenAIResponsesClient with key-based auth.
AZURE_OPENAI_ENDPOINT Environment variable Conditional Azure OpenAI resource endpoint URL. Required for Azure deployments.
AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME Environment variable Conditional Deployment name within the Azure OpenAI resource. Required for Azure deployments.

Output

Output Type Description
Installed Python packages Filesystem artifacts The agent-framework-core package and its dependencies installed into the active Python environment.
Configured runtime environment Environment state Environment variables set in the shell session, enabling OpenAIResponsesClient or AzureOpenAIResponsesClient to authenticate without explicit credential parameters.

Installation Commands

Core Package

# Install the core package with base dependencies
pip install agent-framework-core

With Optional Extras

# Install with all optional extras
pip install agent-framework-core[all]

# Install with Azure extras only
pip install agent-framework-core[azure]

Companion Packages

# Declarative agent definitions (YAML/JSON-based agent construction)
pip install agent-framework-declarative

# Multi-agent orchestration patterns (group chat, handoff, pipelines)
pip install agent-framework-orchestrations

Environment Variable Configuration

OpenAI

export OPENAI_API_KEY="sk-..."
export OPENAI_RESPONSES_MODEL_ID="gpt-4o"

Azure OpenAI

export AZURE_OPENAI_API_KEY="..."
export AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com/"
export AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME="gpt-4o"

Usage Examples

Verify Installation with OpenAI

from agent_framework import Agent
from agent_framework.openai import OpenAIResponsesClient

# Client reads OPENAI_API_KEY from environment automatically
client = OpenAIResponsesClient()

agent = Agent(
    client=client,
    instructions="You are a helpful assistant.",
    name="install-test",
)

# Run a simple query to verify end-to-end connectivity
response = await agent.run("Hello, are you working?")
print(response)

Verify Installation with Azure OpenAI

from agent_framework import Agent
from agent_framework.azure import AzureOpenAIResponsesClient

# Client reads AZURE_OPENAI_* variables from environment automatically
client = AzureOpenAIResponsesClient()

agent = Agent(
    client=client,
    instructions="You are a helpful assistant.",
    name="azure-install-test",
)

response = await agent.run("Hello from Azure!")
print(response)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment