How jamestrichmond/n8n works
n8n is a visual workflow-automation platform with AI-agent capabilities, integrations, and self-hosted or cloud deployment. The principal journey is to design a workflow in the editor, configure its steps and connections, then run it to automate work across services; AI workflows add model, tool, and memory capabilities. The graph also includes app hosting and workflow-governance branches visible in the repository. Evidence is limited to the README, tree, and supplied excerpts/index, so unverified runtime links are omitted or marked dashed.
Main entry points: agent-runtime.ts Agent runtime · engine/src Workflow engine · apps.service.ts App lifecycle · editor-ui/src Workflow builder
Components 26
Workflow design
- Workflow builder
packages/frontend/editor-ui/src - Node catalog search
packages/@n8n/ai-utilities/src/node-catalog/search-engine.ts
Execution runtime
- Workflow engine
packages/@n8n/engine/src - Execution queries
packages/@n8n/engine/src/execution/execution-query.service.ts - Service integrations
packages/nodes-base/nodes
AI capabilities
- Agent runtime
packages/@n8n/agents/src/runtime/loop/agent-runtime.ts - Agent tools
packages/@n8n/agents/src/runtime/tools/tool-call-runner.ts - Model providers
packages/@n8n/agents/src/runtime/model/model-factory.ts - Agent memory
packages/@n8n/agents/src/runtime/memory/memory-orchestrator.ts - AI guardrails
packages/@n8n/ai-utilities/src/guardrails - Vector stores
packages/@n8n/agents/src/vector-stores
Governance and apps
- App API
packages/modules/apps/backend/src/apps.controller.ts - App lifecycle
packages/modules/apps/backend/src/apps.service.ts - App persistence
packages/modules/apps/backend/src/app.repository.ts - App versions
packages/modules/apps/backend/src/versions/app-version.repository.ts - App hosting
packages/modules/apps/backend/src/serving/app-host.service.ts - Breaking-change analysis
packages/cli/src/modules/breaking-changes/breaking-changes.service.ts - Finding queries
packages/cli/src/modules/breaking-changes/query/migration-finding-query.service.ts - Migration registry
packages/cli/src/modules/breaking-changes/breaking-changes.migration-registry.service.ts - Rule registry
packages/cli/src/modules/breaking-changes/breaking-changes.rule-registry.service.ts - Finding persistence
packages/cli/src/modules/breaking-changes/database/repositories/migration-finding.repository.ts - Dependency analysis
packages/cli/src/modules/workflow-index/workflow-dependency-query.service.ts - Review authorization
packages/cli/src/modules/workflow-reviews.ee/workflow-review-authorization.service.ts
Other components
- Workflow author
- Connected services
- Model services
Connections 23
- Workflow author → Workflow builder: designs
- Workflow builder → Node catalog search: searches nodes
- Workflow builder → Workflow engine: runs workflows
- Workflow engine → Service integrations: executes steps
- Workflow engine → Execution queries: queries executions
packages/@n8n/engine/src/execution/execution-query.service.ts - Workflow engine → Agent runtime: runs agents
- Agent runtime → Agent tools: dispatches tools
- Agent runtime → Model providers: calls models
- Model providers → Model services: requests completion
- Agent runtime → Agent memory: uses memory
- Agent runtime → AI guardrails: applies checks
- Agent runtime → Vector stores: uses retrieval
- Connected services → Service integrations: integrates with
- Workflow author → App API: manages apps
- App API → App lifecycle: delegates
packages/modules/apps/backend/src/apps.controller.ts - App lifecycle → App persistence: persists apps
packages/modules/apps/backend/src/apps.service.ts - App lifecycle → App versions: manages versions
packages/modules/apps/backend/src/apps.service.ts - App lifecycle → App hosting: serves app URLs
packages/modules/apps/backend/src/apps.service.ts - Finding queries → Breaking-change analysis: queries findings
packages/cli/src/modules/breaking-changes/query/migration-finding-query.service.ts - Finding queries → Finding persistence: reads findings
packages/cli/src/modules/breaking-changes/query/migration-finding-query.service.ts - Breaking-change analysis → Migration registry: uses migrations
packages/cli/src/modules/breaking-changes/breaking-changes.service.ts - Breaking-change analysis → Rule registry: uses rules
packages/cli/src/modules/breaking-changes/breaking-changes.service.ts - Review authorization → Workflow author: authorizes review