How kestra-io/kestra works
Kestra is an event-driven orchestration platform for data, AI, and infrastructure workflows. The main path is defining a flow, triggering an execution, coordinating task and worker execution, and retaining execution artifacts and state. The README also describes Git-oriented flow management, plugins, AI agents/RAG, and MCP; these appear as capability branches where the tree supports paths. Several links reflect documented product behavior rather than inspected call sites, since most implementation excerpts were partial or absent.
Main entry points: McpSessionService.java MCP session service · GrpcWorkerControllerService.java Worker control plane · Execution.java Execution records · ExecutorService.java Execution coordinator
Components 19
Flow authoring
- CLI commands
cli/src/main/java/io/kestra/cli/commands/flows/FlowCommand.java - Flow definition
core/src/main/java/io/kestra/core/models/flows/Flow.java - Source search and replace
webserver/src/main/java/io/kestra/webserver/services/SourceSearchService.java - Web server API
webserver/src/main/java/io/kestra/webserver
Orchestration
- Scheduling and triggers
cli/src/main/java/io/kestra/cli/commands/servers/SchedulerCommand.java - Execution records
core/src/main/java/io/kestra/core/models/executions/Execution.java - Execution coordinator
executor/src/main/java/io/kestra/executor/ExecutorService.java
Task execution
- Worker control plane
worker-controller/src/main/java/io/kestra/controller/grpc/services/GrpcWorkerControllerService.java - Task workers
cli/src/main/java/io/kestra/cli/commands/servers/WorkerCommand.java - Plugin ecosystem
core/src/main/java/io/kestra/core/app/AppPluginInterface.java
State and storage
- Scoped storage paths
core/src/main/java/io/kestra/core/storages/StorageContext.java - Execution storage
core/src/main/java/io/kestra/core/services/StorageService.java - Storage cleanup
core/src/main/java/io/kestra/core/services/StoragePurgeService.java - Worker job state
core/src/main/java/io/kestra/core/executor/WorkerJobRunningStateStore.java
AI integrations
- AI agent models
core/src/main/java/io/kestra/core/ai/agent/models/AgentThread.java - MCP session service
webserver/src/main/java/io/kestra/mcp/McpSessionService.java - MCP server models
core/src/main/java/io/kestra/core/mcp/models/McpServer.java
Other components
- User or client
- MCP-compatible agent
Connections 18
- User or client → CLI commands: issues commands
- User or client → Web server API: uses API
- CLI commands → Flow definition: manages flows
- Web server API → Source search and replace: searches and edits
- Flow definition → Scheduling and triggers: defines triggers
- Scheduling and triggers → Execution records: initiates executions
- Execution coordinator → Execution records: coordinates execution
- Worker control plane → Task workers: dispatches jobs
- Worker control plane → Worker job state: persists running jobs
- Execution coordinator → Worker control plane: assigns task work
- Task workers → Plugin ecosystem: runs plugin tasks
- Execution records → Scoped storage paths: scopes artifacts
- Scoped storage paths → Execution storage: builds storage paths
- Execution storage → Storage cleanup: provides stored files
- User or client → AI agent models: uses AI workflows
- MCP-compatible agent → MCP session service: opens MCP session
- MCP session service → MCP server models: manages sessions for
- MCP session service → MCP-compatible agent: serves sessions