Skip to content

About

Enterprise Brain OS is an AI-powered enterprise intelligence platform that transforms organizational knowledge into actionable insights. It combines RAG, hybrid search, AI agents, workflow automation, decision intelligence, knowledge graphs, and multi-source integrations to create a unified Enterprise Operating System for intelligent organizations.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

69 Commits

Folders and files

Repository files navigation

Enterprise Brain OS

Enterprise Brain OS

Enterprise Brain OS · Adaptive Knowledge Intelligence · Agentic RAG

Enterprise-grade AI platform for document intelligence, workflow automation, contradiction detection, LLM observability, adaptive multilingual knowledge intelligence, and intelligent task execution.


A production-ready full-stack GenAI project demonstrating RAG ingestion, PDF/text parsing, chunking, vector search, source-grounded answers, agent-style tool routing, workflow automation, AI observability, authentication, FastAPI backend, React dashboard, multi-LLM provider support, adaptive multilingual document understanding, intelligent task execution, and production security hardening (rate limiting, security headers, PII protection, IDOR prevention).


Extraordinary Features Added (Premium Portfolio Upgrades)

  1. Hybrid RAG Retrieval (ChromaDB + SQLite FTS5)
    • Merges semantic embeddings-based vector search (ChromaDB) with traditional keyword match (SQLite FTS5 full-text search).
    • Ranks merged retrieval streams using Reciprocal Rank Fusion (RRF) ($k=60$) for higher retrieval accuracy.
  2. Persistent Chat Sessions
    • SQLite-backed chat history list, creating/deleting/renaming conversations, and resuming past chats with context grounding.
  3. Inline Citation Drawer
    • Renders clickable citation tag badges under AI answers, opening a detailed slide-over drawer highlighting chunk excerpt, source document, relevance score, and chunk indices.
  4. Human-in-the-Loop Workflow Approval
    • Renders AI workflow draft outputs inside editable code-editor textareas (tabbed with preview renderers).
    • Prompts user with Approve, Approve & Edit, and Reject buttons to audit drafts before saving.
  5. Multi-LLM Provider Metrics Dashboard
    • Integrated LLMOps dashboard tracking latency, estimated costs, success rates, and token consumption across providers (Gemini, OpenRouter, Claude, Groq, Together AI, HuggingFace).
  6. ActionGraph AI: Document-to-Execution Engine
    • Moves beyond simple document Q&A (like NotebookLM) by parsing compliance/policy documents and generating an actionable roadmap containing: extracted obligations, deadlines, owners, priority, risk levels, and evidence checks.
    • Prompts user with human-in-the-loop editing/auditing controls and outputs downloadable execution PDF reports.
  7. ChangeRadar AI: Document Version Comparison and Impact Intelligence
    • Solves document change impact by comparing old and new versions of compliance, legal, or HR documents.
    • Detects added, removed, or modified rules, changes in deadlines/fees, updates to required documents or owners, calculates risk severity, highlights affected ActionGraph tasks, and exports Change Impact PDF reports.
  8. ConflictGuard AI: Cross-Document Contradiction and Risk Detection
    • Proactively scans multiple documents and detects contradictions, outdated requirements, mismatched deadlines, eligibility conflicts, required document conflicts, and other risky inconsistencies with source-backed evidence.
    • Recommends corrective action task suggestions that can be reviewed, approved, and applied to ActionGraph checklists.
  9. KnowledgeBridge AI: Adaptive Knowledge Intelligence Engine
    • Goes beyond translation by explaining enterprise documents according to the reader's language, profession, expertise level, and document type.
    • Supports English, Hindi, Telugu, Tamil, Kannada, Malayalam, Marathi, Gujarati, Punjabi, and Bengali, with future languages supported through metadata-driven prompts.
    • Adapts output for Students, Teachers, Lawyers, Doctors, Engineers, Business Owners, Government Employees, HR, Finance, Managers, CEOs, Citizens, and General Users.
    • Generates structured understanding sections: document purpose, simple explanation, executive summary, important dates, important money, responsibilities, deadlines, risks, penalties, approvals, key people, departments, glossary, timeline, FAQ, suggested actions, never-miss items, and immediate-attention items.
    • Detects document modes such as Legal, Medical, Insurance, Government, Finance, HR, Education, Research, Engineering, and Business.
    • Uses hybrid RAG, Enterprise Memory context, and source citations so explanations are grounded in document evidence rather than hallucinated.
    • Stores KnowledgeBridge sessions, preferences, generated explanations, citations, role, language, level, detected document type, provider, model, latency, and source coverage.
    • Includes follow-up questions, PDF export, Markdown export, copy, share, regenerate, timeline visualization, glossary cards, FAQ accordion, risk badges, and citation panels.
    • Feeds the dashboard with KnowledgeBridge usage, most used language, most used role, most explained document type, and average explanation time.
  10. ActionGraph AI 2.0: AI Project Execution Engine (Phase 3)
    • Upgraded from basic document-to-task extraction to a full dependency-aware project execution engine — documents (proposals, tenders, SOPs, sprint plans, circulars) become executable projects with tasks, subtasks, owners, deadlines, milestones, approvals, required documents, and risks.
    • Dependency engine — blocked tasks automatically unlock when their dependency completes; progress, health score, and risk recompute on every change.
    • Project Intelligence Dashboard — portfolio stats, burn-down, 14-day velocity, completion trend, and risk distribution.
    • Interactive dependency graph (vis-network) with zoom, pan, status filters, task search, milestone diamonds, and click-to-open task details.
    • Kanban board with drag-and-drop across Pending / In Progress / Waiting / Blocked / Review / Completed / Cancelled, priority colors, owner avatars, and per-card progress bars.
    • Timeline suite — Gantt chart with today marker and overdue rings, milestone view, critical path view, and a deadline calendar.
    • Critical path analysis identifies the longest chain of dependent tasks for bottleneck detection.
    • AI Project Manager — generates today's priorities, recommended next action, critical risks, quick wins, blocked tasks, health score, and a predicted completion date; users can also ask free-form questions ("What is blocking this project?") answered from live project state.
    • Intelligent alerts — overdue tasks, approaching deadlines, dependencies unblocked, approvals pending, documents missing.
    • Full task management — create, edit, duplicate, delete, change owner/priority/deadline/status, completion slider, file attachments, notes, undo completion, and per-field change history.
    • Risk analysis across five dimensions (schedule, resource, dependency, approval, documentation) rolled into an overall project risk.
    • Tasks are registered as Enterprise Memory entities, so the knowledge graph and RAG chat reuse project knowledge instead of duplicating it.
  11. AI Chief of Staff: Proactive Executive Intelligence (Phase 5)
    • Proactive AI executive assistant that monitors the entire enterprise and surfaces briefings, insights, recommendations, and alerts without being asked.
    • Daily Briefing — auto-generated executive summary with greeting, headline, key bullets, and recommended next action.
    • Insights Feed — surfaced risks, bottlenecks, and knowledge gaps ranked by severity.
    • Recommendation Cards — AI-suggested next actions the user can approve or dismiss.
    • Alert System — real-time notifications for overdue tasks, expiring approvals, and emerging conflicts.
    • Ask Chief of Staff — natural-language interface to query the entire enterprise state.
    • Health Score — per-dimension project and organizational health metrics.
    • Background scheduler runs periodic analysis cycles to keep data fresh.
    • Cross-module context aggregation from ActionGraph, ConflictGuard, ChangeRadar, Enterprise Memory, KnowledgeBridge, ConnectHub, and project intelligence.
  12. Enterprise Digital Twin & Decision Simulator (Phase 6)
    • Materializes a live enterprise digital twin from Enterprise Memory, ActionGraph AI 2.0, Connect Hub, documents, ChangeRadar, ConflictGuard, reports, approvals, tasks, projects, people, departments, and external systems.
    • Adds a deterministic what-if simulation engine for delaying projects, reducing budget, replacing team members, changing vendors, modifying approvals, postponing milestones, cancelling projects, adding resources, increasing team size, and merging departments.
    • Calculates affected projects, tasks, documents, approvals, blocked work, timeline changes, predicted completion dates, risk score, health score, critical path, confidence score, success probability, budget impact, business impact, and mitigations.
    • Includes an AI Decision Advisor that uses the configured multi-LLM provider only for executive explanation while the core simulation remains grounded in the real dependency graph.
    • Provides scenario management: create, natural-language what-if generation, duplicate, rename, delete, archive, run, replay, restore from history, compare, and export executive PDF reports.
    • Ships a premium Decision Intelligence UI with glassmorphism, Framer Motion, React Flow dependency impact graph, minimap, filters, search, animated impact edges, timeline simulation, comparison charts, loading states, and empty states.
    • Adds Decision Intelligence metrics to the executive dashboard: recent simulations, highest-risk scenario, most affected projects, simulation success rate, prediction accuracy, and digital twin coverage.
  13. Enterprise AI Workforce (Phase 7)
    • Adds an AI Workforce Studio where users create, configure, pause, resume, stop, archive, and deploy autonomous AI employees with roles, goals, instructions, memory, tools, knowledge scope, provider/model settings, and schedules.
    • Reuses Enterprise Memory, KnowledgeBridge AI, Connect Hub, Digital Twin, Decision Intelligence, Workflow Automation, Reports, task/project context, and Chief of Staff context as the permissioned reasoning foundation.
    • Implements a planning pipeline: understand goal, break into subtasks, choose tools, collect information, reason, execute, verify, generate report, and store memory.
    • Adds human approval gates for sensitive actions such as sending email, deleting files, modifying knowledge, exporting data, and triggering workflows.
    • Provides long-term employee memory, task execution timelines, multi-agent collaboration, marketplace templates, supervisor loop-guarding, productivity analytics, provider/cost tracking, and audit logs.
  14. Production Security Hardening
    • Secret leak prevention — .env excluded from git, no hardcoded secrets in source code.
    • PII flow protection — Passwords hashed with PBKDF2-SHA256 (120K iterations + salt), minimal user response schemas.
    • Pre-deploy security — Security headers (CSP, HSTS, X-Frame-Options, X-Content-Type-Options), rate limiting on auth endpoints (10 req/min/IP), startup environment validation (refuses to run with default JWT secret), Swagger disabled in production, server header removal.
    • Deep security audit — Parameterized SQLite queries against injection, user-scoped queries prevent IDOR, server-side file type validation on uploads.
    • Attacker's perspective — No unprotected admin endpoints, no .env exposure via static files, global exception handler prevents stack trace leakage.

