DAG and Topological sort to reduce unnecessary reasoning by LLMs

This paper presents a novel orchestration architecture for multi-agent AI systems, specifically the OctaMind system. It replaces the traditional iterative ReAct loop with a "plan once, sort, execute deterministically" pattern. By invoking an LLM exactly once to construct a Directed Acyclic Graph (DAG) and using Kahn's topological sort for sequencing, the system reduces orchestration LLM calls by up to 70% on complex tasks. The architecture features a two-level design: a macro-DAG planner for routing tasks across heterogeneous agents and a micro-DAG engine for individual tool calls within sub-agents. Performance Metrics: Reduces LLM calls by 58–85% on multi-step workflows. Topological sort time: <0.1 ms. Planning success rate for single-agent tasks: ~98%.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-03-08
DOI
https://doi.org/10.5281/zenodo.19023191
Primary Topic
AI-based Problem Solving and Planning
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

DAG and Topological sort to reduce unnecessary reasoning by LLMs

Hrishikesh Maluskar
Zenodo (CERN European Organization for Nuclear Research)
AI-based Problem Solving and Planning
article

DAG and Topological sort to reduce unnecessary reasoning by LLMs

Hrishikesh Maluskar
article en

Abstract

This paper presents a novel orchestration architecture for multi-agent AI systems, specifically the OctaMind system. It replaces the traditional iterative ReAct loop with a "plan once, sort, execute deterministically" pattern. By invoking an LLM exactly once to construct a Directed Acyclic Graph (DAG) and using Kahn's topological sort for sequencing, the system reduces orchestration LLM calls by up to 70% on complex tasks. The architecture features a two-level design: a macro-DAG planner for routing tasks across heterogeneous agents and a micro-DAG engine for individual tool calls within sub-agents. Performance Metrics: Reduces LLM calls by 58–85% on multi-step workflows. Topological sort time: <0.1 ms. Planning success rate for single-agent tasks: ~98%.

Zenodo (CERN European Organization for Nuclear Research)
Openalex Percentile: Top 25%
AI-based Problem Solving and Planning
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.