Install & Compatibility
Where this runs
tested against v0.7.5 · 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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.830s · 50.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.7s · import 0.576s · 51MB
43MB installed
● package 43MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Agent
✓ from autogen_core import Agent
✗ from autogen.agentchat import ConversableAgent
AgentRuntime
✓ from autogen_core import AgentRuntime
✗ from autogen.agentchat import ConversableAgent
BaseAgent
✓ from autogen_core import BaseAgent
✗ from autogen.agentchat import ConversableAgent
This quickstart demonstrates a basic conversation between two `ConversableAgent` instances using `autogen-core`. Agents are configured with an LLM (e.g., OpenAI) and communicate asynchronously. Ensure the `OPENAI_API_KEY` environment variable is set for the LLM configuration to be valid.
import os
import asyncio
from autogen.agentchat import ConversableAgent
# Configure LLM (e.g., OpenAI API Key)
# For a runnable example, ensure OPENAI_API_KEY is set in your environment
llm_config = {
"config_list": [
{
"model": "gpt-4o-mini", # Or "gpt-4", "gpt-3.5-turbo"
"api_key": os.environ.get("OPENAI_API_KEY", "")
}
],
"temperature": 0.7
}
# Create two agents
agent_a = ConversableAgent(
name="AgentA",
system_message="You are a helpful AI assistant. You can chat and respond to queries.",
llm_config=llm_config,
is_termination_msg=lambda msg: "terminate" in msg["content"].lower(),
human_input_mode="NEVER",
max_consecutive_auto_reply=3
)
agent_b = ConversableAgent(
name="AgentB",
system_message="You are an expert in explaining complex concepts clearly.",
llm_config=llm_config,
is_termination_msg=lambda msg: "terminate" in msg["content"].lower(),
human_input_mode="NEVER",
max_consecutive_auto_reply=3
)
async def run_chat():
print("\n--- Initiating chat between AgentA and AgentB ---")
chat_result = await agent_a.initiate_chat(
agent_b,
message="Explain the concept of quantum entanglement in simple terms."
)
print("\n--- Chat Summary ---")
# print(chat_result.chat_history) # Uncomment to see full history
if __name__ == "__main__":
# Ensure the API key is present for the example to work
if not os.environ.get("OPENAI_API_KEY"):
print("Warning: OPENAI_API_KEY environment variable not set. LLM calls may fail or raise errors.")
print("Please set it for the quickstart to fully function.")
asyncio.run(run_chat())
Debug
Known issues
gotchaThe `autogen-core` library provides the `autogen.agentchat` module. For most users building multi-agent applications, installing the broader `autogen` package (`pip install autogen`) is recommended as it includes `autogen-core` along with additional high-level agents, tools, and features. Installing `autogen-core` alone only provides the foundational agent chat capabilities.fixConsider `pip install autogen` if you need the full AutoGen ecosystem beyond just the core agent communication primitives.
affects: All versions
gotchaDespite being named `autogen-core`, its modules are exposed under the `autogen` namespace, specifically `autogen.agentchat`. For example, `ConversableAgent` is imported via `from autogen.agentchat import ConversableAgent`, not `from autogen_core.agentchat import ConversableAgent`.fixAlways use `from autogen.agentchat import ...` or `from autogen.agentchat.groupchat import ...` for core agent components.
affects: All versions
gotchaMany core functionalities and examples for `autogen-core` agents implicitly rely on Language Model (LLM) providers (e.g., OpenAI, Azure OpenAI). Ensure `llm_config` is correctly set, typically requiring an API key like `OPENAI_API_KEY` to be configured in your environment variables for the LLM client to authenticate.fixSet required API keys (e.g., `export OPENAI_API_KEY='your-key'`) in your environment or provide them explicitly in `llm_config` within your code.
affects: All versions
breakingThe AutoGen ecosystem is under active and rapid development. While efforts are made to maintain backward compatibility for `autogen-core`, internal API structures and even module placements (e.g., `GroupChat` moving to a submodule) can change between minor versions. This can lead to unexpected import errors or behavior changes.fixPin your `autogen-core` version to a specific minor release (`autogen-core==0.7.x`) and regularly consult the official changelog and migration guides when upgrading. Test thoroughly after updates.
affects: All versions (especially pre-1.0)
Upgrade
Version history
0.7.5latest on PyPI · released Sep 30, 2025
Audit
Dependencies
pythonrequiredRequires Python 3.10 or higher.