Dashboard

Profit & Loss

Monthly Revenue
$0.00
$0.00/year
Monthly Expenses
$0.00
$0.00/year
Net Profit/Loss
$0.00
$0.00/year

Blocked Tasks

Active Work

Type:
I'm ALICE, your unified AI intelligence. I have complete awareness across all of Ensomnia Media β€” operations, content, products, legal, and personal. Ask me anything and I'll draw from every domain to give you the full picture.
Name Type Brain URL
Name Language URL
Name Type Login Password Linked To
Active Monthly
$0.00
Active Annual
$0.00
Total (incl. Inactive)
$0.00
App Name Monthly Cost Annual Cost Status
Estimated Monthly
$0.00
Estimated Annual
$0.00
Source Description Est. Monthly Est. Annual

Integrating an app? Start here

This page is a complete, self-contained spec for connecting one of your apps to the cortex brains. To integrate a new app, hand the full spec below to an AI session that has context of that app and ask it to propose a plan, then build the integration.

The copied spec includes the event envelope, both ingress methods, routing rules, and the live capability catalog (every domain.action each brain accepts) β€” everything an agent needs to plan and implement.

External Integration

Connect external apps to the cortex using bidirectional events. External apps can push events into the cortex (triggering brain actions), and brains can publish events out to external apps.

External App                         Cortex
────────────                         ──────
               ── publish event ──→  EventBridge  ──→  ALICE classifies
               ←── brain event  ──   EventBridge  ←──  Brain takes action

Two ingress methods:
  1. HTTP: POST /api/core/external/events (X-API-Key auth)
  2. AWS EventBridge: PutEvents to "cortex-events" bus

Event Envelope

All events use this standard envelope format:

{
  "source": "external.your-app-name",
  "type": "domain.action",
  "brain": "auto",
  "priority": "normal",
  "payload": { ... },
  "correlationId": "optional-uuid",
  "timestamp": "optional-iso8601"
}
source Your app identifier. Must start with external. (e.g., external.email-app, external.calendar)
type Event type in domain.action format (e.g., email.received, payment.completed)
brain "auto" = ALICE classifies and routes, or specify a brain ID for direct routing (e.g., "finance", "legal")
priority low, normal, high, or critical (default: normal)
payload Event data (any JSON object)
correlationId UUID for tracking (auto-generated if omitted)
timestamp ISO 8601 timestamp (auto-generated if omitted)

Publishing Events via HTTP

The simplest way to send events. Authenticate with your API key.

POST /api/core/external/events

Publish an event into the cortex. ALICE will classify and route it, or you can target a specific brain.

curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "external.email-app",
    "type": "email.received",
    "brain": "auto",
    "priority": "high",
    "payload": {
      "from": "lawyer@firm.com",
      "subject": "Contract Review Required",
      "body": "Please review the attached NDA..."
    }
  }' \
  https://alice.ensomniamedia.com/api/core/external/events

Response:

{
  "accepted": true,
  "correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Publishing Events via EventBridge

For apps running in AWS, publish directly to the cortex-events EventBridge bus.

// Node.js / AWS SDK v3
import { EventBridgeClient, PutEventsCommand } from '@aws-sdk/client-eventbridge';

const client = new EventBridgeClient({});
await client.send(new PutEventsCommand({
  Entries: [{
    EventBusName: 'cortex-events',
    Source: 'external.my-app',
    DetailType: 'payment.received',
    Detail: JSON.stringify({
      source: 'external.my-app',
      type: 'payment.received',
      brain: 'finance',
      priority: 'normal',
      payload: { amount: 150.00, vendor: 'AWS', category: 'infrastructure' }
    })
  }]
}));

AWS CLI equivalent:

aws events put-events --entries '[{
  "EventBusName": "cortex-events",
  "Source": "external.my-app",
  "DetailType": "payment.received",
  "Detail": "{\"source\":\"external.my-app\",\"type\":\"payment.received\",\"brain\":\"finance\",\"payload\":{\"amount\":150}}"
}]'

Receiving Events from Brains

Brains publish events to the cortex-events bus with source cortex.{brainId}. Create an EventBridge rule to subscribe.

