Unclassified

IntegrateWise - Universal Cognitive Operating System

Agent Context Document

Version: 1.0
Last Updated: February 2026
Classification: Confidential


1. Executive Summary

IntegrateWise is a Universal Cognitive Operating System — an AI-powered Knowledge Workspace that fundamentally changes how organizations work with their tools, data, and AI.

Core Philosophy: "AI That Thinks in Context, Waits for Approvals"

Tagline: Normalize Once, Render Anywhere | Enhance, Don't Replace

The Differentiator: First application since 1945 to complete the full loop of human approval and post-approval agent execution with audit rails and evidence backing.


2. The Core Loop

LOAD → NORMALIZE → STORE → THINK → REVIEW & APPROVE → ACT → REPEAT

The REVIEW & APPROVE (Govern) stage is a hard gate. Nothing executes without:

  • Human approval
  • Audit trail
  • Evidence backing

This is what makes IntegrateWise fundamentally different from every AI-native tool on the market.


3. Four-Layer Architecture (L0–L3)

LayerNamePurposeKey Components
L0OnboardingSignup, context questions, tool connect, first data hydration4 stages: Entry + AI Insights → AI Loader Demo → Context Selection → Tool Connect + First Hydration
L1Context-Aware Workspace15 modules rendering context-specific views of normalized dataHome, Projects, Accounts, Contacts, Meetings, Docs, Tasks, Calendar, Notes, Knowledge Space, Team, Pipeline, Risks, Expansion, Analytics
L2Universal Cognitive Layer14 cognitive components for reasoning, action, and governanceSpineUI, ContextUI, KnowledgeUI, Evidence, Signals, Think, Act, HITL, Govern, Adjust, Repeat, AuditUI, AgentConfig, DigitalTwin
L3Universal BackendThe engine: 8-stage mandatory pipeline, 4 accelerators, 6 data storesPipeline stages, accelerators, stores, engines, dual-loop architecture, security model

Critical Rule: Every piece of data must flow through L3 before reaching L1 or L2. There are no shortcuts.


4. L0: Onboarding Flow

StageWhat HappensDuration
1. Entry + AI InsightsName + DOB input. AI personality analysis generates working style predictions, strengths, and growth areas. First "wow moment".0–15 sec
2. AI Loader DemoNatural language input demo. AI transforms unstructured input into structured actions across 4 tools simultaneously. Second "wow moment".15–30 sec
3. Context SelectionTwo workspace paths: Productivity Hub (OS) for ICs/PMs/Team Leads, or CS Platform for CSMs/AMs/CS Leaders. Same user can switch anytime. Signup (Google OAuth / email) happens here.30–50 sec
4. Tool Connect + First HydrationConnect 1–2 tools via OAuth or upload a data dump (CSV/JSON/PDF). Backfill sync runs paginated historical import through the full 8-stage pipeline. Onboarding Accelerator bootstraps the workspace.50–120 sec

5. L1: Context-Aware Workspace (15 Modules)

The L1 workspace consists of 15 modules, each providing a context-aware projection of normalized data from the Spine.

ModulePurposeKey Data Sources
HomePersonalized dashboard with signals, pending actions, and key metricsAll stores → aggregated view
ProjectsCross-tool project tracking with tasks, milestones, and ownershipTasks, Accounts, Contacts
AccountsUnified account view with health scores, risk signals, and engagementSpine SSOT + Accelerators
ContactsNormalized contact directory with engagement history and relationshipsSpine + Context Store
MeetingsCalendar integration with AI-generated agendas and action itemsCalendar tools + Think Engine
DocsDocument hub with unstructured content indexed and searchableContext Store (embeddings)
TasksCross-tool task aggregation with priority scoring and due datesSpine + multiple tool sources
CalendarUnified calendar view across all connected toolsCalendar tool connectors
NotesAI-assisted note-taking with auto-linking to entitiesContext Store + Spine links
Knowledge SpaceOrganizational knowledge base built from docs, chats, and interactionsContext Store + AI Chats Store
TeamTeam performance, workload distribution, and collaboration metricsSpine + Activity logs
PipelineDeal and opportunity tracking with velocity metricsCRM connectors + Accelerators
RisksProactive risk detection with evidence-backed alertsThink Engine + Signals component
ExpansionUpsell and growth opportunity identificationAccelerators + Spine analytics
AnalyticsCross-module analytics with growth-aligned reportingAll stores + Domain Accelerators

