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) | 33 | 35% | 1,850 | Haystack (24,800) | RAG pipelines, summarize-then-translate | 1/5 |
| DAG (Directed Acyclic Graph) | 23 | 25% | 2,410 | OpenAI Agents (20,692) | Parallel analysis, multi-step with branches | 3/5 |
| Loop (Iterative) | 17 | 18% | 980 | PySpur (5,705) | Code refinement, ReAct agents, quality loops | 3/5 |
| Event-Driven | 11 | 12% | 1,520 | Solace Agent Mesh (3,075) | Webhook triggers, real-time processing | 4/5 |
| Tree (Branching) | 6 | 6% | 620 | Cognify (274) | Decision trees, model selection routing | 3/5 |
| Reactive (Stream) | 3 | 3% | 340 | Stimm AI (41) | Voice agents, real-time chat, live data | 5/5 |
Top Repositories by Architecture Pattern
| Repository | Stars | Language | Pattern | Description |
|---|---|---|---|---|
| deepset-ai/haystack | 24,800 | Python | Chain + DAG | Open-source AI orchestration for production-ready LLM apps with modular pipelines |
| openai/openai-agents-python | 20,692 | Python | DAG | Lightweight framework for multi-agent workflows with handoffs and guardrails |
| microsoft/agent-framework | 9,290 | Python | DAG | Multi-agent orchestration and deployment framework for Python and .NET |
| alibaba/spring-ai-alibaba | 9,169 | Java | DAG | Agentic AI framework for Java with graph-based workflow support |
| firerpa/lamda | 7,715 | Python | Chain | Android RPA agent framework for mobile automation |
| PySpur-Dev/pyspur | 5,705 | TypeScript | Loop + DAG | Visual playground for agentic workflows with human-in-the-loop |
| darrenhinde/OpenAgentsControl | 3,394 | TypeScript | Chain | Plan-first AI agent framework with approval-based execution |
| SolaceLabs/solace-agent-mesh | 3,075 | Python | Event-Driven | Event-driven multi-agent AI framework with A2A protocol support |
| griptape-ai/griptape | 2,508 | Python | Chain | Modular Python framework with chain-of-thought reasoning and tools |
| instill-ai/instill-core | 2,309 | Python | Chain + DAG | Full-stack AI infrastructure for data, model, and pipeline orchestration |
| trypromptly/LLMStack | 2,292 | Python | DAG | No-code multi-agent framework for LLM agents and workflows |
| GH05TCREW/pentestagent | 1,948 | Python | Loop | AI agent framework for black-box security testing with knowledge graphs |
| rocketride-org/rocketride-server | 1,656 | C++ | DAG | High-performance AI pipeline engine with C++ core and 50+ Python nodes |
| agentjido/jido | 1,636 | Elixir | Event-Driven | Autonomous agent framework for Elixir with distributed behavior |
| patched-codes/patchwork | 1,547 | Python | Chain | Agentic AI framework for enterprise workflow automation |
| video-db/Director | 1,352 | Python | Chain | AI video agents framework for video interactions and workflows |
| ZHangZHengEric/Sage | 1,106 | Python | DAG | Multi-agent system framework for complex tasks |
| EmbeddedLLM/JamAIBase | 1,090 | Python | Chain | Collaborative AI spreadsheet with chained cell pipelines |
| go-kratos/blades | 755 | Go | DAG | Go-based multimodal AI agent framework with workflow graph |
| sangrokjung/claude-forge | 645 | Shell | Chain | Claude Code plugin framework with 11 agents and 36 commands |
| Pipelex/pipelex | 641 | Python | DAG | Declarative language for composable AI workflows |
| AgentEra/Agently-Daily-News-Collector | 608 | Python | Chain | LLM-based automatic daily news collecting workflow |
| InfinitiBit/graphbit | 529 | Rust | DAG | Enterprise-grade agentic AI framework with Rust core |
| GenseeAI/cognify | 274 | Python | Tree | Multi-faceted AI agent and workflow autotuning for LangChain/DSPy |
| nlpodyssey/openai-agents-go | 245 | Go | DAG | Go 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.