Registry / llm-agents / pyautogen

pyautogen

JSON →
library0.10.0pypiunverified

AutoGen is a framework that allows for the development of LLM applications using multiple agents that can converse with each other to solve tasks. The `pyautogen` PyPI package (current version 0.10.0) acts as a proxy, primarily installing `autogen-agentchat` to provide the core multi-agent conversation capabilities. It has a relatively rapid release cadence, with minor versions often released monthly or more frequently, introducing new features and breaking changes.

pip install pyautogen
INSTALL
IMPORT
SIG · PYAUTOGEN
P
pyautogen
llm-agentsenv0.10.0
Install
5.0s avg
Import
1738ms
Disk
50MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.10.0 · 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
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.364s · 51.9MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 5.0s · import 0.331s · 52MB
50MB installed
● package 50MB
Code
Verified usage

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

UserProxyAgent
from autogen import UserProxyAgent
from pyautogen import UserProxyAgent
`pyautogen` is the PyPI package, but the actual modules are under the `autogen` namespace.
AssistantAgent
from autogen import AssistantAgent
from pyautogen import AssistantAgent
`pyautogen` is the PyPI package, but the actual modules are under the `autogen` namespace.
config_list_from_json
from autogen import config_list_from_json
GroupChat
from autogen.groupchat import GroupChat
GroupChatManager
from autogen.groupchat import GroupChatManager

This quickstart demonstrates setting up two basic agents: an `AssistantAgent` powered by GPT-4o and a `UserProxyAgent` to initiate the conversation and manage execution. It shows how to configure LLM settings using an environment variable for API keys and sets up basic code execution and termination conditions. Remember to set the `OPENAI_API_KEY` environment variable.

import autogen import os # Configure API key from environment variable or direct config_list config_list = [ { "model": "gpt-4o", "api_key": os.environ.get("OPENAI_API_KEY", None) } ] # Define agents assistant = autogen.AssistantAgent( name="Assistant", llm_config={ "config_list": config_list, "temperature": 0.7 } ) user_proxy = autogen.UserProxyAgent( name="UserProxy", human_input_mode="NEVER", # Set to "ALWAYS" or "TERMINATE" for human interaction max_consecutive_auto_reply=10, is_termination_msg=lambda x: x.get("content", "").rstrip().endswith("TERMINATE"), code_execution_config={ "work_dir": "coding", # Create a 'coding' directory for code execution "use_docker": False # Set to True to use Docker for safer execution } ) # Start a chat user_proxy.initiate_chat( assistant, message="What is the capital of France?" )
Debug
Known issues
gotchaThe PyPI package is `pyautogen`, but the modules are imported from the `autogen` namespace (e.g., `import autogen`). Importing from `pyautogen` will fail.
fix
Always use `import autogen` and `from autogen import ...` for all modules and classes.
affects: All versions
breakingThe structure of `llm_config` and `config_list` has changed multiple times between minor versions (e.g., 0.1.x, 0.2.x, 0.6.x, 0.9.x). Ensure your configuration matches the exact version's documentation.
fix
Consult the official AutoGen documentation or GitHub README for the specific version you are using to verify the `llm_config` and `config_list` format.
affects: Frequent changes across 0.x.x versions
breakingThe `autogen.oai.Completion` module and related utilities for direct OpenAI API calls were moved or refactored. In newer versions, the primary way to interact with models is through agent `llm_config`.
fix
Prefer configuring models via the `llm_config` dictionary when initializing agents. Avoid using `autogen.oai.Completion` directly unless specifically following an advanced pattern in recent documentation.
affects: Pre-0.2.x to Post-0.2.x, and later refactors
gotcha`UserProxyAgent`'s `human_input_mode` defaults to `ALWAYS` or `TERMINATE` depending on the version, which can pause execution indefinitely waiting for user input. For fully autonomous execution, set `human_input_mode="NEVER"`.
fix
Explicitly set `human_input_mode="NEVER"` (for no human input), `"TERMINATE"` (for human input only at termination), or `"ALWAYS"` (for human input at every turn) during `UserProxyAgent` initialization.
affects: All versions
gotchaAPI key management requires a `config_list` where models and keys are defined. While environment variables (e.g., `OPENAI_API_KEY`) are common, they must still be referenced correctly within `config_list` or an `OAI_CONFIG_LIST` JSON file.
fix
Ensure `config_list` explicitly includes `api_key` values, either directly or by referencing environment variables (`os.environ.get("KEY")`) or by ensuring `OAI_CONFIG_LIST` file is correctly formatted and discoverable.
affects: All versions
Upgrade
Version history
0.10.0latest on PyPI · released Jul 15, 2025
Audit
Dependencies
autogen-agentchatrequiredCore multi-agent conversation library. `pyautogen` is a proxy package installing this.
Agent activity
21 hits · last 30 days
node
18
OpenAI (training)
1
Resources
pyautogen — pip install pyautogen · libregistry