6. L2: Universal Cognitive Layer (14 Components)

The L2 cognitive layer is the reasoning and governance engine. Its 14 components are universal — they operate across all workspace contexts.

ComponentTypePurpose
SpineUIData SurfaceCanonical data browser — view and navigate normalized SSOT records
ContextUIData SurfaceUnstructured context viewer — documents, embeddings, related content
KnowledgeUIData SurfaceKnowledge graph explorer — organizational knowledge from all three planes
EvidenceIntelligenceEvidence compiler — assembles proof backing every signal and recommendation
SignalsIntelligenceSignal detector — identifies patterns, anomalies, and changes across data
ThinkReasoningSituation assessor — evaluates signals against goals and produces proposed actions
ActExecutionAction executor — carries out approved actions with tool write-back
HITLGovernanceHuman-in-the-loop approval gate — the hard stop before any AI action executes
GovernGovernancePolicy and compliance enforcement — ensures actions meet organizational rules
AdjustLearningFeedback loop — captures approval/rejection patterns to improve future proposals
RepeatLearningContinuous cycle driver — re-evaluates situations after actions complete
AuditUIComplianceAudit trail viewer — immutable log of all actions, approvals, and data changes
AgentConfigAdministrationAgent configuration — define, enable, tune, and monitor AI agents
DigitalTwinSimulationWorkspace simulation — test proposed changes before committing to production

7. L3: Universal Backend Engine

7.1 Three Data Ingestion Planes

PlaneData TypeIngestion PathStorage
Plane 1: Structured (Tool Data)CRM deals, support tickets, billing events, calendar entriesWebhooks/Polling → Connector Service → 8-Stage PipelineSpine (Neon PostgreSQL)
Plane 2: Unstructured (Documents)PDFs, CSVs, spreadsheets, emails, imagesUpload/Watch → R2 raw storage → Knowledge Service → Chunk + EmbedContext Store (pgvector + R2)
Plane 3: AI Chats (MCP Sessions)Conversations from Claude, ChatGPT, other AI providersMCP Connectors → Session Summarization → Compress at SourceAI Chats Store

7.2 Eight-Stage Mandatory Pipeline

Every piece of data — regardless of source, type, or urgency — must pass through all 8 stages. There are no shortcuts.

StageNameProcessingFailure Mode
1AnalyzerSource detection, object type identification, metadata extraction, schema version check. Stamps payload with pipeline_id for traceability.Unknown source or malformed payload → DLQ
2ClassifierCategory mapping to internal taxonomy, CTX enum assignment, priority scoring (critical/normal/batch), accelerator routing flags.Unmappable object type → DLQ
3FilterTenant-level and user-level data scope enforcement. Checks data against scope definitions set during L0 onboarding. PII detection flags.Scope rule error → pass-through with warning
4RefinerField-level transformations: date normalization (ISO 8601 UTC), currency conversion, text cleaning (HTML strip), entity resolution across tools.Schema mapping failure → DLQ
5ExtractorRelationship extraction (account→contacts, deal→line items), computed fields (deal velocity, sentiment), change delta calculation, embedding generation for documents.Extraction failure → DLQ with partial results
6ValidatorData integrity checks, deduplication (exact + fuzzy), business rule validation, cross-reference verification against existing Spine records.Integrity violation → DLQ
7Sanity ScanAI-powered anomaly detection, outlier identification, test data detection. Uses rules + ML to quarantine suspicious data before it enters stores.Anomaly detected → Quarantine for human review
8SectorizerFinal routing to appropriate stores (Spine, Context, AI Chats). Performs the dual-write. Emits events to Think Engine and triggers Accelerator recalculation.Write failure → retry queue with backoff

7.3 Four Accelerator Systems

AcceleratorPurposeKey Components
Extraction AcceleratorPreserve tool-native structure during ingestion. Captures formulas, automations, and relationships that would be lost in normalization.Ingress Controller, Tool Puller, Object Graph Builder, Formula Capture, Automation Capture, External ID Resolver
Normalization AcceleratorMap extracted data to the SSOT canonical schema. Handles schema detection, field transformation, and relationship preservation.Schema Detector, Schema Registry, Category Mapper, Field Transformer, Relationship Preserver, SSOT Builder
Onboarding AcceleratorL0-specific compute. Analyzes initial data to bootstrap the workspace with presets, templates, and scope definitions.Context Analyzer, Preset/Template Selector, Data Scope Definition
Domain Accelerators (×6)Post-normalization domain-specific intelligence. Each produces scored, goal-linked metrics.Customer Health Score, Churn Prediction, Revenue Forecaster, Pipeline Velocity, Support Health, Marketing Attribution

