n8n orchestrates the entire system, handling data processing, classification, and interactions.

Create n8n Account

  1. Sign up for n8n Cloud or set up a self-hosted instance
  2. Create a new workflow

Import the Cosmos Workflow

  1. Download the provided Cosmos_RAG_Agent.json file
  2. In n8n, go to Workflows → Import From File
  3. Upload the JSON file

Configure Credentials

Set up the following API credentials in n8n:

  1. OpenAI API
  2. Pinecone API
  3. Supabase API
  4. Zep API (for memory)
  5. RapidAPI (for YouTube transcripts)
  6. Tavily API (for news search)
  7. Google Drive (optional)

Configure Webhooks

The workflow uses several webhooks to handle different types of requests:

  1. Main chat webhook - /chat