Openai Agents Orchestrator
agentsllmsLlamaIndexarize-phoenixopenaitutorialsevalsllmopsai-monitoringaiengineeringprompt-engineeringdatasetsllm-evalai-observabilityllm-evaluationsmolagentsanthropiclangchain
Export
OpenAI agent pattern: orchestrator and workers
A starter guide for building an agent loop using the openai-agents library.
This pattern uses orchestators and workers. The orchestrator chooses which worker to use for a specific sub-task. The worker attempts to complete the sub-task and return a result. The orchestrator then uses the result to choose the next worker to use until a final result is returned.
In the following example, we'll build an agent which creates a portfolio of stocks and ETFs based on a user's investment strategy.
- Orchestrator: Chooses which worker to use based on the user's investment strategy.
- Research Agent: Searches the web for information about stocks and ETFs that could support the user's investment strategy.
- Evaluation Agent: Evaluates the research report and provides feedback on what data is missing.
- Portfolio Agent: Creates a portfolio of stocks and ETFs based on the research report.
Install Libraries
[ ]
Setup Keys
Add your OpenAI API key to the environment variable OPENAI_API_KEY.
Copy your Phoenix API_KEY from your settings page at app.phoenix.arize.com.
[ ]
Setup Tracing
[ ]
Creating the agents
[ ]
[ ]