Portfolio Resume Bullets:

  • Built KnowledgeBridge AI, an Adaptive Knowledge Intelligence Engine that explains enterprise documents by language, profession, expertise level, and detected document type rather than merely translating them.
  • Designed a grounded role-aware explanation pipeline that combines hybrid RAG, Enterprise Memory context, citations, and multi-LLM routing to produce practical explanations for doctors, lawyers, CEOs, citizens, students, finance teams, HR, engineers, and managers.
  • Implemented structured document intelligence outputs including document purpose, executive summary, simple explanation, risks, deadlines, money, penalties, approvals, key people, departments, timeline, glossary, FAQ, suggested actions, never-miss items, immediate attention, smart highlights, and citations.
  • Built ActionGraph AI 2.0, a dependency-aware intelligent task execution engine with subtask management, auto-progress propagation, critical path analysis, and next-best-task recommendation.
  • Implemented an Enterprise Digital Twin & Decision Simulator that materializes live projects, tasks, approvals, documents, people, departments, external systems, and knowledge graph relationships into a scenario reasoning engine.
  • Built what-if decision simulation for project delays, budget changes, staffing changes, vendor changes, approval workflow changes, milestones, cancellations, resource additions, and department merges with risk, health, timeline, confidence, and business-impact scoring.
  • Designed an executive Decision Intelligence interface using React Flow, Recharts, Framer Motion, glassmorphism, scenario comparison, impact highlighting, timeline simulation, simulation history, and PDF export.
  • Built an Enterprise AI Workforce platform with configurable autonomous AI employees, permissioned tool use, planning pipelines, long-term memory, human approval gates, multi-agent collaboration, supervisor monitoring, productivity analytics, and audit logs.
  • Implemented production security hardening across 5 audit dimensions — secret leak, PII flow, pre-deployment, deep security, and attacker's perspective — including rate limiting, security headers, CSP, HSTS, parameterized queries, IDOR prevention, and startup validation.
  • Built Enterprise Connect Hub as a modular sync layer for external platforms, with connector cards, health tracking, sync logs, and automatic ingestion into Enterprise Memory and RAG.
  • Built ConflictGuard AI, a cross-document contradiction detection engine that identifies conflicting deadlines, eligibility rules, required documents, responsibilities, process rules, and compliance requirements across multiple uploaded documents.
  • Implemented structured LLM-based conflict extraction with severity scoring, confidence scores, source snippets, and recommended actions.
  • Designed a conflict management dashboard to review, ignore, resolve, and export source-backed document conflict reports.
  • Added PDF export for cross-document risk reports to help users avoid missed deadlines, policy mistakes, claim rejection, and compliance failures.
  • Built ChangeRadar AI, a document version intelligence system that detects added, removed, and modified requirements across policy, project, and compliance documents.
  • Implemented semantic change-impact analysis to identify changed deadlines, required documents, eligibility rules, responsibilities, evidence requirements, and affected execution tasks.
  • Integrated ChangeRadar with ActionGraph AI to suggest task updates, new tasks, obsolete tasks, deadline changes, and risk-level changes based on document updates.
  • Added a Change Impact Report export feature with severity scoring, source snippets, confidence scores, and recommended next actions.
  • Built ActionGraph AI, a document-to-execution engine that extracts obligations, deadlines, owners, risks, dependencies, and evidence requirements from uploaded documents using RAG and LLM structured extraction.
  • Designed an execution dashboard to track pending actions, high-risk tasks, missing evidence, completion status, and source-backed action items.
  • Implemented human-in-the-loop editing and approval for AI-extracted action items before they become active tasks.
  • Added PDF export for compliance-style execution reports with source snippets and evidence notes.
  • Implemented hybrid RAG retrieval by combining semantic vector search with SQLite FTS5 keyword search to improve exact-match and contextual document retrieval.
  • Built persistent chat sessions with conversation history, session management, and source-grounded AI responses.
  • Added an inline citation viewer to verify retrieved document chunks and improve trust in AI-generated answers.
  • Designed human-in-the-loop workflow automation where AI-generated summaries, emails, letters, and reports require user approval before finalization.
  • Developed an LLM observability dashboard to compare provider latency, estimated cost, token usage, success rate, and tool usage.

