Large projects are often overwhelming because it is difficult to break them down into clear, actionable steps and figure out what to do first.
It takes a high-level goal and a list of tasks, then automatically breaks those tasks into smaller steps and ranks them in order of importance.
It turns a messy list of project goals into a clear, prioritized roadmap for action.
It was run inside an isolated container with no network access. This is the exact command and the real output it produced — captured process output, not written by a model.
$ python3 multi_agent_task_decomposer.py Prioritized Tasks: - Subtask 1: Processed Subtask 1 with findings... - Subtask 2: Processed Subtask 2 with findings... - Subtask 3: Processed Subtask 3 with findings...
A screenshot of that run.
A clean run proves this does what is shown above, in a CPU-only sandbox. It is a small research demo — not a production tool, and nothing here was published anywhere.
All of it — 48 lines, one file, standard library only.
# Multi-Agent Task Decomposition & Ranking Script
import sys
from dataclasses import dataclass
from typing import List, Dict
from abc import ABC, abstractmethod
class TaskAgent(ABC):
@abstractmethod
def process(self, task: str) -> Dict:
pass
class DecomposerAgent(TaskAgent):
def process(self, goal: str) -> List[str]:
# Mock decomposition: split goal into subtasks
return [f"Subtask {i+1}" for i in range(3)]
class MapReduceAgent(TaskAgent):
def process(self, task: str) -> Dict:
# Mock map-reduce processing
return {"task": task, "analysis": f"Processed {task} with findings..."}
class RankerAgent(TaskAgent):
def process(self, results: List[Dict]) -> List[Dict]:
# Mock ranking based on analysis length
return sorted(results, key=lambda x: len(x['analysis']), reverse=True)
def main():
goal = "Develop AI-powered task management system"
# Initialize agents
decomposer = DecomposerAgent()
map_reduce = MapReduceAgent()
ranker = RankerAgent()
# Decompose goal into tasks
tasks = decomposer.process(goal)
# Process tasks in parallel (Map)
processed = [map_reduce.process(task) for task in tasks]
# Rank results (Reduce)
ranked_tasks = ranker.process(processed)
# Output prioritized tasks
print("Prioritized Tasks:")
for task in ranked_tasks:
print(f"- {task['task']}: {task['analysis']}")
if __name__ == "__main__":
main()