// CDK example: subscribe to all cortex brain events
const rule = new events.Rule(this, 'CortexListener', {
  eventBus: events.EventBus.fromEventBusName(this, 'CortexBus', 'cortex-events'),
  eventPattern: {
    source: [{ prefix: 'cortex.' }]
  },
});
rule.addTarget(new eventsTargets.LambdaFunction(myHandler));

You can filter by specific brain or event type:

// Only listen to finance brain events
eventPattern: { source: ['cortex.finance'] }

// Only listen to task completion events
eventPattern: { source: [{ prefix: 'cortex.' }], detailType: ['tasks.completed'] }

Routing

Events are routed based on the brain field in the envelope:

"brain": "auto" ALICE reads the event, classifies it, and calls the right brain tools. Best for ambiguous events like emails or notifications.
"brain": "{brainId}" Routes directly to the specified brain. Skips ALICE. Use when you know the target (e.g., "finance" for invoices, "legal" for contracts).

Brain Reference

Available brains and what they handle (loaded live from the registry):

core Business operations, tasks, resources, support tickets, budget, revenue
home Home automation: controllable devices + monitored sensors/cameras with activity history
finance Accounts, transactions, bills, invoices, taxes, financial planning
legal Legal cases, contracts, AI-powered legal research
content Content sites, publishing schedules, posts, analytics
products SaaS products (Fifo, IBYOK), metrics, incidents, roadmap
devops AWS infrastructure: health, errors, CloudWatch alarms, costs + anomaly detection, CloudFormation, Lambda, EventBridge, ECS/Fargate, GitHub Actions CI, GitHub repo registry, DNS, CDN, storage, alerts
general Open-domain knowledge and conversation β€” explanations, advice, brainstorming, casual chat not about your own data

Capability Catalog

Every domain.action you can target. For direct routing, set "brain" to the brain id and "type" to "domain.action" (e.g. finance + transactions.create). Loaded live from the registry.

Loading capability catalog…

Integration Examples

Email App

Forward emails to ALICE for classification. She'll route to the right brain automatically.

// Your email sync app detects a new email
await fetch('https://alice.ensomniamedia.com/api/core/external/events', {
  method: 'POST',
  headers: { 'X-API-Key': API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    source: 'external.gmail-sync',
    type: 'email.received',
    brain: 'auto',  // ALICE decides: legal? finance? core?
    priority: 'normal',
    payload: {
      from: 'accountant@firm.com',
      subject: 'Q1 Tax Documents Ready',
      body: 'Your quarterly tax prep documents are ready for review...',
      receivedAt: '2026-03-23T10:30:00Z'
    }
  })
});

Banking App (Direct Routing)

When you know the target brain, skip ALICE and route directly.

// Banking app detects a new transaction
{
  "source": "external.bank-sync",
  "type": "transactions.create",
  "brain": "finance",  // Direct to finance brain
  "payload": {
    "amount": -89.99,
    "description": "AWS Monthly Bill",
    "category": "infrastructure",
    "date": "2026-03-23"
  }
}

Listening for Brain Events

Your apps can react when brains take action.

// Your notification app listens for cortex events
// EventBridge rule: source = cortex.*, target = your Lambda

export async function handler(event) {
  const detail = event.detail;

  if (detail.source === 'cortex.finance' && detail.type === 'bills.overdue') {
    await sendPushNotification('Overdue bill!', detail.payload);
  }

  if (detail.source === 'cortex.devops' && detail.type === 'alerts.critical') {
    await pageOncall(detail.payload);
  }
}
Ticket Resource From Issue Status Created
Name Type Description Admin Portal Account Status

Cross-Brain Status

Loading jobs...

Loading content sites...

Loading content analytics...

Loading products...

Loading product metrics...

Loading incidents...

Loading roadmap...

Loading accounts...

Loading transactions...

Loading bills...

Loading invoices...

Loading tax items...

Loading financial planning...

Loading stacks...

Loading Lambda functions...

Loading EventBridge rules...

Loading ECS clusters...

Latest GitHub Actions run per repo (repos with workflows).

Loading CI status...

Dispatch a claude-assigned task to the coder by asking ALICE.

Loading coding agents...

Loading costs...

Loading DNS zones...

Loading CDN distributions...

Loading storage...

Loading devices...

Loading activity...

Add or edit contacts by asking ALICE.

Loading contacts...

Loading calendar...

Log messages by asking ALICE.

Loading communications...