Demonstrates advanced orchestration patterns where agents are used as tools by other agents.
Sign in to save downloads to your library and vote.
Preview
Agents as Tools
Demonstrates advanced orchestration patterns where agents are used as tools by other agents.
๐ฏ What This Demonstrates
- Agent.as_tool(): Converting agents to tools for orchestration
- Custom Agent Tools: Using
@function_toolwithRunner.run() - Multi-Agent Workflows: Coordinating multiple specialized agents
- Custom Configuration: Per-agent settings like max_turns and run_config
๐ Quick Start
-
Install OpenAI Agents SDK:
pip install openai-agents -
Set up environment:
cp ../env.example .env # Edit .env and add your OpenAI API key -
Run basic orchestration:
from agents import Runner from agent import root_agent result = Runner.run_sync(root_agent, "Say 'Hello, how are you?' in Spanish.") print(result.final_output) -
Try advanced orchestration:
from advanced_agent import advanced_orchestrator result = Runner.run_sync(advanced_orchestrator, "Research the benefits of AI in healthcare.") print(result.final_output)
๐ก Key Concepts
Basic Agent Tools (agent.py)
- Agent.as_tool(): Simple agent-to-tool conversion
- Translation Orchestration: Multiple language agents coordinated
- Tool Naming: Custom tool names and descriptions
Advanced Agent Tools (advanced_agent.py)
- @function_tool with Runner.run(): Custom agent tool implementations
- Custom Configuration: Per-run settings (max_turns, temperature)
- Research-Writing Pipeline: Complex multi-stage workflows
๐งช Available Patterns
Basic Orchestration
- Spanish translation agent
- French translation agent
- Orchestrator coordinates language tasks
Advanced Orchestration
- Research agent for information gathering
- Writing agent for content creation
- Custom tool functions with Runner configuration
๐ Next Steps
- Function Tools - Custom function tools
- Built-in Tools - SDK provided tools
- Tutorial 4: Running Agents - Advanced execution patterns
Ingestion metadata
- Source catalog
- awesome-llm-apps
- Repository
- Shubhamsaboo/awesome-llm-apps ยท main
- File path
- ai_agent_framework_crash_course/openai_sdk_crash_course/3_tool_using_agent/3_3_agents_as_tools/README.md
- Last refreshed
- 7/23/2026, 8:42:18 PM (6h ago)
- Refresh schedule
- Daily ยท 03:00 UTC
- Dedupe status
- Unique ยท deduped by (source, url)