AI Brain MVP¶
An intelligent coaching assistant that analyzes youth entrepreneur situations and provides stage-specific guidance to coaches working with young entrepreneurs in East Africa. The workflow uses AI to identify which stage of a 15-stage pedagogical model a youth is at, then suggests practical next steps for coaches to help their youth progress.
Purpose¶
No business context provided yet — add a context.md to enrich this documentation.
This workflow serves as an AI-powered coaching tool that helps peer leaders and mobilizers support youth entrepreneurs more effectively. When coaches describe a situation with a youth they're supporting, the AI analyzes the youth's current entrepreneurial stage and provides specific, actionable advice for what the coach should say or do next.
How It Works¶
- Receive Coach Input: A coach describes their youth's situation through a chat interface
- Load Stage Framework: The system loads the 15-stage pedagogical model that guides youth from business startup to sustainable growth
- Analyze Youth Stage: AI analyzes the coach's description to determine which stage (S1-S15) the youth is currently at
- Extract Stage Information: The system identifies the specific stage and retrieves detailed information about it
- Get Stage Details: Comprehensive stage data is loaded, including goals, skills, micro-actions, and common bottlenecks
- Generate Coaching Suggestions: AI creates specific, practical advice for what the coach should say or do next with their youth
- Format Response: The final coaching suggestions 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 AI assistant by describing their youth's situation in natural language.
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 pedagogical framework and user input |
| LLM Chain | LLM:Thinking Step | Analyzes youth situation to determine current stage |
| Code | Code:Extract Stage ID | Parses AI response to extract specific stage identifier |
| Code | Code:Get Stage Details | Retrieves comprehensive data for identified stage |
| LLM Chain | LLM:Suggest Next Steps | Generates coaching advice based on stage analysis |
| Code | Code:Format Output | Formats final response for coach |
| OpenRouter LLM | OpenRouter:Thinking | AI model for stage analysis |
| OpenRouter LLM | OpenRouter:Suggestions | AI model for generating coaching suggestions |
External Services & Credentials Required¶
- OpenRouter API: Required for AI language model access
- Credential:
openRouterApi(OpenRouter account 2) - Used for both stage analysis and suggestion generation
- Credential:
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 situation (via chat) - Session ID for conversation tracking
Processing: - 15-stage pedagogical model framework - Stage-specific goals, skills, micro-actions, and bottlenecks - AI analysis of youth's current developmental stage
Output: - Specific coaching suggestions for what the coach should say or do next - Stage-appropriate micro-actions for the youth - Guidance on addressing common bottlenecks
Error Handling¶
The workflow includes basic error handling: - If no valid stage is identified from AI analysis, defaults to Stage 1 (S1) - Fallback logic ensures a stage is always assigned even if pattern matching fails - Multiple AI response formats are supported (text or response fields)
Known Limitations¶
- Relies on coach's description quality for accurate stage identification
- Limited to 15 predefined stages in the pedagogical model
- Requires manual translation if coach needs guidance in local languages
- No conversation memory between sessions
Related Workflows¶
No related workflows specified in the current context.
Setup Instructions¶
-
Import Workflow: Import the JSON workflow into your n8n instance
-
Configure OpenRouter Credentials:
- Create an OpenRouter API account
- Add OpenRouter API credentials in n8n with ID:
Az2rKAl4uVoFJhBr - Name the credential "OpenRouter account 2"
-
Activate Workflow:
- Ensure the workflow is set to "Active"
- The chat trigger will generate a public webhook URL
-
Test the Setup:
- Send a test message describing a youth entrepreneur situation
- Verify the AI responds with stage analysis and coaching suggestions
-
Share with Coaches:
- Provide coaches with the chat interface URL
- Train them on how to describe youth situations effectively
- Explain how to interpret and use the AI's coaching suggestions
The workflow is ready to use once credentials are configured and the workflow is activated.