Tech Stack

Layer Technology
Frontend React 18, Vite, Tailwind CSS, Framer Motion, React Flow, Recharts
Backend FastAPI, Python 3.11+
Database SQLite (via SQLAlchemy)
Vector DB ChromaDB (local persistent)
AI (default) Google Gemini API
Auth JWT (python-jose)
PDF Export fpdf
Charts Recharts

KnowledgeBridge AI Phase 2

KnowledgeBridge AI is the platform's Adaptive Knowledge Intelligence Engine. It is designed for enterprise documents that are difficult to understand: government orders, medical reports, insurance policies, loan agreements, tenders, legal contracts, tax documents, SOPs, HR policies, research papers, and engineering manuals.

It does not simply translate documents. It explains them for the reader.

Adaptive Inputs

Dimension Supported Values
Language English, Hindi, Telugu, Tamil, Kannada, Malayalam, Marathi, Gujarati, Punjabi, Bengali
Profession Student, Teacher, Lawyer, Doctor, Engineer, Business Owner, Government Employee, HR, Finance, Manager, CEO, Citizen, General User
Knowledge Level Beginner, Intermediate, Expert, Executive Summary, Child Friendly
Document Mode Auto, Legal, Medical, Insurance, Government, Finance, HR, Education, Research, Engineering, Business

Output Sections

KnowledgeBridge generates document purpose, simple explanation, executive summary, important dates, important money, responsibilities, deadlines, risks, penalties, approvals required, key people, departments, important terms, glossary, timeline, FAQ, suggested actions, things you should never miss, things requiring immediate attention, smart highlights, and grounded citations.

Smart Highlights

The engine flags critical deadlines, legal risks, financial risks, medical warnings, compliance issues, missing signatures, missing approvals, missing documents, expired clauses, and high-priority actions.

Phase 2 Architecture

flowchart LR
  Upload["Document Upload"] --> Parse["Parse + Chunk"]
  Parse --> Hybrid["Hybrid Search: ChromaDB + SQLite FTS5"]
  Hybrid --> KB["KnowledgeBridge AI"]
  Memory["Enterprise Memory"] --> KB
  Prefs["Language + Role + Level + Document Mode"] --> KB
  Providers["Gemini / Claude / OpenRouter / Groq / Compatible APIs"] --> KB
  KB --> Explain["Adaptive Explanation JSON"]
  Explain --> UI["Premium KnowledgeBridge UI"]
  Explain --> Store["Sessions + Explanations + Preferences + Citations"]
  Store --> Dashboard["KnowledgeBridge Dashboard Metrics"]
Loading

KnowledgeBridge API

Endpoint Purpose
GET /knowledgebridge/metadata Languages, roles, levels, and document modes
GET /knowledgebridge/preferences Current user's KnowledgeBridge defaults
PUT /knowledgebridge/preferences Save language, role, level, mode, and provider
POST /knowledgebridge/explain Generate adaptive grounded explanation
POST /knowledgebridge/follow-up Ask role-aware follow-up questions
GET /knowledgebridge/explanations List generated explanations
GET /knowledgebridge/sessions List KnowledgeBridge sessions
GET /knowledgebridge/export-md/{id} Export Markdown
POST /knowledgebridge/export-pdf/{id} Export PDF

Phase 6: Enterprise Digital Twin & Decision Simulator

Phase 6 turns Enterprise Brain OS into a decision-reasoning layer for the Enterprise Brain OS. It is not a separate chatbot or duplicate dashboard; it reuses the existing enterprise state already produced by Enterprise Memory, KnowledgeBridge AI, ActionGraph AI 2.0, ChangeRadar AI, ConflictGuard AI, Connect Hub, documents, reports, workflows, projects, tasks, approvals, and external connector syncs.

Enterprise Digital Twin

The Digital Twin materializes normalized entities and relationships into digital_twin_entities and digital_twin_relationships.

Supported entity types include people, departments, projects, documents, tasks, milestones, approvals, policies, contracts, meetings, repositories, knowledge, business processes, dependencies, risks, and external systems.

The twin updates through:

  • Lazy rebuild on first Decision Intelligence access
  • Manual POST /digitaltwin/rebuild
  • Background refresh controlled by TWIN_REFRESH_MINUTES
  • Dashboard/graph access that reads the latest materialized enterprise model

Decision Simulator

Users can create structured scenarios or ask natural-language what-if questions such as:

  • What happens if Project Alpha is delayed by two weeks?
  • What if Vendor A misses delivery?
  • What if budget decreases by 15%?
  • What if we hire two engineers?
  • What if Rahul resigns?
  • What if the approval is delayed?

Each simulation computes affected projects, tasks, documents, approvals, timeline shifts, predicted completion date, risk score, health score, blocked work, critical path, confidence score, success probability, budget impact, business impact, mitigations, and advisor evidence.

Phase 6 Architecture

flowchart TD
  Memory[Enterprise Memory] --> Twin[Digital Twin Builder]
  ActionGraph[ActionGraph AI 2.0 Projects and Tasks] --> Twin
  Docs[Documents and RAG Chunks] --> Twin
  KB[KnowledgeBridge AI] --> Twin
  Connect[Connect Hub Syncs] --> Twin
  Change[ChangeRadar AI] --> Twin
  Conflict[ConflictGuard AI] --> Twin
  Chief[AI Chief of Staff Context] --> Simulator[Decision Simulator]
  Twin --> Simulator
  Scenario[Scenario Manager] --> Simulator
  Simulator --> Impact[Impact Analysis]
  Simulator --> Timeline[Timeline Simulator]
  Simulator --> Compare[Scenario Comparison]
  Simulator --> Advisor[AI Decision Advisor]
  Advisor --> Reports[Executive PDF Reports]
  Impact --> Graph[React Flow Dependency Impact Graph]
Loading

Phase 6 API

