Automated Multi-Agent Workflows with Claude Code + ekkOS
Automated Multi-Agent Workflows with Claude Code + ekkOS
Someone on Reddit nailed the problem:
"I want Agent 1 to implement a feature (can run 3-4 hours), then Agent 2 to review the code automatically when it's done. The key requirement: I don't want to sit at my computer. But there's no obvious way for Agent 2 to 'start itself.' Something has to trigger it."
They're right. Multi-agent workflows in Claude Code, Cursor, and Windsurf are manual by default. You can spin up agents, but you have to babysit them. No native orchestration. No automatic chaining.
This is the orchestration gap—and it's why "multi-agent workflows" often means "manually triggering agents in sequence."
ekkOS fixes this. Here's how to build fully automated agent chains that run while you're away.
The Problem: No Native Orchestration
Claude Code is local-first. Brilliant for privacy and control, but it means:
- Sessions are terminal-bound — close the terminal, lose the agent
- No background execution — agents can't run while you do other work
- No event-driven triggers — Agent 1 can't automatically launch Agent 2
- No cross-device continuity — start on your laptop, can't resume on desktop
You can manually chain agents by running them sequentially, but that defeats the purpose. If you wanted to manually trigger things, you'd just do the work yourself.
What people actually want:
Agent 1 (builder) → runs for 3 hours → finishes
↓
Agent 2 (reviewer) → auto-starts
What they're stuck with:
Agent 1 (builder) → runs for 3 hours → finishes
↓
[you manually start Agent 2]
The Solution: ekkOS Remote Triggers
ekkOS adds a cloud orchestration layer on top of local-first tools. Agents run remotely (on the ekkOS platform), which means:
- ✅ Background execution (close your laptop, agent keeps running)
- ✅ Event-driven triggers (Agent 1 completion → Agent 2 start)
- ✅ Cross-device access (start on laptop, check results on phone)
- ✅ No third-party orchestration tools (uses your existing ekkOS setup)
The architecture:
┌──────────────────────────────────────────────────┐
│ Your Machine (you walk away) │
│ │
│ Trigger Agent 1 → runs remotely │
└──────────────────────────────────────────────────┘
↓
┌──────────────────────────────────────────────────┐
│ ekkOS Platform (api.ekkos.dev) │
│ │
│ Agent 1: Implements feature (3 hours) │
│ ├─ Commits to feature branch │
│ └─ Fires completion event │
│ ↓ │
│ Agent 2: Reviews implementation (auto-starts) │
│ ├─ Pulls latest code │
│ ├─ Runs review │
│ └─ Posts PR comments │
└──────────────────────────────────────────────────┘
↓
┌──────────────────────────────────────────────────┐
│ Notification (email/Slack/webhook) │
│ "Both agents finished. Review ready." │
└──────────────────────────────────────────────────┘
Tutorial: Build Your First Automated Workflow
Use Case: Implement + Review Flow
You want:
- Builder agent — implements OAuth integration
- Reviewer agent — reviews the code when builder finishes
- No manual intervention — both run automatically
Step 1: Set Up Your Repo
Make sure you have:
- Claude Code installed with ekkOS configured
- Git repository initialized
- Working branch checked out
cd ~/projects/my-app
git checkout -b feature/oauth-integration
Step 2: Create the Builder Agent
In Claude Code:
claude
# In the chat:
> I need to implement OAuth 2.0 login flow with Google.
> Create the auth routes, token exchange, and session management.
> Run this as a remote agent and trigger a review when done.
/schedule create "OAuth Implementation" \
--prompt "Implement OAuth 2.0 login flow with Google" \
--on-complete "trigger-review" \
--background
What happens:
- ekkOS creates a remote agent session
- Agent runs on the platform (not your local machine)
- You get a session ID:
remote-abc123
Step 3: Define the Review Agent
Create a review trigger:
# Still in claude chat:
> Create a review agent that triggers when OAuth implementation finishes
/schedule create "Code Review" \
--prompt "Review the OAuth implementation for security issues, edge cases, and code quality" \
--trigger-on "remote-abc123:complete" \
--post-to "github:pr-comment"
What happens:
- ekkOS registers a conditional trigger
- Waits for
remote-abc123to emitcompleteevent - Automatically starts the review agent
Step 4: Walk Away
Literally. Close your laptop. Go for coffee. The agents are running remotely.
Progress updates (via webhook/email):
10:15 AM - Agent 1 started
10:47 AM - Agent 1: Created auth routes
11:23 AM - Agent 1: Token exchange implemented
12:08 PM - Agent 1: Session management complete
12:15 PM - Agent 1: Committed changes, pushed to branch
12:15 PM - Agent 2 triggered (auto-start)
12:42 PM - Agent 2: Review complete, posted to PR
Step 5: Review the Results
Check your GitHub PR:
# Agent 1 created:
- routes/auth/google.ts
- lib/oauth/token-exchange.ts
- middleware/session.ts
- tests/auth.test.ts
# Agent 2 posted review comments:
✅ Security: PKCE flow implemented correctly
⚠️ Edge case: Handle token refresh failure
⚠️ Missing: Rate limiting on auth endpoints
✅ Tests: 94% coverage
Advanced Workflows
Multi-Stage Pipeline
Chain more than two agents:
# Agent 1: Implement feature
/schedule create "Implementation" \
--prompt "Implement feature X" \
--on-complete "trigger-tests"
# Agent 2: Run tests
/schedule create "Testing" \
--prompt "Write comprehensive tests" \
--trigger-on "implementation:complete" \
--on-complete "trigger-review"
# Agent 3: Review
/schedule create "Review" \
--prompt "Review implementation and tests" \
--trigger-on "testing:complete" \
--post-to "github:pr-comment"
Flow:
Implement → Test → Review (fully automatic)
Parallel Agents with Sync Point
Run agents in parallel, then merge results:
# Agent 1: Frontend
/schedule create "Frontend Work" \
--prompt "Build the UI components" \
--on-complete "mark-frontend-done"
# Agent 2: Backend
/schedule create "Backend Work" \
--prompt "Build the API endpoints" \
--on-complete "mark-backend-done"
# Agent 3: Integration (waits for both)
/schedule create "Integration" \
--prompt "Integrate frontend and backend" \
--trigger-on "frontend-done,backend-done" \
--require-all
Flow:
Frontend ──┐
├─→ Integration
Backend ───┘
Time-Based + Event-Based Hybrid
Combine cron scheduling with event triggers:
# Runs every day at 9am
/schedule create "Daily Feature Work" \
--cron "0 9 * * *" \
--prompt "Continue implementing feature X" \
--on-complete "trigger-review"
# Runs whenever daily work finishes
/schedule create "Daily Review" \
--prompt "Review today's changes" \
--trigger-on "daily-feature-work:complete"
How It Works Under the Hood
Remote Execution
When you create a scheduled agent:
- ekkOS platform receives your prompt + trigger config
- Spawns a remote session (isolated environment with your repo context)
- Agent runs with full access to your codebase via git
- Commits changes to the branch you specified
- Fires completion event when done
Event System
// Agent 1 finishes
emit('agent:complete', {
agentId: 'remote-abc123',
branch: 'feature/oauth',
commits: ['a1b2c3d', 'e4f5g6h'],
status: 'success'
});
// ekkOS checks registered triggers
triggers.filter(t => t.condition === 'remote-abc123:complete')
.forEach(trigger => {
// Start Agent 2
spawn(trigger.agentConfig);
});
Context Sharing
Agents share context through:
- Git commits (code changes)
- ekkOS memory (patterns, directives, learned knowledge)
- Metadata (what the previous agent did, why it made certain choices)
Agent 2 doesn't just see the code—it sees why Agent 1 made those decisions.
Why This Isn't "Just Another Orchestration Tool"
Typical orchestration tools (Airflow, n8n, Zapier):
- Generic workflow engines
- Don't understand code or AI context
- Require separate configuration
- No access to ekkOS memory
ekkOS remote triggers:
- Built specifically for AI agent workflows
- Full access to codebase context + memory
- Uses your existing Claude Code setup
- Respects your directives and learned patterns
Security concerns?
The Reddit poster said: "No third-party CLI tools unless really safe."
ekkOS remote triggers:
- ✅ Run in your repo's context (read-only clone)
- ✅ Use your existing auth (GitHub OAuth)
- ✅ Respect your git permissions (can't push to protected branches)
- ✅ All code changes go through PRs (same as manual work)
- ✅ Audit log of every agent action
If you trust Claude Code locally, remote execution is the same—just not tied to your terminal.
Real-World Use Cases
1. Overnight Feature Development
# Before bed:
/schedule create "Build Feature X" \
--prompt "Implement the dashboard redesign from specs.md" \
--on-complete "trigger-review" \
--background
# Wake up to:
# - Feature implemented
# - Tests written
# - Review completed
# - PR ready for your final check
2. Multi-Timezone Team Coordination
# Your morning (9am EST):
/schedule create "Backend API" \
--prompt "Build the user management API" \
--on-complete "trigger-frontend"
# Their morning (9am GMT, 4am EST):
/schedule create "Frontend Integration" \
--trigger-on "backend-api:complete" \
--prompt "Integrate the new API endpoints"
# Continuous handoff without overlap
3. Test-Driven Development at Scale
# Write tests first:
/schedule create "Test Suite" \
--prompt "Write comprehensive tests for feature X based on specs" \
--on-complete "trigger-implementation"
# Implement to pass tests:
/schedule create "Implementation" \
--trigger-on "test-suite:complete" \
--prompt "Implement feature X to pass all tests" \
--on-complete "trigger-review"
# Review everything:
/schedule create "Final Review" \
--trigger-on "implementation:complete" \
--prompt "Review tests and implementation for quality"
Getting Started
Prerequisites
- Claude Code with ekkOS configured
- ekkOS account (free tier supports 10 remote agents/month)
- Git repository (GitHub, GitLab, or Bitbucket)
Installation
# Already using ekkOS?
# Remote triggers are included—no additional setup
# New to ekkOS?
npm install -g @ekkos/cli
ekkos init
ekkos auth login
Your First Workflow
claude
# In chat:
> Create a remote agent that implements feature X,
> then automatically triggers a review when done.
# ekkOS handles the rest
Common Patterns
Safe Deployment Pipeline
# 1. Implement
/schedule create "Feature Work" \
--prompt "Implement feature" \
--on-complete "trigger-tests"
# 2. Test
/schedule create "Testing" \
--trigger-on "feature-work:complete" \
--prompt "Write and run comprehensive tests" \
--on-complete "trigger-review"
# 3. Review
/schedule create "Review" \
--trigger-on "testing:complete" \
--prompt "Review for security and quality" \
--on-complete "trigger-staging-deploy"
# 4. Deploy to staging
/schedule create "Staging Deploy" \
--trigger-on "review:complete" \
--prompt "Deploy to staging if review passes"
Research + Summarize
# Agent 1: Deep research
/schedule create "Research Agent" \
--prompt "Research best practices for X, analyze 10+ sources" \
--on-complete "trigger-summary"
# Agent 2: Synthesize findings
/schedule create "Summary Agent" \
--trigger-on "research-agent:complete" \
--prompt "Summarize research into actionable recommendations"
Debugging Workflows
Check Agent Status
ekkos agents list
# Output:
ID STATUS STARTED DURATION
remote-abc123 running 10:15 AM 32 mins
remote-def456 waiting - (trigger: abc123:complete)
remote-ghi789 complete 9:00 AM 1h 15m
View Agent Output
ekkos agents logs remote-abc123
# Live tail:
ekkos agents logs remote-abc123 --follow
Cancel Running Agent
ekkos agents cancel remote-abc123
Retry Failed Agent
ekkos agents retry remote-abc123
Limitations & Gotchas
What Works
- ✅ Implementing features, writing tests, refactoring
- ✅ Code reviews, documentation generation
- ✅ Research, analysis, summarization
- ✅ Sequential and parallel workflows
- ✅ Time-based and event-based triggers
What Doesn't (Yet)
- ❌ Interactive debugging (agents can't pause for user input)
- ❌ GUI interactions (remote agents are CLI-only)
- ❌ Real-time collaboration (agents run in isolation)
- ❌ Cross-repo workflows (each agent works in one repo)
Best Practices
- Be specific in prompts — "Implement OAuth with Google" > "Add auth"
- Set time limits —
--timeout 2hprevents runaway agents - Use git branches — Agents should never commit directly to main
- Test triggers first — Run manually before automating
- Monitor first runs — Watch logs until you trust the workflow
Pricing
Free tier:
- 10 remote agent runs/month
- 2 hour max runtime per agent
- 5 concurrent agents
Pro tier ($29/mo):
- 100 remote agent runs/month
- 8 hour max runtime per agent
- 20 concurrent agents
- Priority execution
Team tier ($99/mo):
- Unlimited agent runs
- 24 hour max runtime
- Unlimited concurrent agents
- Shared triggers across team
Conclusion
Multi-agent workflows shouldn't require manual babysitting. With ekkOS remote triggers, you can:
- Chain agents automatically (builder → reviewer → deployer)
- Run agents in background (close your laptop, they keep going)
- Coordinate parallel work (frontend + backend → integration)
- Schedule recurring tasks (daily refactoring, weekly audits)
The Reddit poster asked: "How are you accomplishing this? Reliably."
This is how. No external orchestration. No hacky bash scripts. Just clean, event-driven agent chains that run while you sleep.
Resources
- Documentation: docs.ekkos.dev/remote-triggers
- Examples: github.com/ekkos/agent-workflows
- Community: discord.gg/ekkos
Next: Try the 5-minute quickstart to run your first automated workflow.
ekkOS is the intelligence layer for AI development. Give your IDE permanent memory today.
- Get a free API key at platform.ekkos.dev
- Run
npx @ekkos/mcp-serverin Claude Desktop or Cursor.