agent-framework-ep
Microsoft Agent Framework extensions for mainstream open-source LLMs, including structured output support for GLM, Kimi, Qwen, and DeepSeek, along with reasoning_content support. Plus a local containerized code interpreter environment. 'ep' stands for enterprise-level applications.
Features
-
OpenAI-like Client Extensions (
openai_like)- Structured output parsing with JSON fallback (dirtyjson, json-repair)
- Reasoning content support for DeepSeek-R1 style models
- Uses Chat Completions API, compatible with domestic LLMs (DeepSeek, Kimi, Qwen)
- Requires:
agent-framework>=1.0.0rc6andagent-framework-openai>=1.0.0rc6
-
Code Executor (
code_executor)- Docker-based code execution environment
- Supports Python, bash, and shell scripts
- Timeout and cancellation support
- Isolated execution for security
-
Dynamic Skills Provider (
skills_provider)- Async skill updates before each agent run
- Extendable skills from external sources
Installation
pip install agent-framework-ep
Or with uv:
uv add agent-framework-ep
Prerequisites
- Python 3.12+
- Docker (for code execution features)
Quick Start
OpenAI-like Client with Structured Output
from pydantic import BaseModel
from agent_framework import Agent
from agent_framework_ep import OpenAILikeChatClient
class Response(BaseModel):
answer: str
confidence: float
# Create client with structured output support
client = OpenAILikeChatClient(
model="deepseek-chat",
api_key="your-api-key"
)
# Use with Agent framework
agent = Agent(client=client)
response = await agent.run(
"What is the capital of France?",
response_format=Response
)
print(response) # Parsed Response object
Code Execution
import asyncio
import os
from agent_framework_ep import DockerCommandLineCodeExecutor
from agent_framework_ep import OpenAILikeChatClient, CodeExecutionTool
chat_client = OpenAILikeChatClient(
model_id="kimi/kimi-k2.5",
)
code_executor = DockerCommandLineCodeExecutor(
image="python-code-sandbox",
work_dir="some_of_your_working_directory",
delete_tmp_files=True,
environment={
"TAVILY_API_KEY": os.environ.get("TAVILY_API_KEY"),
}
)
code_tool = CodeExecutionTool(code_executor).execute_code
agent = chat_client.as_agent(
name="SkillsAssistant",
instructions="You're a helpful assistant.",
tools=[code_tool],
)
Dynamic Skills Provider
from agent_framework_ep import UpdatableSkillsProvider
from agent_framework import Skill
async def fetch_dynamic_skills():
# Fetch skills from external source
return [
Skill(name="web-search", description="Search the web", content="..."),
]
provider = UpdatableSkillsProvider(
skill_paths="./skills",
skills_updater=fetch_dynamic_skills
)
Development
# Clone the repository
git clone https://github.com/qianpeng/agent-framework-ep.git
cd agent-framework-ep
# Install dependencies
uv sync
# Run tests
uv run pytest
# Run tests with Docker (requires Docker)
uv run pytest -m docker
# Lint and format
uv run ruff check --fix .
uv run ruff format .
# Type check
uv run mypy src/agent_framework_ep
License
MIT License - see LICENSE for details.
Release files for agent-framework-ep 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agent_framework_ep-0.2.0.tar.gz | 74.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agent_framework_ep-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 103.3 kB
Release files / agent_framework_ep-0.2.0.tar.gz
| Download URL | agent_framework_ep-0.2.0.tar.gz |
|---|---|
| Size | 74.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df87ba482792e321a28e0e3b107b02c9c1aac396245850aad07b8f0422c85e1f
|
|
BLAKE2b-256 checksum How to use checksums |
f0d59b3c1d268e7bd48d8fd309055db71c4e010ca0c36f78bd01d7fab158d35f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 1, 2026.
Transparency logRelease files / agent_framework_ep-0.2.0-py3-none-any.whl
| Download URL | agent_framework_ep-0.2.0-py3-none-any.whl |
|---|---|
| Size | 28.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6e067fb5efc1702efba4d465badfbd0a44a4b3f7a0b39abbb5ffd894e47558d
|
|
BLAKE2b-256 checksum How to use checksums |
9de7dd01070b41a09a007cf38a8e89fbb92198546c874da635509a22cba706f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 1, 2026.
Transparency log