Docs
n8n — let agents control n8n
Status: planned, not yet built. This page describes the spec agents will implement against
(docs/VISION.md §4.3.1, docs/PLAN.md §3 item 3) — nothing on this page works today.
The idea
Right now, connecting AgentPlayground to n8n is one-directional: n8n calls into the app (pushing
content to the Brain — see n8n — connect AgentPlayground to n8n). The planned
feature reverses that: agents create and modify their own n8n workflows — so a team could build
its own automation ("when a form is submitted, notify me and log it") without a human building the
n8n workflow by hand.
Planned tool set
New MCP-layer tools (app/api/mcp/route.ts), each scoped by a permission ring so an agent can only
touch workflows it's allowed to:
n8n_list_workflowsn8n_get_workflown8n_create_workflown8n_update_workflown8n_activate_workflown8n_run_webhook
Planned safety model
- Authenticates to n8n via an
N8N_API_KEYserver-side env var — never exposed to the model itself. - Every workflow change an agent makes gets automatically committed to a config repo so changes are inspectable and reversible (forensics via
git log, recovery viagit revert) — a human can always see exactly what an agent changed and undo it. - Each tool declares its own permission ring (starting at GREEN for a team's own workflows) — the ring lives in the tool layer, not just in a prompt instruction, so it can't be talked around.
- Workflows stay visible and editable by a human in n8n's own UI at all times — agents are meant to extend n8n, not replace the ability to look at and change things yourself.
- n8n — connect AgentPlayground to n8n — the real, working direction today
- n8n compatibility guidelines — also planned