README_AI_AGENT.mdā¢7.19 kB
# š¤ AI Agent Setup for Simplicate MCP
## ā” Quick Start (30 Seconds)
1. **Open** your AI Agent node in n8n
2. **Copy** the contents of `MASTER_AI_AGENT_PROMPT.txt`
3. **Paste** into the System Prompt field
4. **Enable** Simplicate MCP in the Tools section
5. **Test** by saying: "Show me all employees from Simplicate"
ā
**Done!** The AI now understands everything about Simplicate!
---
## š Available Files
### šÆ System Prompts (Choose One)
| File | Size | Best For | Intelligence Level |
|------|------|----------|-------------------|
| **`MASTER_AI_AGENT_PROMPT.txt`** | ~5,000 tokens | Complex queries, deep analysis | āāāāā |
| **`AI_AGENT_PROMPT_OPTIMIZED.txt`** | ~1,800 tokens | Simple queries, high volume | āāāā |
### š Documentation
- **`SETUP_AI_AGENT.md`** - Complete setup guide with examples
- **`N8N_AI_AGENT_PROMPTS.md`** - Detailed prompt engineering guide
- **`N8N_DIRECT_SETUP.md`** - How to use direct MCP nodes (no AI)
- **`MCP_TOOL_REFERENCE.md`** - All 60+ tools documented
- **`ENDPOINT_STATUS.md`** - API reliability report
---
## šÆ What You Get
### Before Setup:
```
User: "Show me absences from Simplicate"
AI: ā Error: Input did not match expected schema
```
### After Setup:
```
User: "Show me absences from Simplicate"
AI: ā
I found 50 absence records. Here are the recent ones:
1. Robin van Polen - Nov 4, 2021 - 0.5 hours
2. Robin van Polen - Nov 15-16, 2021 - 16 hours
[etc]
```
---
## š§ What The AI Now Knows
### ā
All 60+ Tools
- HRM: employees, absences, leave, schedules
- Time: hours, timesheets, calendar
- Projects: projects, tasks, services
- CRM: organizations, contacts
- Sales: quotes, sales records
- Finance: invoices, payments, revenue
- Costs: expenses, mileage
- Resources: services, documents, contracts
### ā
Exact Parameter Formats
```json
{"limit": 50, "offset": 0}
```
### ā
Known People
- Dwayne: `employee:3b70f4dd49fafb356d44e34a3f0f8c3d`
### ā
Complex Query Handling
- "Is Dwayne available?" ā Checks leave + absences + timetable
- "Project status?" ā Analyzes hours + costs + tasks + budget
- "Top clients?" ā Aggregates invoices + projects by organization
---
## š Example Queries
### Simple Queries
```
ā
"Show me all employees"
ā
"Get absences from Simplicate"
ā
"List all projects"
ā
"Show me invoices"
ā
"Get recent hours"
```
### Smart Queries
```
ā
"Is Dwayne available next week?"
ā
"Who's on vacation?"
ā
"What hours did Dwayne log this month?"
ā
"Show me overdue invoices"
ā
"Which projects are over budget?"
```
### Complex Queries
```
ā
"How's the Meta API project doing?"
ā
"Who are our top 5 clients by revenue?"
ā
"Compare project A and B costs and hours"
ā
"Team utilization this month"
ā
"Forecast when we'll hit budget on project X"
```
---
## š§ Two Ways to Use
### Option 1: AI Agent (Natural Language) ā Recommended
```
+ Natural language queries
+ Handles complex multi-step tasks
+ Intelligent filtering and analysis
+ Conversational responses
- Uses more tokens
- Slightly slower
```
**Setup:** Add system prompt to AI Agent node
### Option 2: Direct MCP (Exact Tool Calls)
```
+ 100% reliable
+ Fast
+ No token costs
+ Simple
- No natural language
- Must know exact tool names
- Manual filtering needed
```
**Setup:** Use MCP node with exact tool names (see `N8N_DIRECT_SETUP.md`)
---
## š Results You'll See
### Before (Without AI Agent Prompt):
- ā Schema errors
- ā "I don't have access to that"
- ā Wrong tools called
- ā Missing parameters
- ā Unpredictable results
### After (With AI Agent Prompt):
- ā
Understands natural language
- ā
Calls correct tools automatically
- ā
Includes proper parameters
- ā
Handles complex queries
- ā
Provides helpful responses
---
## š Real-World Workflows
### Workflow 1: Daily Availability Check
```
Trigger: Every morning at 8am
AI Agent: "Who is unavailable today due to leave or absence?"
Output: Send to Slack channel
```
### Workflow 2: Project Health Monitor
```
Trigger: Every Monday
AI Agent: "For each active project, check if hours and costs are within budget"
Output: Send report to project managers
```
### Workflow 3: Invoice Follow-up
```
Trigger: Every week
AI Agent: "What invoices are overdue by more than 30 days?"
Output: Create tasks in project management tool
```
### Workflow 4: Team Utilization Report
```
Trigger: End of month
AI Agent: "How many hours did each employee log this month? Compare to target."
Output: Generate report and email to management
```
---
## š” Pro Tips
1. **Start with the MASTER prompt** - It's more comprehensive
2. **Switch to OPTIMIZED if needed** - For token efficiency
3. **Reference Dwayne by name** - The AI knows his ID
4. **Ask follow-up questions** - The AI maintains context
5. **Be specific with dates** - "next week", "this month", "Oct 14-20"
6. **Combine queries** - "Get hours AND costs for project X"
---
## š Testing Your Setup
Run these queries to verify everything works:
### Test 1: Basic List
```
Query: "Show me all employees"
Expected: List of employees with names and IDs
```
### Test 2: Specific Person
```
Query: "Get Dwayne's employee info"
Expected: Dwayne's details (name, email, ID, etc.)
```
### Test 3: Time Range
```
Query: "What hours were logged this week?"
Expected: Hours entries filtered to current week
```
### Test 4: Availability
```
Query: "Is Dwayne available next week?"
Expected: Analysis of leave, absences, schedule ā Yes/No answer
```
### Test 5: Complex
```
Query: "How much have we spent on projects this month?"
Expected: Sum of hours costs + direct costs across all projects
```
---
## š Performance Metrics
### MASTER Prompt
- **Token usage:** ~5,000 tokens per conversation start
- **Response quality:** āāāāā
- **Query success rate:** 95-98%
- **Best for:** Production, complex workflows
### OPTIMIZED Prompt
- **Token usage:** ~1,800 tokens per conversation start
- **Response quality:** āāāā
- **Query success rate:** 90-95%
- **Best for:** High-volume, simple queries
---
## ā
Success Checklist
- [ ] Copied system prompt file
- [ ] Pasted into AI Agent node
- [ ] Enabled Simplicate MCP tools
- [ ] Tested basic query ("Show me employees")
- [ ] Tested smart query ("Is Dwayne available?")
- [ ] Tested complex query ("Project status?")
- [ ] AI responds with actual data (not errors)
- [ ] Responses are conversational and helpful
---
## š You're Ready!
Your AI Agent is now a **Simplicate expert** that can:
ā
Understand natural language about your business
ā
Access all your Simplicate data intelligently
ā
Handle simple to extremely complex queries
ā
Provide helpful, conversational responses
ā
Power sophisticated n8n automation workflows
**Start building amazing workflows!** š
---
## š Need Help?
- **Setup issues?** ā See `SETUP_AI_AGENT.md`
- **Want direct MCP?** ā See `N8N_DIRECT_SETUP.md`
- **Tool reference?** ā See `MCP_TOOL_REFERENCE.md`
- **API status?** ā See `ENDPOINT_STATUS.md`
---
**Remember:** The system prompt is the key that unlocks the AI's intelligence! š