This usecase simulates a Shark Tank-style negotiation between a Pitcher (entrepreneur) and a **Panel of Sharks
** (
investors). It dynamically handles business pitches, investor responses, and deal-making negotiations based on
pre-defined evaluation criteria.
- Pitcher Introduction: The pitcher presents their startup, explaining the problem it solves, their sales, revenue, capital table, and the equity shares they are offering.
- Shark Panel Evaluation: The sharks ask probing questions and evaluate the pitch based on the pitcher’s projections, valuation, growth potential, and scalability.
- Negotiations: Sharks may make counter-offers or close a deal based on factors like:
- Revenue and scalability of the business.
- Equity asked vs. business valuation.
- The pitcher’s conviction and vision for scaling the business.
- Dynamic Data Input: The simulation can be run with dynamic data loaded from a JSON file or hardcoded values. Data
can be read from an
.envfile to dynamically set the path for the JSON. - Multiple Scenarios: Sharks may make different decisions based on the evaluation, with various negotiation outcomes (offers, counteroffers, or rejection).
This usecase demonstrates the process of simulating sequential interactions between AI agents to facilitate
customer
onboarding. It walks through the setup, creation of agents, tasks, and initiating the customer onboarding process.
Conversable Agent Setup: Multiple conversational agents are created using the ConversableAgent class from autogen.
- Onboarding Personal Information Agent: This agent interacts with the customer to gather their name and location. It is specifically configured to ask only for personal information, with termination occurring once the data is gathered.
- Onboarding Topic Preference Agent: This agent collects customer preferences related to news topics they are interested in.
- Customer Engagement Agent: This agent creates an engaging experience by suggesting fun content such as jokes, stories, or facts based on the customer's preferences.
Customer Proxy Agent: Acts as an intermediary, receiving messages from the agents and enabling the conversation flow with the customer.
This use case demonstrates the process of simulating sequential interactions between AI agents to create, review,
and refine content. It walks through the setup, creation of agents, tasks, and the orchestration of a collaborative
reflection process to improve content quality.
-
Conversable Agent Setup: Multiple conversational agents are created using the autogen.AssistantAgent class from the autogen library. These agents simulate a collaborative environment where different agents interact and provide feedback on a task.
-
Writer Agent: The Writer Agent is responsible for generating content based on the given task. In this use case, the task is to write a concise and engaging blog post. This agent is set up with the task description and a system message that guides it in creating polished content.
- Task: The Writer Agent is tasked with writing a blog post on a specific topic, keeping it concise and engaging, while adhering to a word limit.
-
Critic Agent: The Critic Agent reviews the content generated by the Writer Agent. It provides feedback aimed at improving the quality of the content, focusing on aspects like clarity, structure, and engagement.
- Nested Reviews: The Critic Agent orchestrates nested feedback from other specialized reviewers (SEO, Legal, Ethics, etc.), collecting and incorporating their feedback into the refinement process.
-
Reviewer Agents: Several specialized reviewers provide focused feedback on the content generated by the Writer Agent:
- SEO Reviewer: Reviews the content for search engine optimization (SEO), suggesting improvements to make the content more discoverable online.
- Legal Reviewer: Ensures the content is legally compliant and free from potential legal issues, providing concise suggestions for compliance.
- Ethics Reviewer: Assesses the ethical implications of the content, ensuring that it meets ethical standards and doesn't violate any guidelines.
Each of these reviewers provides feedback in a structured, concise format (within 3 bullet points) and begins their review by stating their role.
-
Meta Reviewer Agent: The Meta Reviewer Agent aggregates the feedback from all the specialized reviewers (SEO, Legal, Ethics) and provides a final, consolidated review. This agent ensures that all feedback is integrated, and a cohesive final suggestion is provided for the Writer Agent to refine the content further.
-
Reflection and Refinement Process: The core of this framework lies in the reflection process where agents engage in a collaborative review of the Writer Agent's work. The Critic Agent initiates nested interactions with the reviewers, gathers their feedback, and aggregates it. This feedback loop allows the Writer Agent to refine and enhance the content based on multiple perspectives.
- Reflection Message: The Critic Agent sends the content to each reviewer with a reflection message to elicit specific feedback.
-
Final Task Execution: After all feedback has been gathered and reviewed, the Writer Agent can refine the content based on the aggregated suggestions. The task is completed when the final version of the content is approved, and the feedback loop is closed.
This use case demonstrates the process of simulating sequential interactions between AI agents to facilitate a
game of chess. It walks through the setup, creation of agents, task orchestration, and initiating a collaborative chess
game between two AI-powered players.
- Conversable Agent Setup : Multiple conversational agents are created using the
ConversableAgentclass from theautogenlibrary. These agents simulate a collaborative environment where different agents interact with the chess game and each other. - Chess Game Management : The game is managed by the
ChessGameclass, which is responsible for tracking the state of the chessboard, generating legal moves, and processing moves made by the players.
The Player White agent represents one of the two players in the game. It is programmed to:
- Call
get_legal_moves()to obtain a list of legal moves. - Call
make_move(move)to make a move on the chessboard. This agent is tasked with initiating the game and making the first move.
The Player Black agent represents the second player in the game. Similar to the white player, it:
- Calls
get_legal_moves()to obtain legal moves. - Calls
make_move(move)to make a move after the white player’s turn.
The Board Proxy agent acts as an intermediary, ensuring that the players interact with the game state. It checks if a move has been made and facilitates the conversation between players by issuing auto-replies and terminating interactions when needed.
Tools such as get_legal_moves() and make_move() are registered with the players and the board proxy using the
register_function method. These tools allow the agents to interact with the chessboard and manage the game flow.
Nested chats between the Player White and Player Black agents are registered, enabling them to interact based on the state of the chessboard. The agents send and receive messages in turn, orchestrated by the board proxy to ensure the game progresses sequentially.
The game is initiated by the Player Black agent, who sends a message to Player White, signaling the start of the game. The agents then take turns making moves, with each move being validated and displayed on the chessboard.
- ChessGame Class: Manages the chessboard and the moves. It tracks the state of the game, generates legal moves, and processes the players' moves.
- ChessPlayerAgent Class: Represents a player in the game (either white or black). These agents are configured with a system message and LLM configuration to guide their behavior.
- BoardProxyAgent Class: Acts as a proxy to manage interactions with the game state and ensures the conversation flow between agents.
- ChessGameOrchestrator Class: The orchestrator that sets up the agents, registers tools, and manages the sequence of interactions in the game.