Endpoint Purpose
POST /digitaltwin/rebuild Rebuild the materialized enterprise digital twin
GET /digitaltwin/summary Digital twin counts and Decision Intelligence dashboard metrics
GET /digitaltwin/graph React Flow-ready dependency impact graph with search, filters, and highlights
GET /digitaltwin/metrics Prediction metrics and simulation success rates
GET /digitaltwin/history Simulation history ledger
POST /digitaltwin/history/{history_id}/restore Restore a scenario from simulation history
GET /digitaltwin/scenarios List scenarios
POST /digitaltwin/scenarios Create a structured scenario
POST /digitaltwin/scenarios/from-question Convert natural-language what-if question into a scenario
GET /digitaltwin/scenarios/{scenario_id} Scenario detail with latest result
PUT /digitaltwin/scenarios/{scenario_id} Rename/update scenario metadata and parameters
POST /digitaltwin/scenarios/{scenario_id}/duplicate Duplicate scenario
POST /digitaltwin/scenarios/{scenario_id}/archive Archive scenario
DELETE /digitaltwin/scenarios/{scenario_id} Delete scenario and related results
POST /digitaltwin/scenarios/{scenario_id}/run Run simulation
POST /digitaltwin/scenarios/{scenario_id}/replay Replay simulation against current twin state
GET /digitaltwin/scenarios/{scenario_id}/impact Impact analysis rows for affected entities
GET /digitaltwin/scenarios/{scenario_id}/advisor AI Decision Advisor explanation and evidence
POST /digitaltwin/scenarios/compare Side-by-side scenario comparison
POST /digitaltwin/scenarios/{scenario_id}/export Generate executive Decision Report PDF

Frontend Route

Route Purpose
/decision-intelligence Enterprise Digital Twin, scenario manager, simulator, React Flow impact graph, timeline simulator, comparison view, advisor, and history
/dashboard Adds Decision Intelligence cards for recent simulations, highest-risk scenario, most affected projects, success rate, prediction accuracy, and twin coverage

Screenshots

Add screenshots here when preparing the portfolio or README preview:

  • screenshots/decision-intelligence-hero.png
  • screenshots/digital-twin-impact-graph.png
  • screenshots/scenario-comparison.png
  • screenshots/decision-advisor-report.png

Phase 7: Enterprise AI Workforce

Phase 7 transforms Enterprise Brain OS into an AI Workforce platform. AI employees are not chatbots: they are long-running digital coworkers that plan, use explicitly enabled enterprise tools, reason over the existing Brain OS, request human approval for sensitive actions, store long-term memory, collaborate with other employees, and produce auditable outputs.

AI Workforce Overview

Users can create specialized AI employees such as Finance Analyst, Legal Advisor, HR Recruiter, Sales Executive, Project Manager, Engineering Manager, Research Assistant, Compliance Officer, Security Auditor, Knowledge Manager, CEO Assistant, and Operations Manager.

Each employee stores:

  • Name, avatar, department, role, goal, description, skills, instructions, personality, and language
  • Memory enabled flag, reasoning depth, thinking mode, temperature, provider/model, maximum context, and maximum tokens
  • Explicitly enabled tools, permissions, schedule, and knowledge access scope
  • Status, recent task activity, long-term memory, metrics, and audit history

Permissioned Tool Layer

AI employees can use only tools enabled by the user. Supported tool keys include Enterprise Memory, KnowledgeBridge AI, Connect Hub, Digital Twin, Decision Intelligence, Workflow Automation, Reports/PDF Export, GitHub, Jira, Slack, Notion, Google Drive, Email, Calendar, Web Search, Task Manager, and Document Search.

Sensitive actions are approval-gated and do not execute side effects automatically:

  • Send email
  • Delete files
  • Modify knowledge
  • Export data
  • Trigger workflow

Planning and Execution Workflow

flowchart TD
  User[Human User] --> Studio[AI Employee Studio]
  Studio --> Employee[AI Employee]
  Employee --> Goal[Understand Goal]
  Goal --> Plan[Break Into Subtasks]
  Plan --> Tools[Choose Enabled Tools]
  Tools --> Context[Collect Enterprise Context]
  Context --> Reason[Reason]
  Reason --> Gate{Sensitive Action?}
  Gate -->|Yes| Approval[Human Approval]
  Approval --> Execute[Execute Approved Step]
  Gate -->|No| Execute
  Execute --> Verify[Verify Output]
  Verify --> Report[Generate Report]
  Report --> Memory[Store Employee Memory]
  Report --> Audit[Write Audit Log]
  Supervisor[AI Supervisor] --> Employee
  Supervisor --> Audit
Loading

Enterprise AI Workforce Architecture

flowchart TD
  Studio[AI Workforce Studio] --> Employee[AI Employee]
  Marketplace[Template Marketplace] --> Employee
  Employee --> Planner[Planning Engine]
  Planner --> Permission[Permissioned Tool Layer]
  Permission --> Memory[Enterprise Memory]
  Permission --> KB[KnowledgeBridge AI]
  Permission --> Connect[Connect Hub]
  Permission --> Twin[Digital Twin]
  Permission --> Decision[Decision Intelligence]
  Permission --> Workflow[Workflow Automation]
  Permission --> Reports[Reports]
  Planner --> Approval[Human Approval Gate]
  Approval --> Execution[Task Execution]
  Execution --> LTM[Long-Term Employee Memory]
  Execution --> Metrics[Employee Metrics]
  Execution --> Audit[Audit Logs]
  Collaboration[Multi-Agent Collaboration] --> Employee
  Supervisor[AI Supervisor] --> Execution
  Supervisor --> Analytics[Workforce Analytics]
  Analytics --> Dashboard[Executive Dashboard]
Loading

Database Tables

Table Purpose
ai_employees User-owned AI employee configuration, identity, tools, knowledge scope, provider settings, and status
employee_memories Conversation memory, task memory, learned knowledge, completed jobs, mistakes, preferences, and activities
employee_tasks Assigned work items with type, priority, approval policy, plan, output, and status
employee_executions Execution attempts with planning steps, tool calls, reasoning summary, final output, provider, latency, token, and cost estimates
employee_approvals Human approval requests for sensitive actions
employee_audit_logs Append-only governance trail for user/system activity, tools used, provider, latency, cost, errors, and outputs
employee_templates Marketplace templates for common enterprise AI employee roles
employee_metrics Per-employee productivity, success rate, completion time, cost, tokens, and score

Phase 7 API

Endpoint Purpose
GET /workforce/catalog/tools List available permissioned tools and sensitivity metadata
GET /workforce/templates List built-in AI employee marketplace templates
POST /workforce/templates/{template_key}/duplicate Create a user-owned employee from a template
GET /workforce/employees List AI employees with search/status filters
POST /workforce/employees Create an AI employee
GET /workforce/employees/{employee_id} Employee detail with metrics, recent tasks, and memory
PUT /workforce/employees/{employee_id} Update employee configuration
DELETE /workforce/employees/{employee_id} Archive employee
POST /workforce/employees/{employee_id}/pause Pause an employee
POST /workforce/employees/{employee_id}/resume Resume an employee
POST /workforce/employees/{employee_id}/stop Stop employee and cancel active work
POST /workforce/employees/{employee_id}/tasks Assign a task to an employee
GET /workforce/tasks List workforce tasks
POST /workforce/tasks/{task_id}/execute Run task through the planning/execution pipeline
GET /workforce/executions List execution timeline records
GET /workforce/approvals List human approval requests
POST /workforce/approvals/{approval_id}/approve Approve a sensitive action
POST /workforce/approvals/{approval_id}/reject Reject a sensitive action
GET /workforce/employees/{employee_id}/memory List employee long-term memory
POST /workforce/employees/{employee_id}/memory Add employee memory
GET /workforce/audit-logs List workforce audit logs
GET /workforce/analytics Workforce metrics for Studio and dashboard
GET /workforce/supervisor Supervisor health, loop guard, recommendations, and failures
POST /workforce/collaborate Run a multi-agent collaboration chain