7.4 Six Data Stores

StoreTechnologyPurposeAccess Pattern
Spine (SSOT)Neon PostgreSQLCanonical normalized records. The single source of truth for all structured data.Read/write via Pipeline + Act Engine
Context Storepgvector on Neon + R2Embeddings, document chunks, and metadata for unstructured content. Enables semantic search.Write via Pipeline; read via Knowledge components
AI Chats StoreNeon PostgreSQLSummarized AI chat sessions. Never stores full transcripts — only compressed summaries.Write via MCP Connectors; read via KnowledgeUI
Audit StoreNeon (append-only)Immutable log of every action, approval, data change, and system event.Write-only from all services; read via AuditUI
Hot MemoryCloudflare Durable ObjectsReal-time state for active sessions, collaboration, and in-flight computations.Read/write by Workers; auto-evicts to cold storage
Dead Letter Queue (DLQ)Cloudflare Queue + NeonFailed pipeline items with full context for debugging and replay.Write from any pipeline stage; read by ops tooling

8. AI Agent System

Only One Cognitive Twin

The system operates with a single Cognitive Twin per tenant/workspace, not multiple specialized agents. This twin:

  • Maintains continuity across all interactions
  • Learns from all approved/rejected actions
  • Operates across all three data planes
  • Enforces governance policies uniformly

Key Principles:

  • Approval-only execution: Every agent proposal passes through the HITL gate
  • The Think Engine generates situations and proposed actions
  • The Govern layer enforces policy compliance
  • The HITL component presents proposals to the human approver
  • Only after explicit approval does the Act Engine execute
  • The Adjust component captures the approval or rejection to improve future proposals

9. Dual-Loop Architecture

IntegrateWise operates two reinforcing feedback loops that converge to create a self-improving system.

9.1 Loop A: Context-to-Truth (Human-Governed)

Context → Brainstorming → Action → Tool Write → Ingest → Normalize → Truth → View → Repeat

Captures human intelligence from governed channels (Slack, WhatsApp, Telegram, Custom GPTs) and converts it into executable actions.

Critical Rule: Brainstorming NEVER becomes truth directly. Truth is only created when an action writes to a tool, and the ingestion pipeline confirms and normalizes it.

9.2 Loop B: Tool-to-Truth (System-Governed)

Loader → 8-Stage Pipeline → Store (Spine) → Think Engine → Act Engine → Tool Write-Back → Repeat

Processes structured tool data through the continuous intelligence cycle.

9.3 Convergence

  • Loop A feeds Loop B through tools: human decisions result in tool updates, which Loop B ingests and normalizes
  • Loop A triggers change; Loop B confirms truth
  • Both converge into the Think Engine's views
  • Both repeat continuously
  • The convergence point is the Spine, where all validated truth resides regardless of origin

10. Infrastructure Stack

LayerServicePurpose
ComputeCloudflare WorkersAPI Gateway, pipeline stages, connector logic, engine services. Workers Paid plan; 50ms CPU limit; auto-scaling.
QueueCloudflare QueuesPipeline stage-to-stage messaging, DLQ, event bus. Dedicated queues per stage; batch size 10; max retries 3.
DatabaseNeon PostgreSQLSpine (SSOT), Context Store, AI Chats Store, Audit Store. Serverless compute; auto-suspend; PITR enabled.
Vector Searchpgvector on NeonEmbedding storage and similarity search for Context Store. HNSW index; cosine distance.
Object StorageCloudflare R2Raw files, document blobs, archived sessions, evidence attachments. S3-compatible; no egress fees.
CacheUpstash RedisRate limiting, session tokens, temporary computation results. Serverless; per-request pricing.
Durable StateCloudflare Durable ObjectsHot Memory, real-time collaboration state, connection sessions. Per-object isolation; transactional.
Cron / SchedulingCloudflare Cron TriggersScheduled sync polling, accelerator recalculation, cleanup jobs. Minute-level granularity.
DNS / CDNCloudflareDomain routing, SSL termination, DDoS protection, edge caching. Full proxy mode; WAF rules.
AI InferenceOpenRouterAI calls for Sanity Scan, Think Engine, session summarization. Multi-model routing; fallback chains.
AuthSupabase AuthUser authentication, JWT issuance, social login, MFA. RLS integration with Neon PostgreSQL.
Secrets ManagementDopplerCentralized secrets management across all environments. Injects env vars at runtime; no .env files.
Workflow Automationn8n (self-hosted)Internal operational workflows, email triage, notification routing. Hosted at n8n.integratewise.online.
Frontend HostingCloudflare PagesStatic site hosting for Vite React app. Automatic deployments from main branch.

