AI-native workspace architecture

Brain system replication blueprint

A navigable technical description of the architecture, modules, data model, agent runtime, workflows, and implementation plan for a Notion + Airtable + Google Drive replacement with first-class AI agents, skills, MCP access, shared credentials, and automation.

Pages Databases Files Skills marketplace Small agents MCP server Credential vault Workflow automation

Executive summary

The system is best understood as an AI-native team operating system. Its core is intentionally small: pages, databases, and files. Everything else — charts, email campaigns, CRM enrichment, transcript analysis, task extraction, LP Telegram bots, DocSend-like analytics, and custom page design — is implemented as an app, skill, or agent on top of those primitives.

3 Core primitives: pages, databases, files
5–10 Ideal team size per workspace before splitting
Many Small agents instead of one monolithic agent
MCP Universal entry point from terminal, IDE, or assistant
Core pattern: every object is structured, every change is an event, every event can trigger an agent, every agent can use skills, and every skill reads/writes the workspace through permissions.

Architecture diagram

The architecture centers on a shared workspace graph. Humans use the web app, terminal/IDE tools use MCP, and bots/webhooks enter through the same API and event system.

Clients & entry points Web App Notion-like UI Terminal / IDE Claude Code, agents Bots & Webhooks Telegram, Gmail, Zoom Access layer Core API REST / GraphQL / RPC MCP Server Tool registry Auth & RBAC Permissions, policies Core workspace services Page Service Blocks, versioning Database Service Fields, views, formulas File Service Auto folders, previews Search Service Keyword + semantic Sharing Analytics DocSend-like links AI, automation & extensibility Agent Runtime Runs, steps, memory Skills Registry Marketplace, versions Credential Vault OAuth, API keys Automation Engine Triggers, workflows LLM Gateway Model routing, logs Persistent data & indexes Postgres Workspace graph Object Store Files, previews Search Index Keyword/vector Redis Cache, queues External systems Gmail Email + drafts Calendar Meetings, Zoom LinkedIn Data Enrichment Telegram Bots, buttons Event Platform Guest lists

Design principles

1. Small core

Keep only pages, databases, tables, and files in the product core. Everything else is an extension.

2. Everything is a skill or agent

Email sending, chart generation, rewrite tools, enrichment, and bots should be pluggable.

3. MCP as universal entry point

Expose workspace tools to terminal agents, IDEs, Claude Code, and other MCP-compatible clients.

4. Many small agents

Use composable agents like small functions, rather than giant agents with too many responsibilities.

5. Zero learning curve

Users should be able to open a terminal or UI and speak naturally to the system.

6. Autonomy over interaction

The long-term goal is not more dashboards. It is less manual interaction and more observed outcomes.

Core primitives

The primitives are deliberately generic. They let the team model a CRM, deal pipeline, document room, website, internal wiki, email campaign, event guest list, or portfolio request tracker without separate tools.

Pages

Notion-like editable documents composed of blocks. Pages can contain text, headings, toggles, generated images, embedded databases, generated charts, files, email composer blocks, and custom components.

CapabilityDescription
Block editorRich text, headings, lists, toggles, images, files, charts, database embeds.
AI actionsSpell check, rewrite, summarize, fact-check, generate image, generate chart from nearby data.
Custom designPrompt-edit record pages into dashboards, landing pages, or custom views.
Version historyTrack document versions and allow restore.
CollaborationPresence, live editing, cursors, and conflict-safe updates.
Databases

Airtable/Notion-like structured tables with fields, views, formulas, record pages, sensitive columns, action columns, and full cell-level history.

CapabilityDescription
Field typesText, number, select, status, date, person, email, URL, file, formula, relation, rollup, JSON, action.
ViewsTable, kanban, calendar, gallery, list, timeline, dashboard, custom page view.
Formula columnsPrompt-generate formulas that can reference field values and cell history.
Action columnsChanging a cell to a trigger value runs an automation, such as LinkedIn enrichment.
Audit historyRecord who changed every cell from old value to new value and when.
Files

Google Drive-like object storage that automatically mirrors the workspace hierarchy.