Frontend Route

Route Purpose
/ai-workforce AI Workforce Studio, employee marketplace, task execution, approvals, memory, collaboration, supervisor, analytics, and audit logs
/dashboard Adds Workforce cards for total employees, running employees, completed tasks, success rate, approvals, and most active employee

Background Jobs

Job Purpose
start_workforce_supervisor Periodically checks stale long-running executions and marks them waiting for supervisor review
WORKFORCE_SUPERVISOR_MINUTES Environment setting controlling the loop interval; 0 disables it

Screenshots

Add screenshots here when preparing the portfolio or README preview:

  • screenshots/ai-workforce-hero.png
  • screenshots/ai-employee-studio.png
  • screenshots/ai-workforce-marketplace.png
  • screenshots/employee-execution-timeline.png
  • screenshots/workforce-analytics-supervisor.png

Phase 9: Enterprise Knowledge Graph, Universal Search & Enterprise Intelligence Layer

The central intelligence layer that continuously learns from every connected source, builds a living knowledge graph, reasons across the entire organization, provides explainable answers with evidence, and serves as the shared brain powering every existing module.

Vision

Instead of answering questions about documents, Enterprise Brain OS understands an entire organization — people, projects, meetings, approvals, policies, emails, repositories, departments, workflows, tasks, risks, budgets, dependencies, and knowledge. Think Google Knowledge Graph × Microsoft Graph × Palantir Foundry × Notion AI × OpenAI Deep Research — combined into one enterprise operating system.

Knowledge Graph Engine

A continuously evolving graph that automatically constructs relationships between all enterprise data. Users never manually create graph nodes. Every upload, sync, workflow, approval, simulation, and AI task updates the graph automatically.

Graph contains: documents, projects, tasks, meetings, employees, departments, companies, clients, vendors, policies, repositories, emails, Slack messages, Teams chats, calendar events, reports, contracts, invoices, risks, deadlines, budgets, technologies, programming languages, source code, AI employees, Chief of Staff briefings, decision simulations, KnowledgeBridge explanations, and ActionGraph tasks.

AI Entity Extraction — automatically extracts names, organizations, departments, projects, budgets, phone numbers, emails, contracts, invoices, products, technologies, programming languages, policies, dates, deadlines, meetings, risks, approvals, dependencies, assets, locations, skills, and topics. The entity-type registry is open and extensible — unlimited future entity types without code changes.

AI Relationship Discovery — infers relationships like employee → works_on → project → uses → technology → requires → approval → depends_on → task → generated_from → document → discussed_in → meeting → referenced_by → email → connected_to → repository → impacts → department. Every relationship carries confidence, source, timestamp, reason, and supporting evidence.

Graph Intelligence — continuously computes Most Connected Projects, Most Important Employees, Knowledge Hotspots, High-Risk Vendors, Critical Documents, Unused Documents, Dead/Duplicate Knowledge, Communication & Approval Bottlenecks, Project Complexity, Knowledge Density, Department Collaboration Score, and an Enterprise Intelligence Score.

Knowledge Graph Pipeline

                ┌─────────────────────────────────────────────────────────┐
                │              EXISTING MODULES (data sources)             │
                │  Documents · Memory · ActionGraph · ConnectHub ·         │
                │  Digital Twin · Chief of Staff · AI Workforce ·          │
                │  KnowledgeBridge · ChangeRadar · ConflictGuard ·          │
                │  Reports · Decision Intelligence · Workflows             │
                └───────────────────────┬─────────────────────────────────┘
                                        │  build_enterprise_graph()
                                        ▼
                ┌─────────────────────────────────────────────────────────┐
                │            ENTERPRISE KNOWLEDGE GRAPH ENGINE             │
                │  ┌─────────────┐  ┌──────────────┐  ┌────────────────┐  │
                │  │ Entity      │→ │ Relationship │→ │ Intelligence   │  │
                │  │ Extraction  │  │ Discovery    │  │ Computation    │  │
                │  └─────────────┘  └──────────────┘  └────────────────┘  │
                │         │  enterprise_graph_nodes (idempotent upsert)    │
                │         │  enterprise_graph_edges (typed, scored, cited) │
                │         ▼  graph_snapshots (time-series growth)          │
                │            graph_timeline_events (append-only audit)     │
                └───────────────────────┬─────────────────────────────────┘
                                        │
          ┌─────────────────────────────┼─────────────────────────────┐
          ▼                             ▼                              ▼
   ┌───────────────┐          ┌──────────────────┐           ┌─────────────────┐
   │  Interactive  │          │ Universal Search │           │  AI Knowledge   │
   │  Graph Viewer │          │  (everything)    │           │   Navigator     │
   │  (React Flow) │          │  + deep links    │           │  (cited answers)│
   └───────────────┘          └──────────────────┘           └─────────────────┘

The background sync loop (start_background_graph_sync) runs an incremental build every KNOWLEDGE_GRAPH_SYNC_MINUTES (default 5) for every active user — idempotent upserts keyed on (source_module, source_ref) so it never creates duplicates. No rebuild button required.

Universal Enterprise Search (Flagship)

One search bar that searches EVERYTHING simultaneously — Enterprise Memory, Knowledge Graph, Documents, Google Drive, GitHub, Slack, Teams, Dropbox, OneDrive, Gmail, Calendar, Notion, Jira, Reports, Tasks, Projects, Decision Intelligence, Chief of Staff, AI Workforce, KnowledgeBridge, ActionGraph, and Workflow History.

AI Search Reasoning (Knowledge Navigator)

Instead of returning search results, the AI reasons. For a question like "Why is Project Apollo delayed?" it collects evidence from emails, Slack, meetings, approvals, tasks, documents, reports, decision intelligence, the knowledge graph, GitHub, Jira, calendar, and workflow history — then generates a Root Cause, Supporting Evidence, Timeline, Affected Teams, Blocked Tasks, Business Impact, Confidence Score, Recommended Actions, and Related Documents. Every answer includes citations.

Interactive Knowledge Graph UI

A premium React Flow canvas with smart dagre hierarchical layout, animated edges, zoom, pan, minimap, search, type-filter chips, expand/collapse, drag, fullscreen, keyboard shortcuts, dark + light mode (glassmorphism, theme-aware React Flow controls).

  • Intelligent Node Explorer — click any node for a side drawer with description, owner, department, tasks, meetings, documents, approvals, risks, budgets, timeline, connected entities, importance, tags, dates, and supporting evidence snippets
  • Graph Timeline — replay creation, modification, approval, relationship, risk, ownership, and deadline changes
  • Knowledge Growth chart (nodes/edges/intelligence over time) and AI Recommendations (missing documents, hidden dependencies, duplicate projects, knowledge gaps, critical risks, orphan tasks, unused connectors, approval bottlenecks)

Database Schema (Phase 9)

