### Setup RealtimeRunner Python Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/11_voice/realtime/README.md Configures and instantiates a RealtimeRunner with a starting agent and specific model settings, including voice and supported modalities for real-time communication. ```python from agents.realtime import RealtimeRunner runner = RealtimeRunner( starting_agent=agent, config={ "model_settings": { "model_name": "gpt-4o-realtime-preview", "voice": "alloy", "modalities": ["text", "audio"] } } ) ``` -------------------------------- ### Clone Repository and Install Dependencies (Bash) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/rag_tutorials/agentic_rag_with_reasoning/README.md Instructions for cloning the project repository and installing necessary Python dependencies using pip. This is a standard setup process for Python projects. ```bash git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git cd rag_tutorials/agentic_rag_with_reasoning pip install -r requirements.txt ``` -------------------------------- ### Run Static Voice Agent Example Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/11_voice/README.md Executes the static voice agent example. This is the recommended starting point for beginners to understand basic voice interaction. ```bash cd static/ python agent.py ``` -------------------------------- ### Setup Environment Bash Script Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/starter_ai_agents/ai_data_analysis_agent/README.md This snippet provides bash commands to clone the project repository, navigate into the agent's directory, and install project dependencies using pip. Ensure you have Git and Python installed. ```bash # Clone the repository git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git cd awesome-llm-apps/starter_ai_agents/ai_data_analysis_agent # Install dependencies pip install -r requirements.txt ``` -------------------------------- ### Install Beifong Dependencies and Demo Content (Bash) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/advanced_ai_agents/multi_agent_apps/ai_news_and_podcast_agents/readme.md This snippet outlines the steps to clone the Beifong repository, set up a Python virtual environment, install necessary dependencies, and install browser automation tools. It also includes an optional step to download demo content for initial setup. ```bash git clone https://github.com/arun477/beifong.git cd beifong python -m venv venv source venv/bin/activate pip install -r requirements.txt python -m playwright install cd beifong python bootstrap_demo.py ``` -------------------------------- ### Run ADK Web Server Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/google_adk_crash_course/4_tool_using_agent/4_4_mcp_tools/README.md Starts the ADK Web server from the root tutorials directory to run the examples. This is the primary command for executing the provided LLM applications. ```bash # From the root tutorials directory adk web ``` -------------------------------- ### Install Dependencies and Run Quickstart (Cloud SDK) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/starter_ai_agents/web_scrapping_ai_agent/README.md Installs project dependencies for the Cloud SDK version and sets the ScrapeGraph AI API key. It then runs the quickstart script to demonstrate the cloud-based scraping functionality. ```bash cd scrapegraph_ai_sdk/ pip install -r requirements.txt export SGAI_API_KEY='your-api-key' python quickstart.py ``` -------------------------------- ### Environment Setup with OpenAI API Key (Bash) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/README.md This snippet shows how to set up your environment variables by creating a .env file and adding your OpenAI API key. Ensure this file is placed in each tutorial directory for the application to authenticate with the OpenAI API. The API key is essential for running any of the provided examples. ```bash OPENAI_API_KEY=sk-your_openai_key_here ``` -------------------------------- ### Start Beifong Application Services (Bash) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/advanced_ai_agents/multi_agent_apps/ai_news_and_podcast_agents/readme.md This snippet details how to activate the virtual environment and start the Beifong application. It emphasizes starting the main Python script first, especially for initial database setup, and activating the virtual environment in all terminals before launching services. ```bash source venv/bin/activate python main.py ``` -------------------------------- ### Bash Commands for Project Setup Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/google_adk_crash_course/5_memory_agent/5_2_persistent_conversation_agent/README.md These bash commands outline the steps to set up the project environment. It includes installing Python dependencies using pip and creating a .env file to store the Google API key, which is essential for running the application. ```bash pip install -r requirements.txt ``` ```bash # Create a .env file with your Google AI API key echo "GOOGLE_API_KEY=your_api_key_here" > .env ``` ```bash # Start the Streamlit app streamlit run app.py ``` -------------------------------- ### Install and Run Chatbot Application Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/advanced_llm_apps/chat_with_X_tutorials/streaming_ai_chatbot/README.md Instructions to clone the repository, install Node.js dependencies, and start the development server for the AI chatbot application. ```bash git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git cd advanced_llm_apps/chat_with_X_tutorials/chat_with_llms npm install npm run dev ``` -------------------------------- ### Clone Repository and Install Dependencies (Bash) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/advanced_ai_agents/multi_agent_apps/ai_aqi_analysis_agent/README.md Instructions to clone the project repository and install its Python dependencies using pip. This is a standard setup step for Python projects. ```bash git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git cd ai_agent_tutorials/ai_aqi_analysis_agent pip install -r requirements.txt ``` -------------------------------- ### Start Beifong Frontend Development Server (Node.js) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/advanced_ai_agents/multi_agent_apps/ai_news_and_podcast_agents/readme.md Steps to set up and run the Beifong frontend in development mode. This involves navigating to the web directory, installing Node.js dependencies, and starting the development server. Requires Node.js and npm. ```bash cd web npm install npm start ``` -------------------------------- ### Start Beifong Backend Services (Python) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/advanced_ai_agents/multi_agent_apps/ai_news_and_podcast_agents/readme.md Commands to start the main backend, scheduler, and chat workers for the Beifong application. The first run of the main backend may take a few minutes for setup. Requires Python and Redis. ```bash cd beifong python main.py ``` ```bash cd beifong python -m scheduler ``` ```bash cd beifong python -m celery_worker ``` ```bash redis-cli ping ``` -------------------------------- ### Setup and Run Multimodal AI Design Agent Team Application Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/advanced_ai_agents/multi_agent_apps/agent_teams/multimodal_design_agent_team/README.md Instructions for setting up the development environment, installing dependencies, obtaining an API key, and running the Streamlit application. This includes cloning the repository, creating a virtual environment, installing requirements, and executing the main Python script. ```bash # Clone the repository git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git cd advanced_ai_agents/multi_agent_apps/agent_teams/multimodal_design_agent_team # Create and activate virtual environment (optional) python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt # Run the Application streamlit run design_agent_team.py ``` -------------------------------- ### Filesystem Agent Example - Python Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/google_adk_crash_course/4_tool_using_agent/4_4_mcp_tools/README.md Connects to a filesystem MCP server using StdioServerParameters and demonstrates how to interact with the filesystem using agent commands. Requires the '@modelcontextprotocol/server-filesystem' package. ```python # Connect to filesystem MCP server toolset = MCPToolset( connection_params=StdioServerParameters( command='npx', args=['-y', '@modelcontextprotocol/server-filesystem', '/path/to/folder'] ) ) # Ask agent to use filesystem tools # "List files in the current directory" # "Read the contents of sample.txt" ``` -------------------------------- ### Run Context Example Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/5_context_management/README.md Executes a Python asynchronous example demonstrating context management. It requires the asyncio library. ```python import asyncio from agent import context_example # Test context management asyncio.run(context_example()) ``` -------------------------------- ### Clone Repository and Setup Environment Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/starter_ai_agents/ai_startup_trend_analysis_agent/README.md Instructions for cloning the project repository and setting up a Python virtual environment for the AI Startup Trend Analysis Agent. ```bash git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git cd awesome-llm-apps/ai_agent_tutorials/ai_startup_trend_analysis_agent # For macOS/Linux python -m venv venv source venv/bin/activate # For Windows python -m venv venv .\venv\Scripts\activate ``` -------------------------------- ### Install Voice Dependencies with Pip Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/11_voice/static/README.md Installs the necessary OpenAI Agents package with voice capabilities along with required audio and numerical processing libraries. This is a prerequisite for running the voice agent example. ```bash pip install 'openai-agents[voice]' pip install sounddevice numpy soundfile librosa ``` -------------------------------- ### Set Up Environment Variables Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/11_voice/static/README.md Copies an example environment file and instructs the user to edit it with their OpenAI API key. This step is crucial for authentication with the OpenAI API. ```bash cp env.example .env # Edit .env and add your OpenAI API key ``` -------------------------------- ### Navigate to Project Directory (Bash) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/README.md After cloning the repository, this command navigates you into a specific project's directory, such as 'starter_ai_agents/ai_travel_agent'. You need to be in the correct directory to install dependencies and run the application. ```bash cd awesome-llm-apps/starter_ai_agents/ai_travel_agent ``` -------------------------------- ### Verify ADK Installation Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/google_adk_crash_course/adk_yaml_examples/multi_agent_web_research_team/README.md Checks if the Google ADK command-line interface is installed and accessible by displaying its version. This helps confirm the setup. ```bash adk --version ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/advanced_ai_agents/multi_agent_apps/agent_teams/ai_legal_agent_team/README.md This code snippet demonstrates the commands to set up the project environment. It includes cloning the repository, navigating to the project directory, and installing all necessary Python dependencies listed in the requirements.txt file. ```bash git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git cd advanced_ai_apps/multi_agent_apps/agent_teams/ai_legal_agent_team pip install -r requirements.txt ``` -------------------------------- ### Google ADK Crash Course - Starter Agent (Python) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/README.md This snippet demonstrates the core concepts of the Google ADK for building starter agents. It covers model-agnostic design (compatible with OpenAI, Claude), structured outputs using Pydantic, and integrating various tools. ```python # Example placeholder for Google ADK starter agent concepts # Actual code would involve initializing an agent, defining tools, and setting up callbacks. # from google.generativeai.agent import Agent # from pydantic import BaseModel # class SearchQuery(BaseModel): # query: str # def search_tool(query: str): # # Implementation for search functionality # pass # agent = Agent( # tools=[search_tool], # callbacks=None, # Add callback handlers here # memory=None # Add memory configuration here # ) # agent.run("What is the capital of France?") ``` -------------------------------- ### Run Manual Conversation Example (Python) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/4_running_agents/4_2_conversation_management/README.md Executes the manual conversation management example. This requires the OpenAI API key to be set in the .env file and the openai-agents SDK to be installed. ```python import asyncio from agent import manual_conversation_example, session_conversation_example # Test manual conversation management asyncio.run(manual_conversation_example()) ``` -------------------------------- ### Voice Pipeline Setup with SingleAgentVoiceWorkflow Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/11_voice/static/README.md Initializes a VoicePipeline using a SingleAgentVoiceWorkflow. This setup is suitable for straightforward, single-agent voice interactions. Dependencies include the OpenAI Agents SDK with voice support. ```python pipeline = VoicePipeline( workflow=SingleAgentVoiceWorkflow(agent, callbacks=WorkflowCallbacks()) ) ``` -------------------------------- ### Run Agent Examples (Python) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/7_sessions/7_1_basic_sessions/README.md Executes example functions for in-memory and persistent sessions using the asyncio library. Requires an OpenAI API key set in the .env file. ```python import asyncio from agent import in_memory_session_example, persistent_session_example # Test in-memory sessions asyncio.run(in_memory_session_example()) # Test persistent sessions asyncio.run(persistent_session_example()) ``` -------------------------------- ### Set Up API Key Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/google_adk_crash_course/6_callbacks/6_2_llm_interaction_callbacks/README.md Creates a .env file to store sensitive API keys, such as the GOOGLE_API_KEY. This is a common practice for managing environment variables. ```bash echo "GOOGLE_API_KEY=your_api_key_here" > .env ``` -------------------------------- ### Clone Repository and Install Dependencies (Local) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/starter_ai_agents/web_scrapping_ai_agent/README.md Clones the project repository from GitHub and installs the necessary Python dependencies for the local web scraping agent. This is the initial setup step for the local version. ```bash git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git cd awesome-llm-apps/starter_ai_agents/web_scrapping_ai_agent pip install -r requirements.txt ``` -------------------------------- ### Setup Streaming Pipeline with VoiceCallbacks (Python) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/11_voice/streamed/README.md Demonstrates how to initialize a voice pipeline using SingleAgentVoiceWorkflow and StreamingWorkflowCallbacks for real-time event monitoring. Dependencies include the OpenAI Agents SDK. ```python from openai_agents.voice import VoicePipeline, SingleAgentVoiceWorkflow, StreamingWorkflowCallbacks # Assuming 'agent' is a pre-configured agent object pipeline = VoicePipeline( workflow=SingleAgentVoiceWorkflow(agent, callbacks=StreamingWorkflowCallbacks()) ) ``` -------------------------------- ### Basic Agent Handoff Setup in Python Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/8_handoffs_delegation/README.md Demonstrates the basic setup of an agent handoff. It involves creating individual agents and then configuring a 'Triage Agent' to handoff to them. This automatically creates tools for each specified agent. ```python from agents import Agent, handoff billing_agent = Agent(name="Billing Agent") support_agent = Agent(name="Support Agent") triage_agent = Agent( name="Triage Agent", handoffs=[billing_agent, support_agent] # Creates tools automatically ) ``` -------------------------------- ### Basic Automatic Tracing Example (Python) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/10_tracing_observability/10_1_default_tracing/README.md An example showcasing basic automatic tracing. It runs an agent with a prompt and prints a link to the trace on the OpenAI platform using the obtained trace ID. No explicit tracing setup is needed. ```python # Tracing happens automatically - no setup required! result = await Runner.run(agent, "Explain machine learning") print(f"View trace: https://platform.openai.com/traces/{result.run_id}") ``` -------------------------------- ### Install Dependencies and Set Up Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/advanced_ai_agents/multi_agent_apps/ai_domain_deep_research_agent/README.md Installs project dependencies and adds necessary Composio tools for integration with Google Docs and Perplexity AI. This setup is crucial for the agent's functionality, enabling it to interact with external services for research and report generation. ```bash git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git cd advanced_ai_agents/single_agent_apps/ai_domain_deep_research_agent pip install -r requirements.txt composio add googledocs composio add perplexityai ``` -------------------------------- ### Bash: Set up project environment Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/google_adk_crash_course/4_tool_using_agent/4_2_function_tools/README.md Sets up the project environment by navigating to the correct directory, copying an environment template, and instructing the user to add their Google AI API key. ```bash cd 4_2_function_tools # Copy the environment template cp env.example .env # Edit .env and add your Google AI API key # Get your API key from: https://aistudio.google.com/ ``` -------------------------------- ### Run Streamlit App Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/rag_tutorials/autonomous_rag/README.md Launches the AutoRAG Streamlit application. This command requires Streamlit to be installed and will start the web server for the application. ```bash streamlit run autorag.py ``` -------------------------------- ### Set Up Environment Variables Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/1_starter_agent/1_personal_assistant_agent/README.md Copies an example environment file and instructs the user to add their OpenAI API key. This is crucial for authenticating with the OpenAI API. ```bash cp ../env.example .env # Edit .env and add your OpenAI API key ``` -------------------------------- ### Start Session and Handle Events Python Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/11_voice/realtime/README.md Initiates a real-time session using the configured runner and processes events asynchronously, such as printing audio transcripts as they are completed. ```python session = await runner.run() async with session: async for event in session: if event.type == "response.audio_transcript.done": print(f"Assistant: {event.transcript}") ``` -------------------------------- ### Setup and Run Medical Imaging Agent (Bash) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/starter_ai_agents/ai_medical_imaging_agent/README.md This snippet outlines the steps to set up and run the Medical Imaging Diagnosis Agent. It includes cloning the repository, navigating to the project directory, installing Python dependencies, and running the Streamlit application. Ensure you have Python and pip installed. ```bash # Clone the repository git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git cd ai_agent_tutorials/ai_medical_imaging_agent # Install dependencies pip install -r requirements.txt # Run the Application streamlit run ai_medical_imaging.py ``` -------------------------------- ### Setup Google API Key Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/google_adk_crash_course/6_callbacks/6_1_agent_lifecycle_callbacks/README.md Configures the Google API key by creating a .env file. This key is essential for interacting with Google services used by the application. ```bash # Create .env file echo "GOOGLE_API_KEY=your_api_key_here" > .env ``` -------------------------------- ### Chat API Initial Response Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/advanced_llm_apps/chat_with_X_tutorials/streaming_ai_chatbot/README.md Example JSON response from the chat API indicating that the message has been received and the AI is starting to respond. It includes a conversation ID, a status message, and the current status. ```json { "conversationId": "uuid-v4", "message": "Message received, AI is responding...", "status": "streaming" } ``` -------------------------------- ### Run Basic Sessions Example Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/7_sessions/README.md Executes a Python script to test basic session functionality. This script demonstrates fundamental interactions with the agent and session. ```bash python 7_1_basic_sessions/agent.py ``` -------------------------------- ### Configure Environment Variables Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/mcp_ai_agents/multi_mcp_agent/README.md Example .env file content for setting up API keys required by the assistant. Includes OpenAI, GitHub, and Perplexity API keys. ```env OPENAI_API_KEY=your-openai-api-key GITHUB_PERSONAL_ACCESS_TOKEN=your-github-token PERPLEXITY_API_KEY=your-perplexity-api-key ``` -------------------------------- ### Run Qdrant Vector Database - Bash Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/advanced_llm_apps/llm_apps_with_memory_tutorials/local_chatgpt_with_memory/README.md Installs and starts the Qdrant vector database locally using Docker. Qdrant is used for storing and retrieving user memory embeddings. ```bash docker pull qdrant/qdrant docker run -p 6333:6333 qdrant/qdrant ``` -------------------------------- ### Run memory operations examples in Python Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/7_sessions/7_2_memory_operations/README.md Executes Python scripts to demonstrate basic memory operations and conversation corrections. It requires the OpenAI Agents SDK to be installed and the environment variables to be set. ```python import asyncio from agent import basic_memory_operations, conversation_corrections # Test memory operations asyncio.run(basic_memory_operations()) # Test conversation corrections asyncio.run(conversation_corrections()) ``` -------------------------------- ### Run Realtime Voice Agent Example Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/ai_agent_framework_crash_course/openai_sdk_crash_course/11_voice/README.md Executes the realtime voice agent example. This option is for ultra-low latency voice processing. ```bash cd realtime/ python agent.py ``` -------------------------------- ### OpenAI Agents SDK Crash Course - Starter Agent (Python) Source: https://github.com/shubhamsaboo/awesome-llm-apps/blob/main/README.md This snippet illustrates key features of the OpenAI Agents SDK for creating starter agents. It highlights function calling, structured outputs, built-in and third-party tool integrations, and memory management. ```python # Example placeholder for OpenAI Agents SDK starter agent concepts # Actual code would involve defining tools, setting up an agent, and handling function calls. # from openai import OpenAI # from pydantic import BaseModel # class WeatherInput(BaseModel): # location: str # def get_weather(location: str): # # Implementation for fetching weather data # return f"The weather in {location} is sunny." # client = OpenAI() # agent = client.beta.assistants.create_from_tool( # name="WeatherAssistant", # tools=[{"type": "function", "function": {"name": "get_weather", "parameters": {"type": "object", "properties": {"location": {"type": "string"}}, "required": ["location"]}}}], # # Add memory, callbacks, and other configurations here # ) # thread = client.beta.threads.create() # message = client.beta.threads.messages.create( # thread.id, # role="user", # content="What is the weather in London?" # ) # run = client.beta.threads.runs.create(thread.id, assistant_id=agent.id) ```