Skip to content

Autonomous AI Manager that proactively plans projects, manages people operations (leave/burnout), and monitors execution using a multi-agent architecture (LangGraph + MCP).

Notifications You must be signed in to change notification settings

agusain2001/Virtual-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

33 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Virtual AI Manager (VAM)

Status Python Frontend Phases

๐ŸŒŸ Vision

The Virtual AI Manager (VAM) is an autonomous managerial system designed to operate continuously alongside human teams. Unlike request-response chatbots, VAM proactively plans, monitors, and executes management tasksโ€”scheduling meetings, approving leave, tracking deadlines, forecasting risks, and reporting progressโ€”while keeping humans in the loop via a dedicated control plane.

๐Ÿ— System Architecture

VAM operates on a multi-agent architecture using LangGraph for orchestration and MCP (Model Context Protocol) for tool integration.

graph TD
    User[Control Plane UI] <--> API[FastAPI Backend]
    API <--> Orchestrator[Manager Orchestrator]
    
    subgraph "Agent Core (8 Agents)"
        Orchestrator --> Planning[Planning Agent]
        Orchestrator --> People[People Ops Agent]
        Orchestrator --> Growth[Growth & Scaling Agent]
        Orchestrator --> Exec[Execution Agent]
        Orchestrator --> Comm[Communication Agent]
        Orchestrator --> Managerial[Managerial Agent]
        Orchestrator --> Analytics[Analytics Agent]
        Orchestrator --> Platform[Platform Agent]
    end
    
    subgraph "Memory & Tools"
        Planning --> VectorDB[(Vector Memory)]
        People --> Cal[Calendar MCP]
        Growth --> KB[Knowledge Base]
        Exec --> Mon[Task Monitors]
        Comm --> Slack[Slack/Email MCP]
        Analytics --> Forecast[Risk & Velocity]
        Platform --> RBAC[Security & Audit]
    end
Loading

โœจ Key Features (Phases 1-6 Complete)

Phase 1-2: Core Foundation & Communication

  • ๐Ÿง  Autonomous Planning: Decomposes goals into actionable DAGs with dependency tracking
  • ๐Ÿ“‹ Task & Project Management: Full lifecycle management with milestones and goals
  • ๐Ÿ™ GitHub Integration: Bi-directional sync with GitHub Issues, OAuth login, and webhook automation
  • ๐Ÿ“… Google Calendar: Real-time calendar sync, free slot detection, focus block scheduling
  • ๐Ÿ’ฌ Slack Integration: Socket Mode bot, DM handling, proactive standups
  • โ˜€๏ธ Morning Standups: Automated 09:00 check-ins with GitHub issue context
  • ๐Ÿ‘๏ธ Active Monitoring: Proactive risk detection and deadline tracking
  • ๐Ÿ“Š Managerial Intelligence: Strategic risk analysis, goal refinement, automated reporting

Phase 3: Human-Centric Intelligence

  • ๐Ÿค People Operations: Leave management, burnout detection, skill matrices
  • ๐Ÿ“… Calendar Integration: Working hours, time zones, meeting scheduling
  • โš–๏ธ Capacity Planning: get_available_hours(), check_overload() functions
  • ๐Ÿ”ฅ Burnout Watchdog: Sustained overload and deadline pressure monitoring

Phase 4: Cognitive Persistence (New)

  • ๐Ÿง  Long-Term Memory: Vector embeddings (OpenAI text-embedding-3-small) to recall past decisions
  • ๐Ÿ“š Context Injection: Semantic search retrieves relevant history into agent prompts
  • ๐Ÿ“Œ Semantic Search: pgvector integration for finding related tasks, plans, and meetings
  • ๐Ÿ”„ Auto-Memory triggers: Daily standup focus and task completions are automatically memorized

Phase 5: Growth Intelligence

  • ๐Ÿ“ˆ Hiring Pipeline: Candidate tracking with automated resume scoring
  • โœ… Interview Management: Scheduling, feedback collection, offer workflows
  • ๐ŸŽฏ Onboarding: 30-60-90 day plans with auto-generated tasks
  • ๐Ÿ“š Knowledge Base: Internal documentation with role-based curation

Phase 6: Analytics & Automation

  • ๐Ÿ“‰ Velocity Tracking: Task completion trends and projected dates
  • โš ๏ธ Risk Scoring: Weighted algorithm (overdue ร— 5, blocked ร— 3, load ร— 10)
  • ๐Ÿ“Š Executive Dashboards: Goal + project + risk summaries
  • ๐Ÿค– Automation Rules: IFTTT triggers for proactive interventions
  • ๐Ÿ“ธ Project Snapshots: Historical metrics for trend analysis
  • ๐Ÿ”ฎ AI Forecasting: Completion predictions with confidence scores