Table Purpose
enterprise_graph_nodes Every entity across all modules (type, name, status, health, risk, department, importance, connectivity, source_module + source_ref, metadata)
enterprise_graph_edges Typed directed relationships with strength, confidence, source snippet, evidence, and module provenance
graph_snapshots Time-series node/edge counts, density, avg connectivity, enterprise intelligence score (for growth charts)
graph_timeline_events Append-only audit log of every node/edge change (node_created, node_modified, edge_created, …)
universal_search_queries Search analytics: query, answer, reasoning, sources, modules searched, confidence, provider/model, latency

Phase 9 API

Method Endpoint Description
POST /knowledgegraph/rebuild Force/full rebuild from all modules
GET /knowledgegraph/summary Dashboard summary: counts, entity types, top nodes, growth, health
GET /knowledgegraph/viewer React Flow payload (nodes/edges) with type filter, search, highlight
GET /knowledgegraph/nodes/{id} Full node detail + connected entities + edges + timeline
GET /knowledgegraph/lookup Find a node by source_module + source_ref
GET /knowledgegraph/timeline Global graph change timeline
GET /knowledgegraph/growth Time-series growth for charts
GET /knowledgegraph/intelligence Hotspots, bottlenecks, collaboration scores, risk items
GET /knowledgegraph/recommendations Continuously-computed explainable recommendations
POST /knowledgegraph/search/universal Search EVERYTHING across all modules
POST /knowledgegraph/ask AI Knowledge Navigator (cited, explainable answers)
GET /knowledgegraph/reports Generate enterprise/department/risk/project/executive/growth reports
POST /knowledgegraph/reports/export Export as JSON / Markdown / PDF / Excel (.xlsx) / CSV

Background Workers

  • Graph Sync Loop (scheduler.py) — incremental build_enterprise_graph every KNOWLEDGE_GRAPH_SYNC_MINUTES for all active users; runs once ~20s after startup so the graph is never empty.
  • AI Navigator — best-effort LLM reasoning with graceful degradation: if no provider key is configured, returns a heuristic answer so the UI never breaks.

Security Model

  • Reuses existing RBAC — every endpoint requires get_current_user; all queries are scoped to user_id.
  • Knowledge is per-user isolated; restricted relationships are never surfaced across tenants.
  • Every graph access is recorded in the append-only graph_timeline_events audit log.
  • Security headers middleware (CSP, HSTS, X-Frame-Options DENY) applies to all graph endpoints.

Performance Optimizations

  • Idempotent upserts keyed on (source_module, source_ref) — incremental syncs never duplicate.
  • Indexing on user_id, entity_type, source_module, source_ref, edge endpoints, and timeline node_id.
  • 15-minute staleness guard — incremental syncs short-circuit if nothing changed.
  • Connectivity recomputation in a single pass after each build.
  • Client-side virtual rendering via React Flow (handles large node counts without UI lag).
  • Debounced + abortable Universal Search (makeAbortController) — older in-flight queries cancel.
  • Snapshot-based growth tracking — charts read precomputed time-series, not live recounts.

Frontend Routes

  • /knowledge-graph — Interactive Knowledge Graph (React Flow, node explorer, timeline, recommendations, growth)
  • /search — Universal Enterprise Search (flagship) + AI Knowledge Navigator

Configuration

KNOWLEDGE_GRAPH_SYNC_MINUTES=5     # 0 disables the background sync loop
KNOWLEDGE_GRAPH_PROVIDER=          # optional LLM override for the Navigator (blank = default)

Features

  • Document Upload — PDF, TXT, DOCX parsing and chunking
  • RAG Chat — Source-grounded Q&A with hallucination risk scores
  • Agent Tools — Summarize, Email, Letter, Checklist, Report generation
  • Workflow Automation — Multi-step pipelines (summarize → email, resume match, etc.)
  • AI Observability — Execution logs, latency, token estimates, cost tracking
  • Evaluation Dashboard — Charts for risk distribution and source coverage
  • PDF Report Export — Generate and download AI reports
  • Multi-LLM Provider Support — Gemini, OpenRouter, Claude, Groq, Together AI, HuggingFace
  • KnowledgeBridge AI — Adaptive Knowledge Intelligence Engine for role-aware, level-aware, multilingual document understanding with citations
  • ActionGraph AI 2.0 — Intelligent dependency-aware project execution with subtasks, auto-progress, critical path, and AI recommendations
  • Enterprise Digital Twin & Decision Simulator — Live enterprise model plus what-if scenario reasoning, dependency impact graph, timeline prediction, scenario comparison, AI decision advisor, simulation history, dashboard Decision Intelligence, and executive PDF reports
  • Enterprise AI Workforce — Autonomous AI employees with role/goal/instruction configuration, permissioned tools, knowledge scope, planning pipeline, task execution, human approval gates, memory, marketplace templates, supervisor analytics, collaboration, and audit logs
  • Enterprise Connect Hub — Modular platform connectors with sync orchestration, health monitoring, and automatic knowledge ingestion into Enterprise Memory and RAG for Google Drive, OneDrive, Dropbox, GitHub, Notion, Jira, Slack, Teams, Gmail, Outlook Calendar, and local folders
  • Enterprise Knowledge Graph — Continuously evolving intelligence layer that auto-materializes nodes and relationships from ALL modules, with smart dagre layout, interactive React Flow viewer, node explorer with evidence, graph timeline, knowledge growth charts, AI recommendations, and background sync
  • Universal Enterprise Search — Flagship one-bar search across every module (documents, projects, people, risks, connectors, AI insights, simulations) with debounced abort, deep-link navigation, recent queries, and AI Knowledge Navigator with cited explainable answers
  • Enterprise Knowledge Reports — Generate and export enterprise/department/risk/project/executive/growth knowledge reports as JSON, Markdown, PDF, or multi-sheet Excel (.xlsx)
  • Puter.js Integration — Optional enterprise auth, AI gateway, cloud storage, KV store, and OCR layer that augments the app without replacing existing auth or architecture
  • Security Hardening — Rate limiting, security headers (CSP, HSTS), parameterized queries, IDOR prevention, startup validation, secret leak protection
  • Authentication — Register, Login, JWT-protected routes

Quick Start

1. Backend

cd C:\Users\admin\Downloads\Git Uploads\Enterprise-AI-Copilot\backend

# Create virtual environment
python -m venv venv
venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Configure environment (edit .env with your API key)
copy .env.example .env

# Start backend
uvicorn app.main:app --reload --host 127.0.0.1 --port 8000

2. Frontend

cd C:\Users\admin\Downloads\Git Uploads\Enterprise-AI-Copilot\frontend

# Install dependencies
npm install

# Start dev server
npm run dev -- --host 127.0.0.1 --port 5173

3. Open in Browser

URL Purpose
http://127.0.0.1:5173 Frontend app
http://127.0.0.1:8000/health Backend health check
http://127.0.0.1:8000/docs Interactive API docs (Swagger)

Using Multiple LLM Providers

This project supports 6 LLM providers out of the box. You only need to configure one.

Supported Providers

