AI Agents
Two Automation Layers
Section titled “Two Automation Layers”Cloudflare Workflows (Deterministic)
Section titled “Cloudflare Workflows (Deterministic)”Durable multi-step tasks that don’t require AI reasoning:
- Create accounts across Google, Slack, Xero, Productive, Notion
- Send onboarding emails in sequence
- Provision access and set up project structures
Mastra.ai Agents (Autonomous)
Section titled “Mastra.ai Agents (Autonomous)”AI agents that reason, analyze, and act:
- Deploy to Cloudflare Workers alongside the existing app
- Use Anthropic SDK for LLM reasoning
- Share the D1 database with the web app
Planned Agents
Section titled “Planned Agents”Resourcing Agent
Section titled “Resourcing Agent”- Trigger: Cron (hourly)
- Reads: Productive projects, tasks, time entries, historical patterns
- Analyzes: Capacity, utilisation trends, upcoming deadlines
- Proposes: Schedule changes to an approval queue
- Executes: Approved changes via Productive API
Onboarding Agent
Section titled “Onboarding Agent”- Trigger: Admin action (new employee added)
- Reads: Client brief, team capacity
- Proposes: Project plan + resource allocation
- Executes: Account provisioning via Cloudflare Workflows
Scheduling Agent
Section titled “Scheduling Agent”- Trigger: Client communications (Slack, email)
- Monitors: Priority changes, urgency signals
- Adjusts: Timelines and priorities
- Flags: Conflicts and over-allocations
Tech Stack
Section titled “Tech Stack”| Component | Purpose |
|---|---|
Mastra (mastra) | Agent framework with tool use, memory, RAG |
| Anthropic SDK | LLM provider for reasoning |
| Cloudflare Workflows | Durable deterministic step execution |
| D1 | Shared database with web app |
| Cron Triggers | Periodic agent runs |
Timeline
Section titled “Timeline”Post-MVP. First: employee onboarding workflow (Cloudflare Workflows), then resourcing agent (Mastra).