Workspace
  / Pages
      / Brain demo
          / unicorn_image.png
  / Databases
      / Deals
          / Acme AI
              / pitch_deck.pdf
              / diligence_notes.md
              / founder_call_transcript.txt

A file uploaded to a page appears under that page. A file uploaded to a database record appears under that record. Permissions inherit from the linked page, record, or field.

Key modules

Web workspaceSidebar, page editor, database views, file browser, agents, skills, credentials, settings.
Page serviceBlocks, collaboration, AI commands, charts, version history, custom pages.
Database serviceSchemas, fields, views, records, formulas, action columns, cell audit logs.
File serviceUploads, previews, extracted text, auto folders, file permissions, dedupe.
SearchFast search across pages, blocks, records, files, transcripts, emails, agents, skills.
Sharing analyticsPublic links, email-gated links, visitor tracking, time on page, downloads.
Agent runtimeTriggers, runs, steps, logs, memory, tool permissions, retries.
Skills registryPersonal skills, workspace marketplace, installed skills, versions, schemas.
Credential vaultOAuth, API keys, team credentials, grants, rotation, audit trail.
Automation engineEvent bus, queues, schedules, webhooks, retries, dead-letter queue.
Page editor module
  • Create folders and pages.
  • Edit rich-text blocks with Notion-style interactions.
  • Generate images directly inside a page.
  • Convert nearby table data into editable chart blocks.
  • Rewrite or summarize selected text with installed skills.
  • Insert data from any database into text or email templates.
  • Prompt-edit a chart: colors, labels, chart type, title, data source.
Database module
  • Create and modify databases manually or by natural language through MCP.
  • Support views, filters, sorts, grouping, relations, rollups, formulas, and record pages.
  • Store full cell-change logs for SLA metrics and historical formulas.
  • Mark fields as sensitive for obfuscation and field-level security.
  • Use action columns as a no-code trigger surface for agents.
Sharing and analytics module

Replaces lightweight DocSend use cases by sharing live pages with analytics.

ObjectPurpose
ShareLinkPublic/authenticated/email-gated access token for a page or file.
ShareVisitorEmail, browser, anonymized IP hash, first/last seen.
ShareEventPage open, block visible, scroll depth, chart interaction, file download.
Analytics dashboardVisitors, time spent, engagement, downloads, link status.
Real-time collaboration module

Use Yjs, Automerge, Liveblocks, or a custom CRDT/OT layer for live page and table editing.

  • Presence indicators and cursors.
  • Optimistic updates with server reconciliation.
  • Conflict-safe block and cell edits.
  • Incremental sync instead of full document reloads.

Data model

A practical relational model can sit in Postgres, with files in object storage and full-text/vector indexes in a dedicated search layer.

DomainEntitiesNotes
WorkspaceWorkspace, User, Membership, Role, PermissionPolicy, AccessGrantCentral access layer reused by API, UI, MCP, and agents.
PagesPage, Block, PageVersion, BlockVersionTree of editable blocks, versioned and collaborative.
DatabasesDatabase, DatabaseField, DatabaseView, DatabaseRecord, CellValue, CellChangeLogTracks current values and historical cell changes.
FilesFileAsset, FileFolder, FileLink, FileVersionFiles linked to pages, blocks, records, and fields.
AgentsAgent, AgentVersion, AgentRun, AgentRunStep, AgentMemory, AgentFeedbackSmall reusable agents with logs and feedback loops.
SkillsSkill, SkillVersion, SkillInstallation, SkillRunMarketplace with private and workspace-shared skills.
CredentialsCredential, CredentialGrant, CredentialUseLogEncrypted secrets with agent-specific grants.
AutomationEvent, Trigger, Workflow, WorkflowRun, ScheduledJobEvery workspace change can become an event.
SharingShareLink, ShareVisitor, ShareSession, ShareEventDocSend-like analytics for pages and files.
Critical table: CellChangeLog

The system needs cell-level history because SLA metrics and formulas can depend on when values changed, not just what the current value is.

CellChangeLog
- id
- workspace_id
- database_id
- record_id
- field_id
- old_value_json
- new_value_json
- changed_by_user_id
- changed_by_agent_id
- changed_at
- source: manual | import | agent | api | mcp
- agent_run_id
Critical table: AgentRunStep

