### Install Dependencies and Run Example Source: https://github.com/motiadev/motia-examples/blob/main/examples/content-and-marketing/README.md This bash script demonstrates how to navigate to an example directory, install its Node.js dependencies, configure environment variables, and start the development server. ```bash cd email-marketing-automation # or another example # 2. Install dependencies npm install # 3. Configure environment cp env.example .env # Add your API keys and service credentials # 4. Start the server npm run dev # 5. Access Workbench # Open http://localhost:3000 ``` -------------------------------- ### Project Setup and Running Examples Source: https://context7.com/motiadev/motia-examples/llms.txt Provides commands for cloning the Motia examples repository, installing dependencies, generating TypeScript types, starting the development server, and configuring environment variables. Also includes instructions for running a Python-based AI example. ```bash # Clone and navigate to any example git clone https://github.com/MotiaDev/motia-examples.git cd motia-examples/examples/foundational/api-patterns/todo-app # Install dependencies npm install # Generate TypeScript handler types (required after adding/modifying steps) npx motia generate-types # Start development server + Workbench UI npm run dev # → Workbench available at http://localhost:3000 # Configure environment cp .env.example .env # fill in API keys and secrets # Run a Python-based example cd examples/advanced-use-cases/ai-room-renovate pip install -r requirements.txt npm install npm run dev ``` -------------------------------- ### Install and Run Motia Example Source: https://github.com/motiadev/motia-examples/blob/main/examples/foundational/infrastructure/motia-parallel-execution/README.md Clone the repository, install dependencies, and start the development server to test the Motia workflow. ```bash git clone https://github.com/MotiaDev/motia-examples.git cd examples/motia-parallel-execution npm install npm run dev ``` -------------------------------- ### Install Dependencies and Start Development Server Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/multi-agent-systems/ai-hedgefund/README.md After cloning the repository and navigating to the project directory, install project dependencies using npm and start the development server. ```bash # Clone the repository git clone https://github.com/MotiaDev/motia-examples.git cd motia-examples/ai-hedgefund # Install dependencies npm install # Start the development server npm run dev ``` -------------------------------- ### Install Dependencies and Start Server Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/ai-planning-agent/README.md Install project dependencies using npm and start the development server. The server includes a UI for visual debugging. ```bash # Install dependencies npm install # Start development server with hot reload npm run dev ``` -------------------------------- ### Install and Run Motia Chat Agent Example Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/chat-agents/chat-agent/README.md Clone the repository, install dependencies, and start the development server for the chat agent example. ```bash git clone https://github.com/MotiaDev/motia-examples.git cd motia-examples/chat-agent npm install npm run dev ``` -------------------------------- ### Manual Backend and Frontend Setup Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/chat-agents/streaming-ai-chatbot/README.md Manually install dependencies and start the backend and frontend services separately. Ensure you configure your OpenAI API key in the .env file. ```bash # Install backend dependencies npm install # Install frontend dependencies cd frontend && npm install && cd .. # Configure environment cp .env.example .env # Edit .env and add your OpenAI API key # Start backend (Terminal 1) npm run dev # Start frontend (Terminal 2) cd frontend && npm run dev ``` -------------------------------- ### Clone and Run Motia Example Source: https://github.com/motiadev/motia-examples/blob/main/README.md Instructions for cloning the Motia examples repository, navigating to a specific example, installing dependencies, configuring environment variables, and starting the development server. ```bash git clone https://github.com/MotiaDev/motia-examples.git cd motia-examples cd examples/getting-started/middleware-auth-handler-example npm install cp env.example .env # Edit .env with your API keys npm run dev # Open Workbench # Visit http://localhost:3000 ``` -------------------------------- ### Install Dependencies and Run Source: https://github.com/motiadev/motia-examples/blob/main/examples/getting-started/ollama-chat/README.md Commands to clone the repository, install npm dependencies, and start the development server. ```bash git clone https://github.com/MotiaDev/motia-examples.git cd motia-examples/examples/ollama-chat npm install npm run dev ``` -------------------------------- ### Install Dependencies and Start Development Server Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/multi-agent-systems/multi-agent-game-generation/README.md Follow these steps to set up the project locally. Ensure you have Node.js 18+, npm/yarn, and a Google Gemini API key. After installation, generate TypeScript types and start the development server. ```bash git clone https://github.com/motia-dev/motia-examples.git cd examples/multi-agent-game-generation npm install cp .env.example .env # Edit .env and add your GEMINI_API_KEY docker run -d -p 6379:6379 redis:alpine npm run generate-types npm run dev ``` -------------------------------- ### Quick Start: Install, Configure, and Run Source: https://github.com/motiadev/motia-examples/blob/main/examples/monitoring-and-alerts/car-alert/Readme.md Install dependencies, set the OpenAI API key, and run the development server. Includes a cURL command to test the alert endpoint. ```bash # Install dependencies npm install pip install -r requirements.txt # Set environment variables export OPENAI_API_KEY=your_key_here # Run npm run dev # Test curl -X POST http://localhost:3000/connected_car_alert \ -H "Content-Type: application/json" \ -d '{"text": "Engine temp: 240°F. Oil pressure low.", "query": "What should I do?"}' ``` -------------------------------- ### Install Dependencies and Run Source: https://github.com/motiadev/motia-examples/blob/main/examples/foundational/api-patterns/sentimental-analysis/README.md Commands to install project dependencies, generate types, and start the development server. ```bash cd sentimental-analysis npm install npm run generate-types npm run dev ``` -------------------------------- ### Install Dependencies and Start Server Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/ai-reflection-deep-research-agent/README.md Install project dependencies using npm and set up environment variables, including your Google Cloud API key, before starting the development server. ```bash npm install export GEMINI_API_KEY=your_api_key_here npm run dev ``` -------------------------------- ### Frontend Development Setup Source: https://github.com/motiadev/motia-examples/blob/main/examples/advanced-use-cases/wake-surf-club/README.md Navigate to the frontend directory and install dependencies to run the development server. ```bash cd frontend npm install npm run dev ``` -------------------------------- ### Install Dependencies and Start Development Server Source: https://github.com/motiadev/motia-examples/blob/main/examples/content-and-marketing/motia-ad-generator/README.md Use these commands to install project dependencies with pnpm and start the Motia development server, which includes the Workbench UI. ```bash pnpm install pnpm dev ``` -------------------------------- ### Motia Project Setup and Development Commands Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/multi-agent-systems/ai-vs-ai-tictactoe-game/AGENTS.md Essential commands for setting up a Motia project, including installing dependencies, starting the development server, and generating TypeScript types. ```bash # Install dependencies npm install # Start development server npm run dev # Generate TypeScript types from steps npx motia generate-types ``` -------------------------------- ### Install, Configure, Seed, and Run Project Source: https://github.com/motiadev/motia-examples/blob/main/examples/rag-and-search/rag-applications/airbnb-assistant/PROJECT_SUMMARY.md Standard commands to install dependencies, configure environment variables, seed data, and start the development server. ```bash # 1. Install npm install # 2. Configure cp env.example .env # Edit .env with your API keys # 3. Seed data npm run seed # 4. Run npm run dev ``` -------------------------------- ### Install Dependencies and Run Server Source: https://github.com/motiadev/motia-examples/blob/main/examples/monitoring-and-alerts/README.md Installs project dependencies, configures environment variables, and starts the development server. Ensure to edit the .env file with your API keys. ```bash # 1. Install dependencies npm install # 2. Configure environment cp env.example .env # Edit .env with your API keys # 3. Start the server npm run dev # 4. Monitor in Workbench # Open http://localhost:3000 ``` -------------------------------- ### Initialize Database and Start Development Server Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/ai-health-fitness/README.md Install dependencies, initialize the SQLite database, and start the development server using npm commands. ```bash npm install npm run init:db npm run dev ``` -------------------------------- ### Install Dependencies and Run Development Server Source: https://github.com/motiadev/motia-examples/blob/main/examples/monitoring-and-alerts/ai-morgage-alert-system/README.md Installs project dependencies, generates types, and starts the development server. Ensure Node.js 18+ is installed. ```bash git clone https://github.com/motiadev/motia-examples cd mortgage-rate-alert npm install npm run generate-types npm run dev ``` -------------------------------- ### Install Dependencies and Copy Environment Variables Source: https://github.com/motiadev/motia-examples/blob/main/examples/advanced-use-cases/wake-surf-club/README.md Installs project dependencies and copies the example environment file. Ensure Node.js 18+ is installed. ```bash npm install cp .env.example .env ``` -------------------------------- ### Install Dependencies and Run Development Server Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/multi-agent-systems/ai-vs-ai-tictactoe-game/README.md Install project dependencies using npm and start the development server to run the application. ```bash npm install npm run dev ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/motiadev/motia-examples/blob/main/examples/advanced-use-cases/meeting-transcription/README.md Install Python and Node.js dependencies required for the example. ```bash pip install -r requirements.txt npm install ``` -------------------------------- ### Environment Variables Setup Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/linkedIn-content-agent/README.md Copy the example environment file and configure your API keys and LinkedIn credentials. ```bash cp .env.example .env ``` ```env OPENAI_API_KEY=your_openai_api_key_here LINKEDIN_ACCESS_TOKEN=your_linkedin_access_token LINKEDIN_URN=urn:li:person:YOUR_LINKEDIN_ID ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/motiadev/motia-examples/blob/main/examples/integrations/github/github-notion-sync/README.md Commands to clone the example repository and install the necessary Node.js dependencies for the GitHub-Notion sync project. ```bash git clone https://github.com/MotiaDev/motia-examples cd github-notion-sync npm install ``` -------------------------------- ### Install Dependencies and Start Motia Dev Server Source: https://github.com/motiadev/motia-examples/blob/main/examples/foundational/workflow-patterns/human-in-the-loop/AGENTS.md Commands to install project dependencies and start the development server with hot reloading. ```bash # Install dependencies npm install # Start development server (with hot reload) npm run dev ``` -------------------------------- ### Make Script Executable and Start Development Server Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/chat-agents/streaming-ai-chatbot/FRONTEND_SETUP.md Make the startup script executable and then run it to start both the backend and frontend development servers. This script handles dependency installation, .env file creation, and server startup. ```bash chmod +x start-dev.sh ./start-dev.sh ``` -------------------------------- ### Start Development Server Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/chat-agents/streaming-ai-chatbot/README.md Execute this script to install dependencies, set up the environment, and start both the Motia backend and the Next.js frontend. It automatically opens services in your browser. ```bash git clone https://github.com/MotiaDev/motia-examples.git cd motia-examples/examples/streaming-ai-chatbot chmod +x start-dev.sh ./start-dev.sh ``` -------------------------------- ### Install Dependencies and Run Development Server Source: https://github.com/motiadev/motia-examples/blob/main/examples/advanced-use-cases/meeting-transcription/meeting_transcript_example/EXAMPLE_SUMMARY.md Commands to install project dependencies, generate TypeScript types, and start the development server. ```bash npm install npm run generate-types npm run dev ``` -------------------------------- ### Local Development Setup Source: https://github.com/motiadev/motia-examples/blob/main/examples/integrations/github/github-notion-sync/README.md Clone the repository, install dependencies, and run the development server. Use ngrok for local testing of webhooks. ```bash git clone cd Room-Renovate npm install # Configure .env npm run dev ``` -------------------------------- ### Run the Project Source: https://github.com/motiadev/motia-examples/blob/main/examples/content-and-marketing/conversation-analyzer-with-vision/README.md Start the Motia application development server. This command should be run after installing dependencies. ```bash pnpm run dev ``` -------------------------------- ### Install and Run Motia Dev Server Source: https://github.com/motiadev/motia-examples/blob/main/examples/foundational/api-patterns/todo-app/README.md Install project dependencies and start the Motia development server along with the Workbench UI. ```bash npm install npm run dev ``` -------------------------------- ### Environment Variables Setup Source: https://github.com/motiadev/motia-examples/blob/main/examples/rag-and-search/rag-fundamentals/nvidia-docs-motia/README.md Commands to copy example environment variables and add the NVIDIA NIM API key. ```bash cp .env.example .env NVIDIA_NIM_API_KEY=nvapi-xxxxx ``` -------------------------------- ### Clone Repository and Install Dependencies Source: https://github.com/motiadev/motia-examples/blob/main/examples/rag-and-search/rag-applications/research-assistant/README.md Clone the Motia examples repository and install project dependencies using pnpm or npm. ```bash git clone https://github.com/MotiaDev/motia-examples.git cd motia-examples/examples/research-assistant pnpm install # or npm install ``` -------------------------------- ### Clone Repository and Install Dependencies Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/finance-agent/README.md Clone the Motia Finance Agent example repository and install project dependencies using pnpm or npm. ```bash git clone https://github.com/MotiaDev/motia-examples cd examples/finance-agent pnpm install # or npm install ``` -------------------------------- ### Node.js Project Installation and Execution Source: https://github.com/motiadev/motia-examples/blob/main/examples/integrations/github/github-commit-jenkins/README.md Install project dependencies, run in development mode, build for production, or start the production server using npm commands. ```bash # Install dependencies npm install # Run in development mode npm run dev # Build for production npm run build # Start production server npm start ``` -------------------------------- ### Full Workflow Testing: Start Research Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/ai-deep-research-agent/README.md Example of starting a research session for testing purposes. Note the specific query and parameters used. ```bash # Start a research session curl -X POST http://localhost:3000/research \ -H "Content-Type: application/json" \ -d '{ "query": "What are the benefits of renewable energy?", "breadth": 3, "depth": 2 }' ``` ```json { "message": "Research process started", "requestId": "abc123-def456-ghi789" } ``` -------------------------------- ### Start Application Server Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/Spamurai-pr-agent/README.md Start the Spamurai application server. ```bash pnpm start ``` -------------------------------- ### Install Backend and Frontend Dependencies Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/chat-agents/streaming-ai-chatbot/FRONTEND_SETUP.md Install backend dependencies using npm install. Then, navigate to the frontend directory, install its dependencies, and return to the root directory. ```bash # Backend dependencies (Motia + OpenAI) npm install # Frontend dependencies (Next.js + React + Markdown) cd frontend && npm install && cd .. ``` -------------------------------- ### Set Up Environment Variables Source: https://github.com/motiadev/motia-examples/blob/main/examples/integrations/README.md Copy the example environment file and add your API keys. This is a crucial first step for configuring your integration. ```bash cp env.example .env # Add your API keys ``` -------------------------------- ### Navigate to Example Directory Source: https://github.com/motiadev/motia-examples/blob/main/examples/README.md Change directory to the specific example you want to run. ```bash cd getting-started/middleware-auth-handler-example ``` -------------------------------- ### Get Paper Details API Endpoint Example Source: https://github.com/motiadev/motia-examples/blob/main/examples/rag-and-search/rag-applications/research-assistant/README.md Example GET request to retrieve details for a specific paper using its ID. ```http GET /api/paper/paper-1746292138955 ``` -------------------------------- ### Install Coolify Script Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/multi-agent-systems/smarttravel-multi-agent/COOLIFY_DEPLOYMENT.md Run this bash script to install Coolify on your server. It handles Docker installation and Coolify service setup. ```bash curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash ``` -------------------------------- ### Set up Flux API Key Source: https://github.com/motiadev/motia-examples/blob/main/examples/advanced-use-cases/vision-example/README.md Copy the example environment file and set your Flux API key. This step is optional. ```bash cp .env.example .env ``` -------------------------------- ### Install and Run Content Moderation App Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/ai-content-moderation/README.md Install project dependencies using pnpm and start the development server. Ensure Node.js 18+ is installed. ```bash pnpm install pnpm run dev ``` -------------------------------- ### Environment Configuration Example Source: https://github.com/motiadev/motia-examples/blob/main/examples/integrations/communication/trello-flow/README.md Copy the example environment file and update it with your Trello, OpenAI, and Slack credentials and list IDs. ```bash cp .env.example .env ``` ```dotenv TRELLO_API_KEY=your_trello_api_key TRELLO_TOKEN=your_trello_token OPENAI_API_KEY=your_openai_api_key OPENAI_MODEL=your_openai_model SLACK_WEBHOOK_URL=your_slack_webhook_url TRELLO_NEW_TASKS_LIST_ID=your_new_tasks_list_id TRELLO_IN_PROGRESS_LIST_ID=your_in_progress_list_id TRELLO_NEEDS_REVIEW_LIST_ID=your_needs_review_list_id TRELLO_COMPLETED_LIST_ID=your_completed_list_id ``` -------------------------------- ### Clone Repository and Install Dependencies Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/ai-deep-research-agent/README.md Clone the Motia examples repository and install project dependencies using npm. ```bash git clone https://github.com/MotiaDev/motia-examples/examples cd examples/ai-deep-research-agent npm install ``` -------------------------------- ### Navigate to Example Directory Source: https://github.com/motiadev/motia-examples/blob/main/examples/advanced-use-cases/meeting-transcription/README.md Change your current directory to the meeting transcription example folder. ```bash cd examples/meeting-transcription ``` -------------------------------- ### Get Conversation History API Request Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/chat-agents/ai-chat-agent-with-memory/README.md Example of a GET request to retrieve the conversation history for a specific session. ```bash GET /chat/:sessionId ``` -------------------------------- ### Feature Launch Example Plan Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/ai-planning-agent/README.md Demonstrates submitting a plan for a feature launch, outlining the typical steps involved from ticket creation to production monitoring, including an approval gate. ```bash curl -X POST http://localhost:3000/plans/execute \ -H "Content-Type: application/json" \ -d '{ "objective": "Launch feature X across three teams", "context": { "stakeholders": ["pm@company.com", "eng@company.com"], "priority": "high" } }' ``` -------------------------------- ### Copy Example Environment File Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/multi-agent-systems/ai-hedgefund/README.md Before running with Docker, copy the example environment file to `.env` and populate it with your necessary API keys. ```bash cp env.example .env ``` -------------------------------- ### Start Development Server and Test Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/finance-agent/README.md Run the development server using pnpm dev and then use curl to send a test POST request to the finance query endpoint. ```bash pnpm dev curl -X POST http://localhost:3000/finance-query \ -H "Content-Type: application/json" \ -d '{"query": "Latest information about AAPL and MSFT"}' ``` -------------------------------- ### Start Services with Docker Compose Source: https://github.com/motiadev/motia-examples/blob/main/examples/rag-and-search/rag-fundamentals/rag-docling-chromadb-ollama-agent/README.md Use Docker Compose to build and start the RAG application, ChromaDB, and Ollama services. This command assumes you have Docker and Docker Compose installed. ```bash docker-compose up --build ``` -------------------------------- ### Configure Environment Variables Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/finance-agent/README.md Copy the example environment file and update it with your API keys for Alpha Vantage, SerperDev, and OpenAI. ```bash cp .env.example .env ALPHA_VANTAGE_API_KEY=your_alpha_vantage_api_key_here SERPER_API_KEY=your_serper_api_key_here OPENAI_API_KEY=your_openai_api_key_here ``` -------------------------------- ### Start Motia Dev Server and Open Workbench Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/multi-agent-systems/smarttravel-multi-agent/plugins/api-tester/QUICKSTART.md Instructions to start the Motia dev server and access the workbench in a browser. This is the initial setup step for using the API Tester. ```plaintext 1. ✅ Start Motia dev server (`pnpm dev`) 2. ✅ Open workbench in browser 3. ✅ Click "API Tester" tab 4. ✅ Try a preset request 5. ✅ Customize and explore! ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/ai-prospect-agent/README.md Clone the repository and install backend and frontend dependencies. Ensure you navigate to the correct directories for each. ```bash git clone https://github.com/MotiaDev/motia-examples.git cd examples/ai-agents/specialized-agents/ai-prospect-agent npm install cd frontend && npm install && cd .. ``` -------------------------------- ### Clone Repository Source: https://github.com/motiadev/motia-examples/blob/main/examples/integrations/communication/gmail-workflow/README.md Clone the repository to get started with the Gmail workflow. Navigate into the cloned directory. ```bash git clone https://github.com/motiaDev/motia-examples.git cd examples/gmail-workflow ``` -------------------------------- ### Start the Monitoring System Source: https://github.com/motiadev/motia-examples/blob/main/examples/foundational/infrastructure/motia-uptime-monitor/README.md Launch the uptime monitoring system after configuring environment variables. ```bash npm start ``` -------------------------------- ### Motia State Management Examples Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/ai-prospect-agent/README.md Examples of how to set, get, and retrieve data from Motia's state management system. Use these for storing and accessing prospect data, batches, and research results. ```typescript await state.set('prospects', prospectId, data) ``` ```typescript const prospect = await state.get('prospects', prospectId) ``` ```typescript const all = await state.getGroup('prospects') ``` -------------------------------- ### Set Up Google API Key Source: https://github.com/motiadev/motia-examples/blob/main/examples/advanced-use-cases/ai-room-renovate/TESTING_GUIDE.md Configure your Google API key for image generation by creating a `.env` file with your actual key. ```bash # Create .env file echo "GOOGLE_API_KEY=your_actual_gemini_api_key" > .env ``` -------------------------------- ### Get Conversation History API Response Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/chat-agents/ai-chat-agent-with-memory/README.md Example JSON response containing the conversation history for a given session. ```json { "sessionId": "unique-session-id", "messages": [ { "role": "user", "content": "Hello", "timestamp": "2025-01-01T00:00:00.000Z" }, { "role": "assistant", "content": "Hi! How can I help you?", "timestamp": "2025-01-01T00:00:01.000Z" } ] } ``` -------------------------------- ### Build and Deploy Frontend Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/chat-agents/streaming-ai-chatbot/FRONTEND_SETUP.md Commands for building the frontend application for production and deploying it to various hosting platforms like Vercel or Netlify. Also includes instructions for exporting a static site. ```bash # Build for production npm run build # Deploy to Vercel vercel deploy # Deploy to Netlify netlify deploy --prod # Deploy to any static hosting npm run export ``` -------------------------------- ### Run Appwrite Setup Script Source: https://github.com/motiadev/motia-examples/blob/main/examples/content-and-marketing/email-marketing-automation/README.md Execute this script to establish the necessary database collections and configurations within Appwrite for email marketing. ```bash npx tsx script/setup-appwrite.ts ``` -------------------------------- ### Chat API Initial Response Source: https://github.com/motiadev/motia-examples/blob/main/examples/getting-started/ollama-chat/README.md Example JSON response from the `/chat` endpoint indicating the message has been received and AI processing has started. ```json { "conversationId": "uuid-v4", "message": "Message received, AI is responding...", "status": "streaming" } ``` -------------------------------- ### Configure Environment Variables Source: https://github.com/motiadev/motia-examples/blob/main/examples/advanced-use-cases/README.md Copies the example environment file and prompts the user to fill in required credentials. This step is crucial for connecting to external services. ```bash cp env.example .env # Fill in ALL required credentials ``` -------------------------------- ### Example cURL for Get Analysis Result Source: https://github.com/motiadev/motia-examples/blob/main/examples/monitoring-and-alerts/ai-aqi-alert-system/README.md Shows how to poll the /aqi/analyze/:requestId endpoint to retrieve the results of an ongoing AQI analysis. ```bash curl http://localhost:3000/aqi/analyze/$REQUEST_ID | jq ``` -------------------------------- ### API Request for Listing Reviews Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/ai-code-reviewer-agent/README.md Example HTTP GET request to list code reviews, with options for filtering by repository and status. ```bash GET /reviews?repository=owner/repo&status=completed&limit=20 ``` -------------------------------- ### Environment Setup Source: https://github.com/motiadev/motia-examples/blob/main/examples/content-and-marketing/conversation-analyzer-with-vision/README.md Create a .env file in the root directory to store your OpenAI API key. Ensure the key is valid and has access to the GPT-4o-mini model. ```bash OPENAI_API_KEY=your_openai_api_key ``` -------------------------------- ### Build Frontend for Deployment Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/chat-agents/streaming-ai-chatbot/README.md Navigates to the frontend directory, builds the frontend application for production, and prepares it for deployment to a hosting platform. ```bash cd frontend npm run build # Deploy to your preferred hosting platform ``` -------------------------------- ### Full Workflow Testing: Get Report Source: https://github.com/motiadev/motia-examples/blob/main/examples/ai-agents/specialized-agents/ai-deep-research-agent/README.md Example of retrieving the research report after the status indicates completion. This is the final step in the testing workflow. ```bash curl "http://localhost:3000/research/report?requestId=abc123-def456-ghi789" ```