- Design n8n as an integration layer for agents.
- Separate triggers, tools, approvals, and logs.
- Prepare a workflow compatible with local or cloud models.
Base workflow in n8n
Webhook o Email Trigger -> Normalizar entrada -> AI Agent o HTTP Request a LangGraph -> Switch por riesgo -> Crear borrador / pedir aprobación / rechazar -> Guardar log -> Notificar resultado
Tool contracts
Each tool must define input, output, and limits. Example:
tool: create_email_draft input: to: email subject: string body: string output: draft_id: string forbidden: - send_without_approval - attach_private_files