Every tool call should be traceable so a human or repair agent can understand what happened.

AgentRunStep
- id
- run_id
- step_index
- type: llm | tool | skill | decision | wait | human_approval
- tool_name
- input_json
- output_json
- status
- started_at
- completed_at
- error_message
- model
- token_usage_json
- credential_ids_used

Agents & skills

Skills are reusable capabilities. Agents are stateful or triggered workflows that use tools, skills, credentials, and workspace context. Both should be versioned, permissioned, and observable.

Skill

Small reusable capability: rewrite in my style, summarize, fact-check, generate chart, enrich LinkedIn profile, extract asks.

Agent

Workflow with triggers and state: transcript enricher, portfolio update importer, LP Telegram bot, Hero task bot.

Recommended agent inventory

AgentTriggerPrimary function
Guest list importerManual MCP commandFind event, map attendees, insert rows into a database.
LinkedIn enricherAction column = EnrichEnrich selected person rows with LinkedIn/profile data.
Transcript importerCall recording completedStore transcript in Call Transcripts database.
Transcript enricherTranscript createdExtract people/companies, find context, update CRM.
Portfolio update importerEmail receivedDetect founder updates and store them in Portfolio Updates.
Ask extractorPortfolio update createdCreate classified Requests from asks inside updates.
Request resolverRequest createdSearch CRM for helpers and draft intro emails.
Hero task botEmail/conversation action itemSend task to Telegram with dismiss, reassign, complete buttons.
LP pipeline botDeal status changedPost shareable deals to Telegram with interactive buttons.
Housekeeping agentDaily/weekly scheduleFind duplicate agents, stale workflows, broken links, unused skills.
Repair agentAgent failureDiagnose failed runs and propose or apply safe fixes.
Natural-language agent builder flow
  1. Parse user intent from terminal, UI, or chat.
  2. Search existing agents, skills, databases, and credentials.
  3. Recommend reuse before creating a new agent.
  4. Create missing schema or fields when safe.
  5. Request or create credential authorization if required.
  6. Register trigger, workflow steps, tool permissions, and logging.
  7. Run a test on a small scope.
  8. Persist the workflow if the user asked for repeat behavior.
Skill marketplace behavior
VisibilityUse case
PrivatePersonal writing style, private shortcuts, experimental tools.
WorkspaceTeam-approved skills available across the product.
Internal marketplacePublished skills that team members can install.
Agent-backedA skill that calls a full agent workflow behind the scenes.

MCP interface

MCP is the universal control plane. It lets external assistants inspect the workspace, use skills, create databases, register automations, and operate with explicit permissions.

MCP toolPurpose
brain.searchSearch pages, records, files, agents, skills, and schemas.
brain.create_pageCreate a page or folder.
brain.update_pagePatch blocks, insert generated content, update custom design.
brain.create_databaseCreate a database with fields and default views.
brain.add_database_fieldAdd normal, formula, relation, sensitive, or action fields.
brain.query_recordsRead records with filters, sorting, and field-level permission checks.
brain.update_recordUpdate row values and write cell-change logs.
brain.run_skillRun an installed skill against selected text, records, files, or JSON.
brain.create_agentCreate a new agent after checking for reusable existing agents.
brain.create_credential_requestRequest OAuth/API-key authorization for an integration.
User: Add a column called Action. When the value changes to Enrich,
      enrich the corresponding row with LinkedIn data.

MCP client:
  1. brain.search databases "guest list"
  2. brain.add_database_field(type="action", name="Action")
  3. brain.search skills "LinkedIn enrichment"
  4. brain.create_agent(trigger="cell_changed", condition="Action == Enrich")
  5. brain.run_agent(test_record_id=...)

Reference workflows

Workflow 1 — Event guest list import
  1. User creates a Brain demo guest list database with name and email fields.
  2. User marks name/email as sensitive.
  3. User asks an MCP-connected assistant to import the event guest list.
  4. Agent searches the event platform, maps attendee data, and inserts records.
  5. Optional: user adds an Action column for enrichment.
