Reuse-first исследование orchestration engines и patterns: durable execution, Python workflow orchestration, agent-state graphs, Kubernetes-native DAGs и lightweight task queues. Цель — не выбрать победителя по README, а сформировать проверяемый shortlist для практического spike.
ИИшке нужен не «ещё один агентский фреймворк», а надёжный межмодульный control plane: ожидание внешних модулей и человека, retries, durable state, idempotency, stale-input detection, audit и ограничение полномочий.
Framework не получает ownership над canonical IDs, cross-module permissions, verdict gates, stale semantics, context minimization и human approval policy.
Control plane должен быть CPU/RAM-light относительно Qwen 30B. Heavy workloads запускаются отдельными workers/resource classes и throttling.
| Класс | Кандидаты | Что даёт | Главный риск |
|---|---|---|---|
| Durable execution | Temporal | Долгоживущие workflows, retries, recovery, timers/signals, durable state. | Инфраструктурная сложность и более тяжёлый adoption. |
| Python orchestration | Prefect, Dagster | Python-native flows, scheduling, retries, observability. | Data-pipeline assumptions могут не совпасть с inter-agent state machine. |
| Agent-state graph | LangGraph | Stateful agent graphs, human-in-the-loop, durable execution abstractions. | Слишком близко к LLM/agent layer; нельзя отдавать ему system policy. |
| Kubernetes DAG | Argo Workflows | Container-native DAGs и parallel jobs. | Kubernetes dependency; плохой fit, если server2 не K8s-first. |
| Declarative orchestrator | Kestra | Event-driven workflows, plugins, self-hosted control plane. | Declarative/platform model может быть избыточен для внутреннего core. |
| Scheduler / task queue | Airflow, Celery, Dramatiq | Зрелые tasks, queues, retries, scheduling. | Не дают полного durable workflow semantics без нашей state machine. |
MIT-licensed open-source durable execution platform; official self-hosting guide есть. Сильная сторона — workflow state survives crashes/outages, retries и long-running execution являются базовой моделью, а не add-on.
REUSE candidatedurableMIT
Sources: github.com/temporalio/temporal · temporal.io/self-hosted-guide
Apache-2.0; Python workflow orchestration, self-hosted Prefect server, retries, dependencies, branching, event-based automations и work pools. Вероятно проще для быстрого spike и внутренней Python-команды.
ADAPT/REUSEPythonApache-2.0
Sources: github.com/PrefectHQ/prefect · prefect.io/prefect/open-source
Low-level orchestration framework для long-running stateful agents с durable execution и human-in-the-loop. Очень релевантен там, где Qwen должен проходить управляемый graph, но не должен становиться каноническим workflow engine всей ИИшки.
SPECIALISTagent graph
Source: github.com/langchain-ai/langgraph
Open-source Apache-2.0 core, self-hosted Docker/Kubernetes, event-driven declarative orchestration. Полезен как comparator для approvals, audit trail, plugin model и cross-tool workflows.
COMPARATORdeclarativeApache-2.0
Sources: github.com/kestra-io/docs · kestra.io/orchestration
Apache-2.0, зрелая orchestration platform с lineage/observability. Сильна для data assets/pipelines; использовать как comparator, если Orchestration будет тесно связан с data/ML jobs.
Apache-2.0 CNCF project, Kubernetes CRD, DAG/container workflows. Отличен для heavy container jobs, но не как обязательный core на одиночном server2 без K8s-first архитектуры.
Apache-2.0, зрелый scheduler/orchestrator. Полезен как reference для DAG/scheduling, но batch/data orientation и scheduler semantics хуже соответствуют интерактивным WAITING_HUMAN / callback workflows.
BSD-3-Clause task queue. Отличный worker primitive, retries и routing, но durable cross-step workflow semantics придётся строить самим.
Надёжная Python task-processing library; LGPL family. Хорош как lightweight queue/worker primitive, но не заменяет orchestration state machine.
Postgres + outbox + queue + workers + explicit state machine. Нужен как контрольный baseline: чтобы понять, оправдывает ли framework собственную сложность.
| Candidate | License | Self-host | Durable wait/recovery | Python fit | HITL fit | Initial role |
|---|---|---|---|---|---|---|
| Temporal | MIT | Yes | Very strong | SDK | Signals/workflow patterns | Finalist A |
| Prefect | Apache-2.0 | Yes | Strong | Excellent | Needs pattern validation | Finalist B |
| LangGraph | Check exact components in doc 3 | Library yes; deployment pieces verify | Agent-durable | Excellent | Strong | Specialist finalist |
| Kestra | Apache-2.0 core | Yes | Strong platform | API/plugin oriented | Approval patterns | Comparator |
| Dagster | Apache-2.0 | Yes | Data-oriented | Excellent | Not primary focus | Comparator |
| Argo Workflows | Apache-2.0 | Yes / K8s | Workflow DAG | External control | Not primary | Heavy-job adapter |
| Celery | BSD-3-Clause | Yes | Not full workflow durability | Excellent | Build ourselves | Queue primitive |
Это research-stage matrix, не итоговый ADR. Все неоднозначные license/security/deployment детали должны быть перепроверены в документе №3 по конкретным версиям и компонентам.
Проверить как основной durable execution backend. Ключевые сценарии: crash recovery, signal/callback wait, idempotent side effects, retry classification, versioning workflows.
Проверить как более лёгкий Python-first backend. Ключевые сценарии: dynamic branching, event wait, retries, pause/resume, self-host footprint, integration effort.
Проверить не как владельца global orchestration, а как optional inner-agent graph runtime для Qwen-driven steps с checkpoints/HITL.
Минимальный Postgres state machine + transactional outbox + queue. Без baseline нельзя понять, сколько сложности реально экономит внешний engine.
| Project | Source | Observed |
|---|---|---|
| Temporal | github.com/temporalio/temporal; temporal.io | MIT, open source, self-hosting, durable execution. |
| Prefect | github.com/PrefectHQ/prefect; prefect.io | Apache-2.0, self-hosted server, retries/events/work pools. |
| LangGraph | github.com/langchain-ai/langgraph | Long-running stateful agents, durable execution. |
| Dagster | github.com/dagster-io/dagster | Apache-2.0 data orchestration platform. |
| Argo Workflows | github.com/argoproj/argo-workflows | Apache-2.0, Kubernetes-native workflow engine. |
| Celery | github.com/celery/celery | BSD-3-Clause task queue. |
| Dramatiq | github.com/Bogdanp/dramatiq | Python task processing; LGPL/GPL license metadata requires careful legal review. |
| Kestra | github.com/kestra-io/docs; kestra.io | Apache-2.0 core, self-hosted declarative orchestration. |
PRIMARY FINALISTS Temporal -> durable execution backend candidate Prefect -> Python-first orchestration backend candidate SPECIALIST LangGraph -> inner agent/Qwen graph candidate COMPARATORS / OPTIONAL ADAPTERS Kestra, Dagster, Argo Workflows PRIMITIVES / BASELINE Celery or similar queue Postgres + outbox + explicit state machine