Related problems
agent-framework-2— Python 3.14 装 agent-framework 全量卡死:resolution-too-deep(依赖图过深)agent-framework-3— MCP 连接只显示 Cancelled via...(真实 401 认证错误被掩盖)agent-framework-4— agent hooks 装不上/不生效(仓库 setup 只做 git hooks)agent-toolchain-coexist— Agent 工具链全家桶能一起装吗?(17 工具 57 对实测兼容清单)pip-mirror-source— pip 安装超时/下载慢(ReadTimeoutError / WARNING: Retrying ... Read timed out)
Member of combos (1)
combo-env-init— Agent 开发环境一键初始化
No conflict-matrix pairs for this tool yet.
# Agent Framework — Agent Guide
name: agent-framework | version_range: 1.16.0~1.16.0| generated: 2026-08-28
title_en: Agent Framework - Multi-Agent Build/Orchestration/Deployment (Microsoft, AutoGen successor) | desc_en: Python framework from Microsoft for building, orchestrating and deploying multi-agent systems.
Preflight
note: Requires Python >= 3.10; official support 3.10-3.13, 3.14 core chain verified.
python3 --version
预期输出: see command output
Install
note: Tsinghua mirror recommended in mainland China; meta package = full sub-packages, agent-framework-core = core orchestration only.
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple agent-framework
python3 -c "import agent_framework; print('agent_framework OK', agent_framework.__file__)"
预期输出: agent_framework OK .../site-packages/agent_framework/__init__.py
Operations
Verify library import
note: Verified in this environment.
python3 -c "from agent_framework import Agent; print('Agent class OK')"
预期输出: Agent class OK
Inspect top-level API surface
note: Lists orchestration abstractions such as Agent/AgentContext/BaseAgent/BaseChatClient.
python3 -c "import agent_framework; print([a for a in dir(agent_framework) if not a.startswith('_')][:20])"
预期输出: Agent/AgentContext/BaseAgent/BaseChatClient 等编排抽象
Minimal Agent example
note: Requires LLM provider (Azure Foundry/OpenAI/Anthropic key); command from official README, not tested in this environment.
python3 - <<'PY'
import asyncio
from agent_framework import Agent
from agent_framework.azure import AzureChatClient # 或 OpenAI/Anthropic 客户端
# 需要 FOUNDRY_PROJECT_ENDPOINT / FOUNDRY_MODEL_DEPLOYMENT_NAME 或等价环境变量
async def main:
agent = Agent(client=AzureChatClient, name="Demo", instructions="You are helpful.")
print(await agent.run("hi"))
asyncio.run(main)
PY
预期输出: 模型回复(依赖 provider 配置)
Uninstall
note: Idempotent pip uninstall; library form has no config directory / background process; project code references removed manually as needed.
pip uninstall -y agent-framework agent-framework-core agent-framework-ext 2>/dev/null || true
python3 -c "import importlib.util; print('残留: agent_framework 仍存在' if importlib.util.find_spec('agent_framework') else 'agent-framework removed: OK')"
预期输出: see command output
Facts
writes: user code only (library form, no config directory) | runtime: Python >= 3.10, pip | notes: requires LLM provider key at runtime; no background process
Source: agent-framework · validated 2026-08-31 · v1.16.0~1.16.0