Skip to content

A programming framework for agentic AI

Add module level docstrings (#4652)

gagb34b997769ec7
diff --git a/python/packages/autogen-agentchat/src/autogen_agentchat/__init__.py b/python/packages/autogen-agentchat/src/autogen_agentchat/__init__.py
index 8a56318cc..c5bdfc2b5 100644
--- a/python/packages/autogen-agentchat/src/autogen_agentchat/__init__.py
+++ b/python/packages/autogen-agentchat/src/autogen_agentchat/__init__.py
@@ -1,3 +1,8 @@
+"""
+This module provides the main entry point for the autogen_agentchat package.
+It includes logger names for trace and event logs, and retrieves the package version.
+"""
+
import importlib.metadata
TRACE_LOGGER_NAME = "autogen_agentchat"
diff --git a/python/packages/autogen-agentchat/src/autogen_agentchat/agents/__init__.py b/python/packages/autogen-agentchat/src/autogen_agentchat/agents/__init__.py
index 219cb1af5..855e66ae8 100644
--- a/python/packages/autogen-agentchat/src/autogen_agentchat/agents/__init__.py
+++ b/python/packages/autogen-agentchat/src/autogen_agentchat/agents/__init__.py
@@ -1,3 +1,8 @@
+"""
+This module initializes various pre-defined agents provided by the package.
+BaseChatAgent is the base class for all agents in AgentChat.
+"""
+
from ._assistant_agent import AssistantAgent, Handoff # type: ignore
from ._base_chat_agent import BaseChatAgent
from ._code_executor_agent import CodeExecutorAgent
diff --git a/python/packages/autogen-agentchat/src/autogen_agentchat/conditions/__init__.py b/python/packages/autogen-agentchat/src/autogen_agentchat/conditions/__init__.py
index cc8e5e831..ddf909fd7 100644
--- a/python/packages/autogen-agentchat/src/autogen_agentchat/conditions/__init__.py
+++ b/python/packages/autogen-agentchat/src/autogen_agentchat/conditions/__init__.py
@@ -1,3 +1,8 @@
+"""
+This module provides various termination conditions for controlling the behavior of
+multi-agent teams.
+"""
+
from ._terminations import (
ExternalTermination,
HandoffTermination,
diff --git a/python/packages/autogen-agentchat/src/autogen_agentchat/messages.py b/python/packages/autogen-agentchat/src/autogen_agentchat/messages.py
index b7790cf7f..fddd6bea5 100644
--- a/python/packages/autogen-agentchat/src/autogen_agentchat/messages.py
+++ b/python/packages/autogen-agentchat/src/autogen_agentchat/messages.py
@@ -1,3 +1,9 @@
+"""
+This module defines various message types used for agent-to-agent communication.
+Each message type inherits from the BaseMessage class and includes specific fields
+relevant to the type of message being sent.
+"""
+
from typing import List, Literal
from autogen_core import FunctionCall, Image
diff --git a/python/packages/autogen-agentchat/src/autogen_agentchat/teams/__init__.py b/python/packages/autogen-agentchat/src/autogen_agentchat/teams/__init__.py
index 5d41c9211..e44628edc 100644
--- a/python/packages/autogen-agentchat/src/autogen_agentchat/teams/__init__.py
+++ b/python/packages/autogen-agentchat/src/autogen_agentchat/teams/__init__.py
@@ -1,3 +1,8 @@
+"""
+This module provides implementation of various pre-defined multi-agent teams.
+Each team inherits from the BaseGroupChat class.
+"""
+
from ._group_chat._base_group_chat import BaseGroupChat
from ._group_chat._magentic_one import MagenticOneGroupChat
from ._group_chat._round_robin_group_chat import RoundRobinGroupChat
diff --git a/python/packages/autogen-agentchat/src/autogen_agentchat/ui/__init__.py b/python/packages/autogen-agentchat/src/autogen_agentchat/ui/__init__.py
index d668e02c5..65c4f1e07 100644
--- a/python/packages/autogen-agentchat/src/autogen_agentchat/ui/__init__.py
+++ b/python/packages/autogen-agentchat/src/autogen_agentchat/ui/__init__.py
@@ -1,3 +1,7 @@
+"""
+This module implements utility classes for formatting/printing agent messages.
+"""
+
from ._console import Console
__all__ = ["Console"]