11. Security Model

Security is enforced at every layer, from network edge to database row. Zero-trust principles: every request is authenticated, every query is scoped, every action is audited.

LayerMechanismImplementation
Network EdgeDDoS protection, WAF, rate limitingCloudflare proxy with WAF rules; per-IP and per-tenant rate limits
TransportTLS 1.3 everywhereCloudflare SSL termination; encrypted connections to Neon and R2
AuthenticationJWT + HMAC + OAuthSupabase Auth for users; HMAC for service-to-service; OAuth for tool connections
AuthorizationRBAC + RLSRole-based access control at API layer; Row-Level Security at database layer
Data IsolationTenant isolation via RLSEvery database query automatically scoped to tenant_id via PostgreSQL RLS policies
Encryption at RestAES-256Neon PostgreSQL encryption; R2 server-side encryption
Secret ManagementDopplerCentralized secrets vault; environment-specific configs; automatic rotation; audit logging
AuditImmutable audit logEvery data access, modification, and action logged to append-only Audit Store
PII HandlingField-level detectionPipeline Filter stage flags PII fields; configurable masking and retention policies
ComplianceGDPR, DPDP Act 2023Right to access, erasure, portability. Cascade delete with audit trail.

11.1 Data Commitments

  • No data selling — data is never sold, rented, or shared with third parties
  • No AI training — customer data is never used to train AI models
  • Full portability — export all data at any time
  • Complete deletion — request deletion and everything is removed, with audit confirmation
  • Transparent processing — data is only processed as the customer directs

12. Queue and Event Architecture

Queue NameProducerConsumerPurpose
connector.inboundWebhook handlers / Cron pollersStage 1: AnalyzerRaw payloads from connectors
pipeline.analyzedStage 1: AnalyzerStage 2: ClassifierAnnotated payloads
pipeline.classifiedStage 2: ClassifierStage 3: FilterClassified payloads
pipeline.filteredStage 3: FilterStage 4: RefinerScope-approved payloads
pipeline.refinedStage 4: RefinerStage 5: ExtractorNormalized payloads
pipeline.extractedStage 5: ExtractorStage 6: ValidatorEnriched payloads
pipeline.validatedStage 6: ValidatorStage 7: Sanity ScanValidated payloads
pipeline.scannedStage 7: Sanity ScanStage 8: SectorizerQuality-approved payloads
pipeline.dlqAny stage on failureDLQ ManagerFailed/quarantined items
engine.thinkSectorizer (post-write)Think EngineData change events for reasoning
engine.actHITL approvalAct EngineApproved actions for execution
accelerator.triggerSectorizer (post-write)Accelerator RouterAccelerator recalculation triggers
context.eventsSlack / WhatsApp / TelegramContext ProcessorGoverned channel messages
mcp.sessionsMCP ConnectorsSession ProcessorAI chat session captures

13. Growth-Aligned Data Model

IntegrateWise does not just track data — it tracks growth. Every record, metric, and signal is linked to organizational goals.

DimensionTraditional SystemsIntegrateWise
Data ModelStatic records: "We have 100 accounts with $850k ARR"Active, goal-linked: "100 accounts at 85% of $1M goal, $150k gap, Acme at MEDIUM RISK"
ViewReactive — "What happened?"Proactive, risk-aware — "What should I do to hit my goals?"
ActionManual — human interprets and decidesSuggested, evidence-based — AI proposes, human approves
LearningNone — same static view regardless of outcomesContinuous — every approval/rejection improves future proposals
AlignmentData disconnected from goalsEvery metric is a percentage of a goal, with risk scoring and gap analysis

