Skip to content

Examples

Explore these examples to understand how to use YosrAI in different scenarios. Each example demonstrates key features and patterns for building AI agents.

Single Agent Action

Learn more →

A simple example showing how to create and use a basic agent. Perfect for getting started with YosrAI.

---
title: Single Agent Action
---
graph LR
START((Start)) --> single_agent[Single Agent]
single_agent(Single Agent) --> END((End))

Teacher and Student

Learn more →

An educational example demonstrating how to create an interactive teaching assistant that can adapt content and provide feedback.

---
title: Teacher and Student
---
graph LR
START((Start)) --> teacher_agent[Teacher Agent]
teacher_agent(Teacher Agent) --> student_agent(Student Agent)
student_agent(Student Agent) --> END((End))

Assistant with Tools

Learn more →

Learn how to create an agent that can use external tools and functions to enhance its capabilities.

---
title: Assistant with tools
---
graph LR
START((Start)) --> assistant_agent[Assistant Agent]
assistant_agent(Assistant Agent) --> END((End))
assistant_agent(Assistant Agent) --> TOOLS{Tools}
TOOLS{Tools} --> assistant_agent[Assistant Agent]

Chat and Summarize

Learn more →

Create sophisticated chat agents that can engage in natural conversations and provide summaries.

---
title: Chat and Summarize
---
graph LR
START((Start)) --> chat_agent[Chat Agent]
chat_agent(Chat Agent) --> summary_agent(Summary Agent)
summary_agent(Summary Agent) --> END((End))

Two Players Debate

Learn more →

Build a multi-agent debate system with player selection, moderation, and judging capabilities.

---
title: Two Players Debate
---
graph LR
START((Start)) --> selection_agent[Selection Agent]
selection_agent(Selection Agent) --> greeting_agent(Greeting Agent)
greeting_agent(Greeting Agent) --> player_one_agent(Player One Agent)
player_one_agent(Player One Agent) --> player_two_agent(Player Two Agent)
player_one_agent(Player One Agent) --> judge_agent(Judge Agent)
player_two_agent(Player Two Agent) --> player_one_agent(Player One Agent)
player_two_agent(Player Two Agent) --> judge_agent(Judge Agent)
judge_agent(Judge Agent) --> END((End))

Social Media Post

Learn more →

Create a sophisticated social media content creation and management system.

---
title: Social Media Post
---
graph LR
START((Start)) --> greeting_agent[Greeting Agent]
greeting_agent(Greeting Agent) --> editor_agent(Editor Agent)
editor_agent(Editor Agent) --> twitter_writer_agent(Twitter Writer Agent)
editor_agent(Editor Agent) --> linkedin_writer_agent(LinkedIn Writer Agent)
twitter_writer_agent(Twitter Writer Agent) --> twitter_review_agent(Twitter Review Agent)
twitter_writer_agent(Twitter Writer Agent) --> END((End))
linkedin_writer_agent(LinkedIn Writer Agent) --> linkedin_review_agent(LinkedIn Review Agent)
linkedin_writer_agent(LinkedIn Writer Agent) --> END((End))
twitter_review_agent(Twitter Review Agent) --> twitter_writer_agent(Twitter Writer Agent)
linkedin_review_agent(LinkedIn Review Agent) --> linkedin_writer_agent(LinkedIn Writer Agent)

Each example includes: - Complete implementation code - Workflow visualization - Key components explanation - Example interactions - Best practices - Use cases - Next steps