
Ag2 Imports
- 1 installs
- 4 repo stars
- Updated April 1, 2026
- ag2ai/resource-hub
ag2-imports is a Claude Code skill that documents the correct import paths and module structure for the AG2 framework.
About
This skill documents the correct import paths and module structure for the AG2 framework. It clarifies that the package is ag2 (not autogen) and shows how to import core agents (AssistantAgent, UserProxyAgent, ConversableAgent), LLMConfig, group-chat helpers (run_group_chat, DefaultPattern, AutoPattern, RoundRobinPattern), and the @tool decorator. A developer uses it to avoid common import mistakes such as import autogen or using GroupChat/config_list dicts.
- Correct import paths and module structure for the AG2 framework
- The package is ag2, not autogen; all imports use the ag2 namespace
- Documents core agents, LLMConfig, group-chat patterns, tools, and common import mistakes
Ag2 Imports by the numbers
- 1 all-time installs (skills.sh)
- Ranked #14,102 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
ag2-imports capabilities & compatibility
Free; a reference skill with no runtime API key requirement.
- Capabilities
- import reference · framework migration
- Use cases
- documentation
- Pricing
- Free
What ag2-imports says it does
The package name is `ag2`, not `autogen`. All imports use the `ag2` namespace.
Do NOT use `import autogen` -- the package was renamed to `ag2`.
npx skills add https://github.com/ag2ai/resource-hub --skill ag2-importsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| repo stars | ★ 4 |
| Last updated | April 1, 2026 |
| Repository | ag2ai/resource-hub ↗ |
What it does
Look up the correct ag2 import paths for agents, LLMConfig, group-chat patterns, and tools.
Who is it for?
Developers writing AG2 code who need the correct ag2 import paths and want to avoid autogen-era mistakes.
Skip if: Runtime agent design or non-import questions.
When should I use this skill?
The user is writing AG2 code and needs correct import statements or hits import errors.
What you get
Code uses the correct ag2 namespace imports and patterns like LLMConfig and run_group_chat.
- correct ag2 import statements
By the numbers
- 3 common import mistakes listed
Files
AG2 Imports
The package name is ag2, not autogen. All imports use the ag2 namespace.
Core Agents
from ag2.agentchat import AssistantAgent, UserProxyAgent, ConversableAgentAssistantAgent-- LLM-powered agent that generates replies.UserProxyAgent-- Proxy for human input; can also execute code.ConversableAgent-- Base class for all conversable agents.
LLM Configuration
from ag2 import LLMConfigUse LLMConfig as a context manager to bind a model configuration to agents created within its scope:
with LLMConfig(api_type="openai", model="gpt-4o"):
agent = AssistantAgent(name="assistant")Group Chat
from ag2.agentchat.group import run_group_chat
from ag2.agentchat.group import DefaultPattern, AutoPattern, RoundRobinPatternrun_group_chat-- Orchestrates a multi-agent conversation.DefaultPattern-- LLM-based speaker selection with optional handoffs.AutoPattern-- Automatic orchestration; the LLM decides flow.RoundRobinPattern-- Agents speak in fixed round-robin order.
Tools
from ag2.tools import toolThe @tool decorator converts a plain function into a tool that agents can call.
Nested Chats and Advanced Patterns
from ag2.agentchat import initiate_chats # Sequential multi-conversation
from ag2.agentchat import register_hand_off # Handoff registration
from ag2.agentchat.group import Handoff # Explicit handoff targetCommon Mistakes
- Do NOT use
import autogen-- the package was renamed toag2. - Do NOT import
GroupChatorGroupChatManager-- userun_group_chatwith a pattern instead. - Do NOT use
config_listdicts -- useLLMConfigobjects.
Related skills
FAQ
Is the package called autogen or ag2?
The package name is ag2, not autogen; all imports use the ag2 namespace, so do not use import autogen.
How do I set up group chat in AG2?
Import run_group_chat and a pattern (DefaultPattern, AutoPattern, or RoundRobinPattern) from ag2.agentchat.group; do not import GroupChat or GroupChatManager.