How foreveryh/mentis works
• Supervisor Module – Central component that assigns tasks, orchestrates coordination, and aggregates results. This is implemented in directories under core/agents/supervisor (both react-based and state-based variants) and also reflected in the examples.
• Specialized Agent Modules – Different smart agents are implemented for various specialties (coder, data analyst, designer, reporter, research) in core/agents/sub_agents as well as within other agent folders. Clearly indicate each family of agents and show them as distinct yet connected to the Supervisor.
• API Layer – There is an API module (in the “api” directory) that likely provides endpoints or gateway functionalities to interface with the system. Mark this as the service facade.
• Core Tools and Utilities – In core/tools and core/utils these modules offer support services (e.g., e2b_tool, firecrawl_tool) that are used throughout the system.
• LLM Integration – The core/llm directory manages language models and their configurations, forming a bridge between user queries or tasks and the underlying AI capabilities.
• Web Frontend – Under the “web” directory, a modern frontend (likely built using Next.js given file names like page.tsx, layout.tsx, etc.) provides the user interface for interacting with the multi-agent system. This should be depicted as a separate client component interacting (via API calls) with the backend services.
• Super Agents Section – The super_agents directory contains additional “deep research” functionality, including a reason_graph for advanced analysis. This can be shown as an extended module that queries existing agents or enhances the basic supervisor pattern.
Relationships and Data Flow
• Web Client (UI) → API Gateway (api directory) → Core Business Logic (Supervisor + Agent modules)
• Supervisor → Specialized Agents: Show control lines representing task assignment and handoff (using “handoff” modules).
• That the Supervisor gathers responses from specialized agents and then integrates the data. A feedback loop from agents back to Supervisor should be depicted.
• Also, illustrate that the system supports visualization of workflows (referenced in examples/graphs) which might be a separate module feeding into monitoring or debugging interfaces.
Architectural Patterns and Design Principles
• Modular Architecture: Emphasize that the system is organized into clearly separated modules (core logic, API, web UI, specialized agents, tools), which supports extensibility and maintenance.
• Supervisor Pattern: Underline that task delegation and result integration are managed via a central Supervisor pattern.
• Separation of Concerns: Distinguish between components handling business logic (core), presentation (web), and integration with external services (LLM, tools, API).
• Microservice-like Interaction: Although not necessarily microservices deployed separately, the clear boundaries (API, core, web) reflect a similar design mindset.
Relevant Technologies & Frameworks
• Python is the backbone for backend logic (files in core, super_agents, api).
• Next.js/React is used for the frontend (web directory).
• uv for dependency management and environment setup.
• LangGraph as the underlying multi-agent orchestration framework.
• Integration with external APIs (OpenAI, Tavily, FireCrawl, Jina).