14. Unique Architectural Combination

IntegrateWise combines eight architectural elements that no single competitor has brought together:

ElementExists Elsewhere?IntegrateWise
L0–L3 Cognitive ArchitectureNo✓ Full 4-layer cognitive system
MCP-Native (AI Tool Discovery)Anthropic only✓ Integrated for AI session capture
Dual-Write (Truth + Context)No✓ Spine + Context Store parallel writes
Preserved Work LayerTraditional apps only✓ Enhance, don't replace existing workflows
Approval-Only AgentsNo✓ Hard HITL gate before every action
Edge Correction (Self-Learning)Research papers only✓ Adjust + Repeat components in production
Growth-Aligned SchemaBI tools (static)✓ Active, goal-linked at database level
Continuous Learning LoopNo✓ Dual-loop with convergence at Spine

No competitor has more than 2–3 of these elements. IntegrateWise has all eight, working together.


15. Development Guidelines

15.1 Code Organization

packages/
├── api/                    # L3 API services (Cloudflare Workers)
├── connectors/            # Tool integrations (Salesforce, HubSpot, etc.)
├── mcp-connector/         # MCP protocol implementation
├── web/                   # L1 Workspace (Next.js)
├── cognitive/             # L2 components (React)
├── types/                 # Shared TypeScript definitions
├── config/                # Environment and configuration
└── lib/                   # Shared utilities

services/
├── loader/                # 8-stage pipeline implementation
├── normalizer/            # Schema transformation (NA0-NA5)
├── spine/                 # SSOT data service
├── context/               # Unstructured data service
├── think/                 # Reasoning engine
├── act/                   # Execution engine
├── govern/                # Policy enforcement
├── audit/                 # Audit logging service
├── accelerators/          # Domain intelligence engines
├── iq-hub/                # AI conversation management
├── knowledge/             # Vector search and embeddings
└── gateway/               # API gateway and routing

15.2 Key Principles for Agents

  1. No shortcuts through the pipeline — All data must flow through all 8 stages
  2. HITL is mandatory — No AI action executes without human approval
  3. Dual-write to Spine + Context — Every normalized record writes to both stores
  4. Evidence for every claim — All signals and recommendations must have provenance
  5. Tenant isolation is absolute — Every query must include tenant_id scoping
  6. Audit everything — Every action, approval, and data change is logged
  7. Normalize once, render anywhere — Canonical schemas are the source of truth
  8. Growth-aligned by default — All metrics link to goals

15.3 Testing Requirements

  • Unit tests for all pipeline stages
  • Integration tests for connector OAuth flows
  • End-to-end tests for approval workflows
  • Load tests for pipeline throughput (target: 10k events/minute)
  • Security tests for RLS policies
  • Chaos tests for DLQ recovery

15.4 Secrets Management (Doppler)

NO LOCAL .ENV FILES. All secrets are managed through Doppler.

Required Doppler Secrets:

VITE_SUPABASE_URL          # Supabase project URL
VITE_SUPABASE_ANON_KEY     # Supabase anonymous key
SUPABASE_SERVICE_KEY       # Service role key (backend only)
OPENROUTER_API_KEY         # AI inference API key
N8N_WEBHOOK_SECRET         # n8n workflow auth

Development Workflow:

# Login to Doppler
doppler login

# Setup project
doppler setup

# Run dev server with Doppler
doppler run -- npm run dev

# Build with Doppler
doppler run -- npm run build

Environment Structure:

  • dev — Local development
  • staging — Pre-production testing
  • prod — Production environment

Security Rules:

  1. Never commit secrets to git
  2. Never share service keys in Slack/email
  3. Rotate keys quarterly via Doppler
  4. Use separate projects for dev/staging/prod

16. Contact & Resources

  • Company: IntegrateWise LLP
  • Founded: 2025
  • Location: Bengaluru, India
  • Founder: Nirmal Prince J

Key Documents:

  • docs/ARCHITECTURE_OVERVIEW.md — High-level system design
  • docs/CANONICAL_ARCH_SPEC.md — L0-L3 canonical model
  • docs/DATABASE_SCHEMA.md — Data store specifications
  • docs/SERVICE_MESH_ARCHITECTURE.md — Backend service organization

This document is the authoritative source of truth for the IntegrateWise system architecture. All implementation decisions should align with the principles and specifications outlined here.