mirror of
https://github.com/magnus919/agent-skills.git
synced 2026-09-16 05:56:30 +03:00
Greenfield SkillOpt: 3 epochs for Microsoft AutoGen skill. Conversational agent model, GroupChat patterns, code execution, nested chats, cancellation tokens, MCP integration. All API surfaces validated against microsoft.github.io/autogen docs.
968 B
968 B
AutoGen Tool Integration
register_function
Bind Python functions as agent tools:
def search_web(query: str) -> str:
"""Search the web for information."""
return f"Results for: {query}"
assistant.register_function(function_map={"search_web": search_web})
MCP Tool Integration
Connect MCP servers as agent tools:
from autogen_ext.tools.mcp import McpWorkbench, StdioServerParams
server_params = StdioServerParams(command="npx", args=["@playwright/mcp@latest"])
async with McpWorkbench(server_params) as mcp:
agent = AssistantAgent(
"web_browsing_assistant",
model_client=model_client,
workbench=mcp,
)
Key Guidelines
- Tool functions need clear docstrings (become tool descriptions)
- Tools should handle errors gracefully and return strings
- For complex integrations, wrap external APIs with error handling
- MCP tools enable browser automation, databases, and external services