Workflow 2 — LinkedIn enrichment action column
  1. Cell changes to Enrich.
  2. Automation engine emits cell.changed.
  3. LinkedIn enrichment agent loads row data.
  4. Credential vault provides approved enrichment credential.
  5. Agent writes LinkedIn URL, title, company, bio, and status.
  6. Agent sets Action to Enriched and logs the run.
Workflow 3 — Transcript enrichment and CRM update
  1. Recorded call transcript is stored in Call Transcripts.
  2. Agent extracts company names, people names, and action items.
  3. Agent searches historical emails for context: how we met, who introduced us, last interaction.
  4. Agent enriches people with LinkedIn and event-platform data.
  5. Agent updates People, Companies, Relationship Context, and Tasks databases.
Workflow 4 — Portfolio update to intro draft
  1. Email agent detects a founder update from a portfolio company.
  2. Update is stored in Portfolio Updates.
  3. Ask extractor creates Requests for help asks.
  4. Classifier assigns request type and owner.
  5. Resolver searches CRM for relevant helpers.
  6. Email agent drafts an introduction email in the right team member's inbox.
Workflow 5 — Hero Bot task management
  1. Task extractor reads emails and internal conversation transcripts.
  2. Likely action items become Task records.
  3. Telegram bot sends a task card with buttons: dismiss, reassign, complete.
  4. Dismissed tasks are treated as negative examples.
  5. Weekly learning job updates rules to avoid repeated false positives.
Workflow 6 — Mailchimp-like email campaign
  1. User writes an email inside a page.
  2. User inserts variables from a database.
  3. User selects sender account and recipient database.
  4. System sends individual emails, not CC, with throttling.
  5. Send logs are written back to the workspace.

Feature matrix

AreaMust-have featuresDifferentiating features
PagesBlock editor, rich text, nested pages, images, filesPrompt-generated charts, AI rewrite, custom page design, version history
DatabasesFields, rows, views, record pages, filters, sortsCell audit history, prompt formulas, sensitive fields, action columns
FilesUpload, preview, folders, permissionsAuto folders from pages and records, extracted text, dedupe, linked objects
SearchKeyword search across workspaceSemantic search, permission-aware indexing, instant table search
SharingPublic/authenticated linksEmail-gated links, visitor analytics, time spent, DocSend replacement
SkillsRun reusable prompt/tool actionsMarketplace, private/team publishing, skills available everywhere
AgentsManual runs and scheduled jobsNatural-language creation, event triggers, feedback learning, repair agents
CredentialsStore OAuth/API keysShared team credentials, per-agent grants, secret redaction, usage logs
CommunicationEmail draft/send, Telegram messagesMail merge from databases, intro drafts, LP deal bot, Hero task bot
GovernanceAudit logs and permissionsHousekeeping, security hygiene, cost hygiene, schema hygiene agents

Security, permissions, and safety

Because the system touches emails, transcripts, CRM data, outbound communications, and shared credentials, agents must be permissioned and auditable by design.

Field-level sensitivity

Mark columns such as names, emails, deal terms, LP names, and financials as sensitive.

Data obfuscation mode

One-click screen-sharing mode masks sensitive values across pages, databases, files, and analytics.

Agent allowlists

Agents receive explicit tool and credential grants, not universal workspace access.

Risky actions that should require approval

Bulk email send Delete records Change permissions Create public links Use shared credentials Export data Modify agent permissions
Audit log requirements
  • Who or what triggered the action.
  • Which records, pages, files, and credentials were accessed.
  • Which model and prompt version were used.
  • What the agent changed.
  • Whether a human approved the action.
  • Errors, retries, cost, and token usage.

Suggested implementation stack

The transcript does not specify all implementation choices, so this is a practical stack for building a similar system.