Phase 7: Safety & Governance (Implemented)

  • ๐Ÿ›ก๏ธ Risk Gate: Intercepts high-risk actions (score > 50) for human approval
  • โœ‹ Intervention UI: Modal to review, approve, or reject agent actions
  • ๐Ÿ” RBAC: Role-based access (Admin, Manager, Contributor, Viewer)
  • ๐Ÿ“ Immutable Audit Logs: Automatic @log_activity capture for all sensitive ops
  • โœ… Approval Workflow: Async approval requests with risk scoring (Critical/High/Medium)
  • ๐Ÿ”Œ MCP Tool Safety: Circuit breakers and permissions for tool execution

๐Ÿš€ Getting Started

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • Git
  • GitHub OAuth App (Client ID & Secret)
  • Google OAuth App (for Calendar - optional)
  • Slack App (for Slack integration - optional)

Installation

  1. Clone the repository

    git clone https://github.com/agusain2001/Virtual-manager.git
    cd Virtual-manager
  2. Backend Setup

    cd backend
    python -m venv venv
    # Windows
    ./venv/Scripts/Activate.ps1
    # Linux/Mac
    # source venv/bin/activate
    
    pip install -r requirements.txt
    
    # Configure Environment
    cp .env.example .env
    # Edit .env with your GitHub Client ID/Secret and DB settings
  3. Frontend Setup

    cd ../frontend
    npm install

Running the System

1. Start the Brain (Backend)

cd backend
uvicorn backend.app.main:app --reload

API runs on: http://localhost:8000

2. Start the Control Plane (Frontend)

cd frontend
npm run dev

Dashboard runs on: http://localhost:3000

๐Ÿ“‚ Project Structure

Virtual-manager/
โ”œโ”€โ”€ backend/                     # Python/FastAPI Agent Core
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ agents/              # 8 Specialized Agents
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ orchestrator.py      # Manager Orchestrator (LangGraph)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ planning.py          # Task decomposition & DAGs
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ execution.py         # Monitoring & escalation
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ people_ops.py        # HR & capacity (1400+ lines)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ growth_scaling.py    # Hiring & onboarding (800+ lines)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ analytics_automation.py  # Forecasting & insights (720+ lines)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ platform_enterprise.py   # Security & RBAC (1000+ lines)
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ advanced_capabilities.py # Rules, plugins, voice
โ”‚   โ”‚   โ”œโ”€โ”€ core/                # Core Logic Modules
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ availability.py      # Capacity calculations
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ analytics.py         # Velocity & risk scoring
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ growth_logic.py      # Candidate scoring
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ security.py          # RBAC middleware
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ scheduler.py         # Cron jobs
โ”‚   โ”‚   โ”œโ”€โ”€ services/            # Service Layer
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ people_service.py    # Leave & calendar CRUD
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ growth_service.py    # Applications & onboarding
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ analytics_service.py # Dashboard & rules
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ platform_service.py  # Tenants & audit export
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ github_service.py    # GitHub API & Sync
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ google_calendar_service.py  # Google Calendar API
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ slack_service.py     # Slack Socket Mode
โ”‚   โ”‚   โ”œโ”€โ”€ routers/             # API Routers (auth, webhooks, etc)
โ”‚   โ”‚   โ”œโ”€โ”€ mcp/                 # MCP Tool Servers
โ”‚   โ”‚   โ”œโ”€โ”€ models.py            # 30+ SQLAlchemy models
โ”‚   โ”‚   โ””โ”€โ”€ main.py              # FastAPI entry point
โ”‚   โ””โ”€โ”€ requirements.txt
โ”‚
โ”œโ”€โ”€ frontend/                    # Next.js Control Plane
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ app/                 # Pages & Layouts
โ”‚   โ”‚   โ””โ”€โ”€ components/          # 20+ UI Components
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ AGENTS.md                    # Detailed Agent Documentation
โ””โ”€โ”€ README.md                    # Project Overview

๐Ÿ“Š API Endpoints (100+)

Category Endpoints Description
Tasks /api/v1/tasks/* CRUD, status, assignment
Projects /api/v1/projects/* Health, DAG, milestones
Goals /api/v1/goals/* OKR tracking, alignment
People /api/v1/people/* Leave, availability, workload
Growth /api/v1/growth/* Jobs, candidates, onboarding
Analytics /api/v1/analytics/* Velocity, forecasts, rules
Platform /api/v1/platform/* Users, RBAC, audit, tools
Managerial /api/v1/managerial/* Risk, reports, strategy
Auth /auth/* GitHub OAuth, session, repo selection
Google /auth/google/* Calendar OAuth, connect/disconnect
Slack /auth/slack/* User linking, bot status, test DM
Webhooks /webhooks/* GitHub inbound event processing

๐Ÿค Contributing

We welcome contributions to expand agent capabilities!

  1. Fork the repo.
  2. Create your feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes.
  4. Push to the branch.
  5. Open a Pull Request.

๐Ÿ“„ License

Distributed under the MIT License.

About

Autonomous AI Manager that proactively plans projects, manages people operations (leave/burnout), and monitors execution using a multi-agent architecture (LangGraph + MCP).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published