Provider Env Key Default Model Get Key
Gemini GEMINI_API_KEY gemini-1.5-flash https://ai.google.dev
OpenRouter OPENROUTER_API_KEY google/gemini-flash-1.5 https://openrouter.ai/keys
Anthropic / Claude ANTHROPIC_API_KEY claude-3-haiku-20240307 https://console.anthropic.com
Groq GROQ_API_KEY llama-3.1-8b-instant https://console.groq.com/keys
Together AI TOGETHER_API_KEY meta-llama/Llama-3.3-70B-Instruct-Turbo https://api.together.ai
HuggingFace HUGGINGFACE_API_KEY mistralai/Mistral-7B-Instruct-v0.3 https://huggingface.co/settings/tokens

How to Configure API Keys

You can configure and switch between providers seamlessly through two methods:

Method A: Direct Settings UI (Recommended - Hot-Reloading)

  1. Launch both the backend and frontend.
  2. Register and log in, then navigate to the Settings page in the sidebar.
  3. Choose your provider (e.g., Gemini, OpenRouter, Anthropic, etc.).
  4. Enter your API Key in the text input and click Save Key.
  5. No restart required! The backend instantly updates .env and clears cached configurations, allowing immediate execution of AI tasks.

Method B: Manual .env Editing

  1. Open backend/.env in your editor.
  2. Paste your API key next to the respective provider (e.g., GEMINI_API_KEY=AIzaSy...).
  3. Set the default active provider via DEFAULT_LLM_PROVIDER=gemini (or any of the other 5 provider keys).
  4. Restart the backend to apply changes.

UI Override Capabilities

The frontend features a Provider Selector dropdown in the Chat, Workflows, and Reports views. You can override the active LLM provider for any specific request on-the-fly.


What Happens If No Key Is Configured

  • The backend and frontend continue to run without crashing.
  • Document upload, database access, parser execution, and dashboard log browsing remain fully functional.
  • The UI displays an elegant warning banner notifying you of the missing key.
  • If an AI generation is requested, the system prompts you with a clean error message detailing exactly how to obtain and configure the required key.

Example .env File

# ── LLM Provider Selection ─────────────────────────────────────────────────
DEFAULT_LLM_PROVIDER=gemini

# ── Gemini ─────────────────────────────────────────────────────────────────
GEMINI_API_KEY=your_gemini_key_here
GEMINI_MODEL=gemini-1.5-flash

# ── OpenRouter ─────────────────────────────────────────────────────────────
OPENROUTER_API_KEY=your_openrouter_key_here
OPENROUTER_MODEL=google/gemini-flash-1.5

# ── Anthropic / Claude ─────────────────────────────────────────────────────
ANTHROPIC_API_KEY=your_anthropic_key_here
ANTHROPIC_MODEL=claude-3-haiku-20240307

# ── Groq ───────────────────────────────────────────────────────────────────
GROQ_API_KEY=your_groq_key_here
GROQ_MODEL=llama-3.1-8b-instant

# ── Together AI ────────────────────────────────────────────────────────────
TOGETHER_API_KEY=your_together_key_here
TOGETHER_MODEL=meta-llama/Llama-3.3-70B-Instruct-Turbo

# ── HuggingFace ────────────────────────────────────────────────────────────
HUGGINGFACE_API_KEY=your_huggingface_key_here
HUGGINGFACE_MODEL=mistralai/Mistral-7B-Instruct-v0.3

# ── Auth & Database ────────────────────────────────────────────────────────
JWT_SECRET=change_this_to_something_random
DATABASE_URL=sqlite:///./enterprise_copilot.db
CHROMA_PATH=./chroma_store
UPLOAD_DIR=./uploads
CORS_ORIGINS=http://localhost:5173,http://127.0.0.1:5173

Backend Architecture

backend/app/
├── main.py                  # FastAPI app, CORS, routers
├── config.py                # Settings (pydantic-settings, reads .env)
├── database.py              # SQLAlchemy engine + session
├── models.py                # ORM models
├── schemas.py               # Pydantic request/response schemas
├── llm/                     # ← Multi-LLM provider abstraction
│   ├── base.py              # LLMProvider ABC + LLMResult dataclass
│   ├── provider.py          # generate_text() dispatcher
│   └── providers/
│       ├── gemini_provider.py
│       ├── openrouter_provider.py
│       ├── anthropic_provider.py
│       ├── groq_provider.py
│       ├── together_provider.py
│       └── huggingface_provider.py
├── auth/                    # JWT auth (register, login, /me)
├── documents/               # Upload, parse, chunk, vector store
├── rag/                     # RAG service (ask_document, prompts)
├── agents/                  # Tool router, tools, workflows
├── logs/                    # Execution logs + dashboard metrics
├── reports/                 # PDF report generator
├── knowledgebridge/          # ← Adaptive Knowledge Intelligence Engine
│   ├── service.py            # RAG grounding, memory context, sessions, preferences, DB storage
│   ├── prompts.py            # Role/language/level/document-mode prompt system
│   └── routes.py             # Metadata, explain, follow-up, sessions, exports
├── chief_of_staff/           # ← AI Chief of Staff (Phase 5)
│   ├── service.py            # Context aggregation, analysis engine, storage
│   ├── prompts.py            # Briefing, insights, recommendations, ask prompts
│   ├── scheduler.py          # Background periodic analysis cycles
│   └── routes.py             # Summary, briefing, insights, alerts, ask, notifications
├── connecthub/               # ← Enterprise Connect Hub sync framework
│   ├── service.py            # Modular connector definitions, sync state, ingestion pipeline
│   └── routes.py             # Connect/disconnect/sync endpoints
├── actiongraph/              # ← ActionGraph AI 2.0 engine
│   ├── service.py            # Dependency resolution, auto-progress, critical path, AI recommend
│   └── routes.py             # 7+ endpoints for task management
└── settings/                # LLM provider status + test endpoints

Frontend Structure

frontend/src/
├── api/axios.js             # Axios instance with JWT + 401 interceptor
├── context/AuthContext.jsx  # Auth state (login, register, logout)
├── pages/
│   ├── Landing.jsx          # Public landing page
│   ├── Login.jsx / Register.jsx
│   ├── Dashboard.jsx        # Metrics, charts, recent runs
│   ├── Documents.jsx        # Upload and manage documents
│   ├── Chat.jsx             # RAG Q&A with provider selector
│   ├── Workflows.jsx        # Workflow automation with provider selector
│   ├── Reports.jsx          # PDF report export with provider selector
│   ├── Evaluation.jsx       # AI observability dashboard
│   ├── KnowledgeBridge.jsx  # Adaptive role-aware multilingual document understanding
│   ├── ConnectHub.jsx       # Premium connector management and sync dashboard
│   ├── ActionGraph.jsx      # ActionGraph AI task execution dashboard
│   └── Settings.jsx         # Multi-provider status + test + docs
└── components/
    ├── Sidebar.jsx / Navbar.jsx
    ├── ChatMessage.jsx
    ├── DocumentCard.jsx
    ├── MetricCard.jsx
    └── UploadBox.jsx

API Reference