LayerRecommendationReason
FrontendNext.js, React, TypeScriptStrong ecosystem for editor, table, dashboard, and app shell.
EditorTiptap/ProseMirror or LexicalComposable block editor foundation.
TablesTanStack Table + virtualizationFast database rendering with large tables.
CollaborationYjs, Automerge, or LiveblocksCRDT/OT collaboration for pages and tables.
BackendNode.js/Fastify/NestJS or Python/FastAPITypeScript fits frontend; Python fits agent-heavy services.
Primary DBPostgreSQLWorkspace graph, schemas, permissions, logs.
FilesS3, GCS, or Cloudflare R2Durable object storage for uploads and generated artifacts.
SearchMeilisearch, Typesense, OpenSearch, pgvector, or QdrantKeyword plus semantic search.
QueuesTemporal, BullMQ, Celery, or Cloud TasksLong-running agent workflows and reliable retries.
LLM gatewayOpenAI, Anthropic, Gemini behind one internal gatewayModel routing, structured outputs, cost tracking, retries.
MCPTypeScript or Python MCP serverExpose Brain tools to any MCP-compatible client.
Performance techniques
  • Virtualized table rows and columns.
  • Server-side pagination and cursor queries.
  • Precomputed view indexes for common filters and sorts.
  • Incremental block loading for long pages.
  • Optimistic UI updates with WebSocket patch sync.
  • Separate search index for full-text and semantic retrieval.
  • Background formula recalculation and materialized fields.

Build roadmap

Workspace core

Auth, workspaces, users, roles, sidebar, pages, basic block editor, simple database tables, file uploads.

Databases and files

Field types, views, record pages, file fields, auto file hierarchy, sensitive fields, cell-change history.

Sharing and analytics

Public links, authenticated links, email-gated links, visitor tracking, version history, restore.

AI features in the UI

Spell check, rewrite, summarize, fact-check, generate image, generate charts, prompt formulas.

MCP and agent runtime

MCP server, tool registry, credential vault, skills registry, agent runs, logs, database action triggers.

Ingestion workflows

Gmail, calendar, transcript ingestion, event guest lists, LinkedIn enrichment, CRM auto-update.

Communication apps

Email composer, database mail merge, intro drafts, Telegram bot framework, LP bot, Hero Bot.

Governance agents

Housekeeping, repair, security hygiene, cost hygiene, schema hygiene, and agent-reuse checks.

Example schemas

Database schema: People
FieldTypeNotes
NametextSensitive in screen-share mode.
EmailemailSensitive; used for matching and campaigns.
CompanyrelationLinks to Companies database.
LinkedIn URLurlFilled by enrichment agent.
RoletextCurrent title or role.
SourceselectEmail, calendar, event, manual, transcript, import.
Last InteractiondateDerived from emails, calendar, transcripts.
Relationship ContextrelationLinks to interaction/context records.
ActionactionEnrich, draft intro, add to CRM, verify.
Database schema: Requests
FieldTypeNotes
Requestrich_textExtracted from founder update or conversation.
CompanyrelationPortfolio or deal company.
RequesterrelationFounder/person who asked.
TypeselectHiring, sales intro, fundraising, PR, legal, partnership.
OwnerpersonAssigned by classifier.
StatusstatusNew, triaged, in progress, waiting, done.
Suggested HelpersrelationCRM contacts found by resolver agent.
Draft Emailfile/page/refLink to generated intro draft.
Automation definition: action column enrichment
{
  "name": "Guest List LinkedIn Enrichment",
  "trigger": {
    "type": "database.cell_changed",
    "database": "Brain demo guest list",
    "field": "Action",
    "new_value": "Enrich"
  },
  "permissions": {
    "read_fields": ["Name", "Email", "Company"],
    "write_fields": ["LinkedIn URL", "Role", "Company", "Bio", "Action"],
    "credentials": ["linkedin_enrichment_provider"]
  },
  "steps": [
    {"type": "load_record"},
    {"type": "run_skill", "skill": "linkedin_enrich_person"},
    {"type": "update_record"},
    {"type": "set_field", "field": "Action", "value": "Enriched"},
    {"type": "write_audit_log"}
  ]
}
Formula example: SLA emoji
if(
  hours_since(last_changed("Stage")) > prop("SLA Hours"),
  "🟢 SLA exceeded",
  "⚪ Within SLA"
)

The exact syntax can vary, but the formula engine needs functions that reference historical cell changes.

Final implementation note

The fastest path is not to clone every Notion, Airtable, Google Drive, Mailchimp, and DocSend feature at once. Build the three primitives, expose them through a strong API and MCP, then let skills and small agents compose the domain-specific workflows. That is the architectural move that makes the system powerful.