Published March 8, 2026 | Version v2
Working paper Open

DAG and Topological sort to reduce unnecessary reasoning by LLMs

Description

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:

  1. Reduces LLM calls by 58–85% on multi-step workflows.
  2. Topological sort time: <0.1 ms.
  3. Planning success rate for single-agent tasks: ~98%.

Files

LLM_DAG_Orchestration.pdf

Files (69.5 kB)

Name Size Download all
md5:ea83a709ad89629ec7f63d185a9a7ec9
69.5 kB Preview Download

Additional details

Dates

Available
2026-03-08

Software

Repository URL
https://github.com/maluskarhrishikesh-afk/OctaMind
Programming language
Python
Development Status
Active

References

  • Yao, S., et al. (2022). ReAct: Synergizing Reasoning and Acting in Language Models.
  • Wang, G., et al. (2023). Voyager: An Open-Ended Embodied Agent.
  • Kahn, A. B. (1962). Topological sorting of large networks.