AI Brain MVP v0.1¶
An intelligent coaching assistant that analyzes youth entrepreneurship conversations and identifies which stage of a 15-stage pedagogical model the learner is currently at, providing structured guidance for entrepreneurship coaches working with young entrepreneurs.
Purpose¶
No business context provided yet — add a context.md to enrich this documentation.
This workflow serves as an AI-powered diagnostic tool for entrepreneurship coaches working with youth. It automatically analyzes conversations with young entrepreneurs and maps them to specific stages in a comprehensive 15-stage pedagogical framework that guides youth from initial psychological activation through to sustained entrepreneurship and mentorship capabilities.
The system helps coaches quickly identify where a learner is in their entrepreneurship journey, understand their current challenges, and access stage-specific guidance including goals, core skills, micro-actions, and readiness checks.
How It Works¶
- Chat Input Reception: The workflow receives a chat message from a user through a chat trigger interface
- Data Preparation: Essential information is extracted and organized, including the user's message, session ID, and the complete list of 15 entrepreneurship stages
- AI Analysis: An LLM analyzes the conversation against the pedagogical model to determine which specific stage (S1-S15) the youth is currently at
- Stage Extraction: The AI's response is parsed to extract the identified stage ID using pattern matching
- Stage Details Lookup: The system retrieves comprehensive details for both the current stage and next stage, including goals, core skills, micro-actions, and readiness checks
- Structured Output: Returns a complete assessment with stage identification, detailed stage information, and progression guidance
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]
F[OpenRouter:Thinking] -.->|AI Model| C
Trigger¶
Chat Trigger: Activated when a chat message is received through the webhook interface. The trigger captures the user's message content and session ID for processing.
Nodes Used¶
| Node Type | Node Name | Purpose |
|---|---|---|
| Chat Trigger | When chat message received | Receives incoming chat messages and session data |
| Set | Set:Load Stage Data | Prepares stage list, counts, and user message data for processing |
| LLM Chain | LLM:Thinking Step | Analyzes conversation to identify current entrepreneurship stage |
| Language Model | OpenRouter:Thinking | Provides AI processing power for stage analysis |
| Code | Code:Extract Stage ID | Parses AI response to extract stage identifier (S1-S15) |
| Code | Code:Get Stage Details | Retrieves comprehensive stage information from internal database |
External Services & Credentials Required¶
- OpenRouter API: Required for AI language model access
- Credential:
openRouterApi(OpenRouter account 2) - Used for analyzing conversations and stage identification
- Credential:
Environment Variables¶
No environment variables are explicitly configured in this workflow. All configuration is handled through n8n's credential system.
Data Flow¶
Input: - Chat message content (user's entrepreneurship-related conversation) - Session ID for conversation tracking
Processing: - 15-stage entrepreneurship model framework - AI analysis prompt with pedagogical context - Stage identification and validation logic - Comprehensive stage database lookup
Output: - Current stage ID (S1-S15) - Current stage details (name, lifecycle, goal, core skills, micro-actions, readiness check) - Next stage ID and details (if applicable) - AI thinking process explanation - Original user message for reference
Error Handling¶
- Stage ID Validation: If AI fails to identify a valid stage, defaults to S1 (Psychological Activation and Early Agency)
- Pattern Matching: Uses regex to extract stage IDs with fallback to first valid match found
- Data Lookup: Defaults to S1 stage data if lookup fails for any reason
Known Limitations¶
- Currently in MVP status (v0.1) - may require refinement based on usage
- Workflow is marked as inactive, requiring manual activation for use
- Single LLM provider dependency (OpenRouter) without fallback options
- Stage identification relies on pattern matching which may miss edge cases
- No conversation history or context retention between sessions
Related Workflows¶
No related workflows specified in the current context.
Setup Instructions¶
- Import Workflow: Import the JSON configuration into your n8n instance
- Configure Credentials:
- Set up OpenRouter API credentials in n8n
- Ensure the credential is named "OpenRouter account 2" or update the node reference
- Activate Workflow: Enable the workflow in n8n (currently set to inactive)
- Test Chat Interface:
- Access the chat trigger webhook URL
- Send test messages to verify stage identification
- Customize Stages: Modify the stage data in "Code:Get Stage Details" if needed for your specific pedagogical model
- Monitor Performance: Review AI responses and adjust prompts in "LLM:Thinking Step" as needed
The workflow will be accessible via the generated webhook URL once activated and can be integrated into chat interfaces or coaching platforms.