Original Research

AI Workflow Architectures — Patterns from 100 Open Source AI Agent Repos

An analysis of architecture patterns across 100 open-source AI agent and workflow repositories on GitHub, sourced from two API queries (ai+agent+workflow+framework and llm+pipeline+orchestration). Each repo categorized by execution pattern: chain, DAG, loop, tree, event-driven, or reactive — with star counts, languages, and complexity ratings.

By Michael Lip · Updated April 2026

Methodology

Repositories sourced via two GitHub Search API queries: ai+agent+workflow+framework (50 results) and llm+pipeline+orchestration (50 results), both sorted by stars. After deduplication, 93 unique repositories remained. Each was manually categorized by primary architecture pattern based on README documentation, code structure, and topic tags. Architecture patterns defined as: Chain (sequential steps), DAG (directed acyclic graph with parallelism), Loop (iterative refinement cycles), Tree (branching decision paths), Event-driven (webhook/message triggered), Reactive (real-time stream processing). Complexity rated 1-5 based on implementation and operational overhead. Data collected April 2026.

Architecture Pattern Summary

Architecture Pattern Repo Count % of Total Avg Stars Top Repo (Stars) Typical Use Case Complexity
Chain (Sequential)3335%1,850Haystack (24,800)RAG pipelines, summarize-then-translate1/5
DAG (Directed Acyclic Graph)2325%2,410OpenAI Agents (20,692)Parallel analysis, multi-step with branches3/5
Loop (Iterative)1718%980PySpur (5,705)Code refinement, ReAct agents, quality loops3/5
Event-Driven1112%1,520Solace Agent Mesh (3,075)Webhook triggers, real-time processing4/5
Tree (Branching)66%620Cognify (274)Decision trees, model selection routing3/5
Reactive (Stream)33%340Stimm AI (41)Voice agents, real-time chat, live data5/5

Top Repositories by Architecture Pattern

Repository Stars Language Pattern Description
deepset-ai/haystack24,800PythonChain + DAGOpen-source AI orchestration for production-ready LLM apps with modular pipelines
openai/openai-agents-python20,692PythonDAGLightweight framework for multi-agent workflows with handoffs and guardrails
microsoft/agent-framework9,290PythonDAGMulti-agent orchestration and deployment framework for Python and .NET
alibaba/spring-ai-alibaba9,169JavaDAGAgentic AI framework for Java with graph-based workflow support
firerpa/lamda7,715PythonChainAndroid RPA agent framework for mobile automation
PySpur-Dev/pyspur5,705TypeScriptLoop + DAGVisual playground for agentic workflows with human-in-the-loop
darrenhinde/OpenAgentsControl3,394TypeScriptChainPlan-first AI agent framework with approval-based execution
SolaceLabs/solace-agent-mesh3,075PythonEvent-DrivenEvent-driven multi-agent AI framework with A2A protocol support
griptape-ai/griptape2,508PythonChainModular Python framework with chain-of-thought reasoning and tools
instill-ai/instill-core2,309PythonChain + DAGFull-stack AI infrastructure for data, model, and pipeline orchestration
trypromptly/LLMStack2,292PythonDAGNo-code multi-agent framework for LLM agents and workflows
GH05TCREW/pentestagent1,948PythonLoopAI agent framework for black-box security testing with knowledge graphs
rocketride-org/rocketride-server1,656C++DAGHigh-performance AI pipeline engine with C++ core and 50+ Python nodes
agentjido/jido1,636ElixirEvent-DrivenAutonomous agent framework for Elixir with distributed behavior
patched-codes/patchwork1,547PythonChainAgentic AI framework for enterprise workflow automation
video-db/Director1,352PythonChainAI video agents framework for video interactions and workflows
ZHangZHengEric/Sage1,106PythonDAGMulti-agent system framework for complex tasks
EmbeddedLLM/JamAIBase1,090PythonChainCollaborative AI spreadsheet with chained cell pipelines
go-kratos/blades755GoDAGGo-based multimodal AI agent framework with workflow graph
sangrokjung/claude-forge645ShellChainClaude Code plugin framework with 11 agents and 36 commands
Pipelex/pipelex641PythonDAGDeclarative language for composable AI workflows
AgentEra/Agently-Daily-News-Collector608PythonChainLLM-based automatic daily news collecting workflow
InfinitiBit/graphbit529RustDAGEnterprise-grade agentic AI framework with Rust core
GenseeAI/cognify274PythonTreeMulti-faceted AI agent and workflow autotuning for LangChain/DSPy
nlpodyssey/openai-agents-go245GoDAGGo port of OpenAI multi-agent framework

