Skip to main content
Simple Q&A agent that answers questions on demand.

Code

How It Works

Instructions
  • Defines agent as helpful research assistant
  • Provides clear, concise answers to questions
  • Admits when information is unknown
  • Maintains professional, helpful tone
Tools
  • ConversableAgent: Multi-agent conversation framework
  • UserProxy: Handles message forwarding without human input
  • Fresh agent instances per request prevent state leakage
Model
  • gpt-4o-mini: Cost-effective model for Q&A
  • Via OpenRouter API integration
  • Configurable through environment variables

Dependencies

Environment Setup

Create .env file:

Run

Examples:
  • “What are the main differences between AG2 and AutoGen?”
  • “How do I create a multi-agent conversation with AG2?”
  • “What are the key features of AG2 agents?”

Example API Calls

Frontend Setup

Open http://localhost:5173 and try to chat with the AG2 assistant