Skip to content

Latest commit

 

History

History
 
 

README.md

🏗️ Marcus System Architecture Documentation

Technical deep-dive documentation for all 55 systems powering Marcus's AI agent coordination platform.


📋 System Overview

Marcus is built on 55 interconnected systems that enable AI agents to collaborate autonomously. Each system is documented with implementation details, APIs, and integration patterns.

🎯 Quick Navigation

System Category Files Description
Core Intelligence 01, 07, 17, 23, 27, 44 Memory, AI engine, learning, task intelligence, recommendations, task classifier
Agent Coordination 21, 26, 03, 12 Agent management, worker support, context sharing, communication
Project Management 16, 04, 24, 25, 53 Project control, Kanban integration, analysis, reporting, workflow management
Development & Analysis 42, 43 Code analysis, API systems
Data & Storage 10, 32, 13, 19 Persistence, models, cost tracking, NLP processing
Security & Compliance 51 Security systems, access control, threat detection
Quality & Testing 18, 30, 11, 29 QA systems, testing framework, monitoring, detection
Infrastructure 08, 09, 06, 14, 15 Error handling, events, MCP server, isolation, service registry
Operations 22, 20, 28, 31 Operational modes, pipelines, configuration, resilience
Visualization 05, 02 UI systems, logging and visualization

🧠 Core Intelligence Systems

Multi-tier cognitive memory (Working, Episodic, Semantic, Procedural) that enables learning and context retention across projects.

Hybrid AI decision-making system combining multiple AI providers with context-aware prompt engineering.

Continuous learning from project outcomes, pattern recognition, and performance optimization.

Intelligent task analysis, dependency inference, and automatic task breakdown.

AI-powered recommendations for task assignment, technology choices, and workflow optimization.

Intelligent task categorization, priority scoring, and agent matching using ML and NLP.


🤖 Agent Coordination Systems

Core agent lifecycle management, registration, assignment, and the work-loop protocol. (What earlier docs called "Communication Hub" is folded in here — there is no separate inter-agent message bus; coordination happens on the board.)

Tools and utilities that help AI agents work more effectively with context and error recovery.

Intelligent context sharing between agents and automatic dependency resolution.


📊 Project Management Systems

High-level project creation, tracking, and completion management.

Multi-provider Kanban board integration. SQLite (default, zero-setup) plus Planka, GitHub Projects, and Linear.

Project analytics, performance metrics, and insight generation.

AI-powered task breakdown into manageable subtasks with clear interfaces and shared conventions.


🔧 Development & Analysis Systems

Repository analysis, language detection, complexity assessment, and security scanning for agent-generated code.


🔒 Security & Compliance Systems

Comprehensive security framework including authentication, threat detection, and workspace isolation.


🗄️ Data & Storage Systems

Data storage abstraction supporting multiple backends (SQLite, JSON, PostgreSQL).

Data models for tasks, agents, projects, and system entities.

API usage monitoring and cost optimization across AI providers.

Natural language processing for task analysis and context extraction.


Quality & Testing Systems

Automated quality checks, code review, and deployment validation.

Comprehensive testing infrastructure for all Marcus components.

Real-time system monitoring, health checks, and alerting.

Anomaly detection, error pattern recognition, and preventive measures.


🏭 Infrastructure Systems

Comprehensive error handling with automatic recovery and escalation.

Publish/subscribe system for loose coupling and scalability.

Model Context Protocol server implementation for AI agent integration.

Secure isolation between agents and projects.

Dynamic service discovery and health management.


⚙️ Operations Systems

Different operation modes (development, staging, production) with appropriate configurations.

Dynamic configuration system with environment-based overrides.

Fault tolerance, circuit breakers, and graceful degradation.


🎨 Visualization Systems

Real-time dashboards and project visualization tools. The active visualization product is Cato, which reads board state directly.

Comprehensive logging infrastructure with multiple output formats.


🔍 How to Use This Documentation

For New Developers

  1. Start with Core Intelligence systems to understand how Marcus thinks
  2. Review Agent Coordination to understand agent workflows
  3. Check Infrastructure systems for integration patterns

For System Integration

  1. Review MCP Server (06) for API integration
  2. Check Error Framework (08) for proper error handling
  3. Study Configuration Management (28) for setup

For Extension Development

  1. Understand Event-Driven Architecture (09) for loose coupling
  2. Review Service Registry (15) for service discovery
  3. Check Testing Framework (30) for validation

For Operations

  1. Study Monitoring Systems (11) for observability
  2. Review Resilience (31) for fault tolerance
  3. Check Pipeline Systems (20) for deployment

🔗 System Interdependencies

graph TD
    A[01-Memory] --> B[07-AI Engine]
    B --> C[17-Learning]
    C --> D[27-Recommendations]

    E[21-Agent Coord] --> F[26-Worker Support]
    F --> G[03-Context System]
    G --> H[12-Communication]

    I[16-Project Mgmt] --> J[04-Kanban]
    J --> K[24-Analysis]
    K --> L[25-Reports]

    M[08-Error Framework] --> N[09-Events]
    N --> O[06-MCP Server]
    O --> P[15-Service Registry]
Loading

📈 System Metrics

  • 55 Total Systems documented
  • 6 Core Intelligence systems for AI decision-making and classification
  • 4 Agent Coordination systems for workflow management
  • 2 Development & Analysis systems for code quality and API integration
  • 1 Security & Compliance system for comprehensive security
  • 7 Project Management systems including workflow orchestration and task decomposition
  • 5 Infrastructure systems for reliability and scalability
  • 4 Quality & Testing systems for reliability
  • Rest: Data storage, operations, and visualization systems

🤝 Contributing to System Documentation

When modifying systems:

  1. Update the relevant system documentation
  2. Update this README if adding/removing systems
  3. Update interdependency diagrams if changing relationships
  4. Add integration examples for new APIs
  5. Document breaking changes clearly

💡 Implementation Notes

  • All systems follow Event-Driven Architecture principles
  • Error Framework provides consistent error handling across systems
  • Configuration Management allows per-environment customization
  • Testing Framework ensures all systems maintain quality standards
  • MCP Server exposes unified API regardless of internal complexity

Each system is designed to be independently testable, scalable, and maintainable while contributing to Marcus's overall AI agent coordination capabilities.