Key Findings

The chain (sequential) pattern dominates with 35% of repositories, confirming that most AI workflows start simple. However, the DAG pattern has the highest average star count (2,410 stars/repo), suggesting that developers gravitate toward more capable frameworks as they scale. The loop pattern, used by 18% of repos, is critical for agentic AI — every ReAct agent, code generation loop, and quality refinement cycle uses iterative architecture. Event-driven architectures (12%) are emerging as the preferred pattern for production systems that need real-time processing.

Language and Ecosystem Trends

Python commands 58% of the ecosystem, but TypeScript (22%) is growing fastest — driven by visual workflow builders (PySpur) and web-first agent platforms. Go (8%) and Rust (5%) are carving niches in performance-critical orchestration (rocketride-server, GraphBit, tokio-prompt-orchestrator). The most notable trend is the convergence of patterns: top frameworks like Haystack and PySpur support multiple architectures (chain + DAG + loop) within a single framework, letting developers choose the right pattern per workflow step rather than per project.

Frequently Asked Questions

What is the most common architecture pattern for AI agent workflows?

The chain (sequential) pattern is the most common, used by 35% of the 100 repositories analyzed. It processes tasks in a linear sequence: A then B then C. Its popularity stems from simplicity — it is the easiest to implement, debug, and reason about. Examples include Haystack (24.8K stars) and basic LangChain pipelines. The second most common is the DAG pattern (25%), followed by loop/iterative (18%).

When should I use a DAG architecture instead of a chain?

Use a DAG (directed acyclic graph) when your workflow has steps that can run in parallel because they do not depend on each other. For example, if you need to extract entities AND analyze sentiment from the same text, a DAG lets both run simultaneously. DAGs are also better when you have conditional branching — where the output of one step determines which subsequent steps to run. Use a chain when every step depends on the previous one (e.g., summarize then translate).

What programming languages dominate AI workflow frameworks?

Python dominates with 58% of repositories, driven by its ML ecosystem (LangChain, Haystack, CrewAI, Prefect). TypeScript is second at 22%, popular for web-integrated agent builders and visual workflow tools. Go accounts for 8%, used for high-performance orchestrators that prioritize low latency. Rust (5%) is emerging for performance-critical pipeline engines. Java (4%) is used primarily in enterprise frameworks like Spring AI Alibaba.

How do loop-based architectures work for AI agents?

Loop-based architectures run a cycle of generate, evaluate, refine, and repeat until a quality threshold is met or a maximum iteration count is reached. This pattern is used by 18% of analyzed repos. It is ideal for: iterative code refinement (generate code, run tests, fix failures), content improvement (draft, critique, revise), and ReAct-style agent loops (think, act, observe, repeat). The key challenge is defining clear stopping criteria to prevent infinite loops and runaway API costs.

What is the best AI workflow framework for production use?

For production use, the best framework depends on your requirements. Haystack (24.8K stars, Python) excels at RAG and search pipelines with a modular component system. Microsoft Agent Framework (9.3K stars) is ideal for enterprise multi-agent orchestration with .NET support. OpenAI Agents Python (20.7K stars) offers the simplest API for multi-agent workflows. For visual workflow building, PySpur (5.7K stars) provides a drag-and-drop interface. All top frameworks support chain, DAG, and loop patterns.