multi agent reasoning

Report Abuse

Basic Information

This repository implements a Multi-Agent Reasoning framework that creates an interactive chatbot where multiple AI agents collaborate to generate high-quality answers. It provides two main interaction modes: direct chat with individual agents and a structured multi-agent reasoning flow that includes discussion, verification, critique, refinement, blending, and a user feedback loop. The project integrates the Swarm framework to enable dynamic agent coordination and handoffs, and it uses local JSON files for simple conversation memory and retrieval. The codebase is written for Python 3.10 or higher and is designed to run via a main script named reasoning.py with configuration driven by an agents.json file. The system reports token usage for transparency, supports prompt caching to reduce latency and cost, and includes error handling, logging, and parallel execution primitives to improve reliability and responsiveness.

Links

Categorization

App Details

Features
The README documents a range of practical features implemented in the code. Multi-agent collaboration simulates independent and iterative agent reasoning. Swarm integration enables lightweight agent handoffs and delegation using Agent and Handoff abstractions. Agents are configurable and aware of one another via an agents.json file, and users may chat with individual agents or run swarm-based sessions. Structured reasoning follows clear steps: initial responses, verification, critique, refinement, and response blending. Local JSON memory stores session histories and supports naive keyword matching with optional future embedding plans. Prompt caching stores long prompt prefixes for faster reuse and reduced cost, with caching candidates over 1,024 tokens and eviction behavior described. The project includes token usage transparency, parallel processing using ThreadPoolExecutor, retry and exponential backoff strategies, colored logs, and utilities for saving and inspecting reasoning history.
Use Cases
This repository helps developers and researchers build collaborative AI systems that combine multiple agent perspectives to improve answer accuracy and creativity. It makes it straightforward to prototype agent personalities, capabilities, and handoffs by editing agents.json and to run different interaction modes using a simple menu-driven interface executed with python reasoning.py. Swarm integration allows complex tasks to be delegated to specialized agents for modularity and scalability. Local JSON memory provides lightweight context retention for more coherent conversations, and prompt caching reduces repeated-processing latency and API costs while exposing cached token counts for monitoring. Built-in logging, token reporting, retry logic, and parallel execution make the system more robust for experimentation and testing. The repository is also extensible, documenting where to add embeddings, vector stores, or additional agents for production or research use.

Please fill the required fields*