Method Endpoint Description
POST /auth/register Register new user
POST /auth/login Login, get JWT
GET /auth/me Current user info
POST /documents/upload Upload PDF/TXT/DOCX
GET /documents List user documents
DELETE /documents/{id} Delete document
POST /rag/ask RAG question with sources
POST /tools/summarize Summarize document
POST /tools/generate-email Generate email
POST /tools/generate-letter Generate letter
POST /tools/generate-checklist Generate checklist
POST /tools/agent Intent-routed agent
POST /workflows/run Run automation workflow
GET /logs AI execution logs
GET /dashboard/metrics Dashboard statistics
GET /reports List generated reports
POST /reports/export-pdf Generate PDF report
GET /knowledgebridge/languages List 10 supported languages
GET /knowledgebridge/metadata List languages, roles, levels, and document modes
GET /knowledgebridge/preferences Get KnowledgeBridge preferences
PUT /knowledgebridge/preferences Save KnowledgeBridge preferences
POST /knowledgebridge/explain Generate structured document explanation
POST /knowledgebridge/follow-up Ask role-aware follow-up questions
GET /knowledgebridge/explanations List saved explanations
GET /knowledgebridge/sessions List KnowledgeBridge sessions
GET /knowledgebridge/export-md/{id} Export explanation as Markdown
POST /knowledgebridge/export-pdf/{id} Export explanation as PDF
POST /actiongraph/action-items Create action item
GET /actiongraph/action-items List action items
PUT /actiongraph/action-items/{id} Update action item
PATCH /actiongraph/action-items/{id}/status Change status (with auto-progress)
POST /actiongraph/action-items/{id}/undo Undo last status change
POST /actiongraph/action-items/{id}/attach-doc Attach document to task
POST /actiongraph/actions/next-task Get next-best-task recommendation
POST /actiongraph/actions/recommend Get AI-powered action recommendation
POST /actiongraph/actions/progress Get task summary statistics
GET /memory/stats Knowledge graph statistics
GET /memory/search Search entities and relationships
GET /connecthub/connectors List supported connectors and current sync states
POST /connecthub/connect Connect or reconnect a connector
POST /connecthub/sync Trigger a sync for a connector
DELETE /connecthub/disconnect/{connector_key} Disconnect a connector
GET /chief-of-staff/summary Full executive summary (briefing + insights + recommendations + alerts + health)
GET /chief-of-staff/briefing Get today's daily briefing
POST /chief-of-staff/briefing/refresh Regenerate today's briefing
GET /chief-of-staff/insights List proactive insights
GET /chief-of-staff/recommendations List recommended actions
POST /chief-of-staff/recommendations/{id}/done Mark recommendation as actioned
POST /chief-of-staff/recommendations/{id}/dismiss Dismiss recommendation
GET /chief-of-staff/alerts List alerts (with severity filter)
POST /chief-of-staff/alerts/{id}/ack Acknowledge an alert
GET /chief-of-staff/health Organization health scores
GET /chief-of-staff/notifications List notifications
POST /chief-of-staff/notifications/{id}/read Mark notification as read
POST /chief-of-staff/ask Ask Chief of Staff a question
POST /chief-of-staff/analyze Trigger full analysis cycle
GET /memory/entities List all entities
GET /memory/entities/{id} Entity detail with relationships + observations
DELETE /memory/entities/{id} Delete entity and cascade
GET /memory/graph Full graph data (nodes + edges)
GET /settings/llm-providers Provider status list
POST /settings/test-provider Test a specific provider
GET /health Health check

Enterprise Memory (Knowledge Graph)

Enterprise Memory is a persistent organizational knowledge graph that automatically extracts entities and relationships from uploaded documents and integrates them into RAG answers.

How it works:

  1. Entity extraction — On document upload, the LLM extracts entities (people, projects, organizations, clients, budgets, deadlines, risks, etc.) and their relationships from document text
  2. Persistent storage — Entities, relationships, and evidence snippets stored in SQLite (KnowledgeEntity, KnowledgeRelationship, KnowledgeObservation)
  3. Deduplication — Same-name entities merged (upsert) across documents; growing knowledge base
  4. RAG integration — Before answering a question, the system queries the knowledge graph for relevant entities and injects them as context into the LLM prompt
  5. ActionGraph integration — Task entities auto-created when ActionItems are generated
  6. Interactive visualization — Frontend knowledge graph visualization using vis-network (force-directed layout, zoom, pan, click-to-inspect)
  7. Dashboard stats — Memory entity counts displayed on the main dashboard

Key components:

  • backend/app/memory/prompts.py — Entity type definitions, extraction prompt, RAG memory context prompt
  • backend/app/memory/service.py — Extraction, parsing, storage, search, graph data, stats, RAG context builder
  • backend/app/memory/routes.py — 6 REST endpoints under /memory/
  • frontend/src/pages/EnterpriseMemory.jsx — Full page with stats grid, search bar, entity list, interactive graph, entity detail panel

Resume Value

This project demonstrates:

  • AI Chief of Staff (Phase 5) — Proactive executive intelligence with auto-generated daily briefings, insight feeds, recommendation cards, alert system, natural-language enterprise Q&A, health scoring, background analysis scheduler, and cross-module context aggregation
  • Enterprise Memory (Knowledge Graph) — Automatic entity/relationship extraction from documents, persistent graph storage with deduplication, RAG integration for grounded answers, interactive graph visualization with vis-network, and ActionGraph task entity auto-creation
  • Multilingual AI document explanation — LLM-powered structured explanation generation in 10 Indian regional languages (Telugu, Hindi, Tamil, Kannada, Malayalam, Marathi, Bengali, Gujarati, Punjabi, English) with 12 analytical sections
  • Intelligent task execution system — Dependency-aware project management with critical path analysis, auto-progress propagation, next-best-task selection, and AI-powered recommendations
  • Production security hardening — Implementation of 5 security audit dimensions: secret leak prevention, PII data flow protection, pre-deployment security checks, deep security audit (SQL injection, IDOR, file validation), and attacker-perspective review
  • RAG pipeline — PDF/TXT/DOCX parsing, LangChain text splitter chunking, ChromaDB vector storage, cosine similarity retrieval
  • Source-grounded answers — Retrieved chunks shown as citations with confidence scores
  • Hallucination risk scoring — Based on source coverage and chunk count
  • Agent-style tool routing — Intent detection routes to the correct tool automatically
  • Multi-step workflow automation — Chained AI operations across multiple tools
  • Multi-LLM abstraction — Clean provider pattern supporting 6 APIs with a unified interface
  • AI observability — Per-request logging of latency, tokens, cost, risk, and tool used
  • Full-stack architecture — FastAPI + React + SQLite + ChromaDB
  • JWT authentication — Secure user isolation for all data and vectors
  • PDF export — Programmatic report generation with fpdf

About

Enterprise Brain OS is an AI-powered enterprise intelligence platform that transforms organizational knowledge into actionable insights. It combines RAG, hybrid search, AI agents, workflow automation, decision intelligence, knowledge graphs, and multi-source integrations to create a unified Enterprise Operating System for intelligent organizations.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages