Skip to content

AI Brain MVP

An intelligent coaching assistant that helps peer leaders and mobilizers guide youth entrepreneurs in East Africa by analyzing their situation and providing stage-appropriate guidance based on a 15-stage pedagogical model for youth entrepreneurship development.

Purpose

No business context provided yet — add a context.md to enrich this documentation.

This workflow serves as an AI-powered coaching tool that analyzes descriptions of youth entrepreneurs' situations and provides targeted advice to their coaches. The system uses a structured 15-stage pedagogical model that guides youth from initial business activation through sustainable growth, helping coaches identify where their youth are in their entrepreneurial journey and what specific actions to recommend next.

How It Works

  1. Input Reception: A coach describes their youth's current situation through a chat interface
  2. Stage Analysis: The AI analyzes the youth's situation against a 15-stage entrepreneurial development model
  3. Stage Identification: The system extracts and validates which stage (S1-S15) the youth is currently at
  4. Context Enrichment: Detailed information about the current stage is loaded, including goals, skills, micro-actions, and common bottlenecks
  5. Coaching Recommendations: The AI generates specific, actionable advice for what the coach should say or do next with their youth
  6. Output Formatting: The recommendations are formatted and returned to the coach

Workflow Diagram

graph TD
    A[When chat message received] --> B[Set:Load Stage Data]
    B --> C[LLM:Thinking Step]
    C --> D[Code:Extract Stage ID]
    D --> E[Code:Get Stage Details]
    E --> F[LLM:Suggest Next Steps]
    F --> G[Code:Format Output]

    H[OpenRouter:Thinking] --> C
    I[OpenRouter:Suggestions] --> F

Trigger

Chat Trigger: The workflow starts when a chat message is received through a public webhook. Coaches can interact with the system through a chat interface to describe their youth's situation and receive guidance.

Nodes Used

Node Type Node Name Purpose
Chat Trigger When chat message received Receives coach input through chat interface
Set Set:Load Stage Data Loads the 15-stage model data and extracts user message
LLM Chain LLM:Thinking Step Analyzes youth situation to determine current stage
Code Code:Extract Stage ID Parses AI response to extract valid stage identifier (S1-S15)
Code Code:Get Stage Details Retrieves detailed information for identified stage
LLM Chain LLM:Suggest Next Steps Generates coaching recommendations based on stage analysis
Code Code:Format Output Formats final recommendations for coach
OpenRouter LLM OpenRouter:Thinking AI model for stage analysis
OpenRouter LLM OpenRouter:Suggestions AI model for generating coaching advice

External Services & Credentials Required

  • OpenRouter API: Required for both AI analysis steps
    • Credential: openRouterApi (ID: Az2rKAl4uVoFJhBr)
    • Used for stage analysis and coaching recommendation generation

Environment Variables

No specific environment variables are configured in this workflow. All configuration is handled through n8n's credential system.

Data Flow

Input: - Coach's description of youth entrepreneur's situation - Session ID for conversation tracking

Processing: - 15-stage pedagogical model data (S1-S15) - Stage-specific goals, skills, micro-actions, and bottlenecks - AI analysis of youth's current developmental stage

Output: - Specific coaching recommendations - Suggested actions for the coach to take with their youth - Stage-appropriate micro-actions and guidance

Error Handling

The workflow includes basic error handling: - If no valid stage is identified from AI analysis, defaults to S1 (Psychological Activation and Early Agency) - Fallback logic ensures a stage is always assigned even if pattern matching fails - Input validation ensures proper data extraction from chat messages

Known Limitations

  • Relies on coach's description accuracy for stage assessment
  • Limited to 15 predefined stages in the pedagogical model
  • Requires OpenRouter API availability for functionality
  • No conversation history or context retention between sessions
  • Output quality depends on the coach's ability to describe the youth's situation clearly

No related workflows specified in the current context.

Setup Instructions

  1. Import Workflow: Import the workflow JSON into your n8n instance

  2. Configure Credentials:

    • Set up OpenRouter API credentials in n8n
    • Ensure the credential ID matches "Az2rKAl4uVoFJhBr" or update both OpenRouter nodes
  3. Activate Workflow: Enable the workflow to make the chat trigger available

  4. Test Connection:

    • Send a test message through the chat interface
    • Verify that both AI analysis steps complete successfully
    • Confirm coaching recommendations are generated
  5. Deploy: The workflow will be accessible via the public webhook URL generated by the chat trigger

  6. Usage: Coaches can describe their youth's situation through the chat interface and receive stage-appropriate guidance and recommendations.