Skip to main content
The hardest level in the Stratus benchmark was Chaos Protocol — three independent tasks running simultaneously, each with its own timing window:
  1. Type a 5-digit cipher and submit
  2. Click a SUPPRESS button at exactly T=15s, T=35s, and T=60s (6-second window each)
  3. Toggle grid cells to match a target pattern
The Stratus agent completed all three. The baseline didn’t finish level 7 of 10. The key capability: tracking multiple state threads independently without losing context between them. This maps directly to real-world multi-agent coordination, parallel data processing, and concurrent workflow management.

Independent State Threads

Each task maintains its own state embedding. Stratus tracks them in parallel without cross-contamination.

Timing Constraints

Models temporal windows across concurrent tasks — knows when a time-sensitive action must preempt a longer-running one.

Interference Avoidance

Detects when two concurrent operations would collide in shared state and schedules around it automatically.

What We’re Building

A research agent that runs three parallel tasks:
  1. Search task — query 3 data sources simultaneously
  2. Monitor task — watch for real-time updates and capture them on a schedule
  3. Synthesis task — build a structured report as results arrive
Each task has independent state, but the synthesis task depends on output from both others. Stratus coordinates this without explicit orchestration logic.

The Agent

import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://api.stratus.run/v1',
  apiKey: process.env.STRATUS_API_KEY
});

interface TaskState {
  id: string;
  description: string;
  status: 'pending' | 'running' | 'blocked' | 'complete';
  results?: string;
  deadline?: string;
}

async function coordinateTasks(tasks: TaskState[], overallGoal: string) {
  const taskSummary = tasks
    .map(t => `${t.id} [${t.status}]: ${t.description}${t.results ? ` | Results so far: ${t.results}` : ''}${t.deadline ? ` | Deadline: ${t.deadline}` : ''}`)
    .join('\n');

  const response = await client.chat.completions.create({
    model: 'stratus-x1ac-base-gpt-4o',
    messages: [
      {
        role: 'system',
        content: `
          Concurrent task coordinator.
          Active tasks:
          ${taskSummary}

          Rules:
          - search-task and monitor-task run independently
          - synthesis-task can only proceed when both others have results
          - monitor-task must capture updates at T+10s, T+30s, T+60s windows
        `.trim()
      },
      { role: 'user', content: overallGoal }
    ]
  });

  return {
    nextActions: response.choices[0].message.content,
    sequence: response.stratus.action_sequence,
    confidence: response.stratus.overall_confidence
  };
}

async function runResearchAgent() {
  // Phase 1: Launch parallel tasks
  const phase1 = await coordinateTasks(
    [
      {
        id: 'search-task',
        status: 'pending',
        description: 'Query GitHub, HackerNews, and arXiv for "AI agents 2025"',
        deadline: 'No deadline'
      },
      {
        id: 'monitor-task',
        status: 'pending',
        description: 'Monitor Twitter/X for real-time mentions — capture at T+10s, T+30s, T+60s',
        deadline: 'Must start immediately — first window at T+10s'
      },
      {
        id: 'synthesis-task',
        status: 'blocked',
        description: 'Build structured report from search and monitor results',
        deadline: 'Can start once both other tasks have first results'
      }
    ],
    'Start all tasks. Prioritize monitor-task to hit the first timing window.'
  );

  console.log('Phase 1 plan:', phase1.nextActions);
  console.log('Sequence:', phase1.sequence.join(' → '));

  // Phase 2: Search task has results, monitor task hit T+10s
  const phase2 = await coordinateTasks(
    [
      {
        id: 'search-task',
        status: 'complete',
        description: 'Query GitHub, HackerNews, arXiv for "AI agents 2025"',
        results: '47 GitHub repos, 12 HN posts, 8 papers'
      },
      {
        id: 'monitor-task',
        status: 'running',
        description: 'Monitor Twitter/X for real-time mentions',
        results: '23 mentions captured at T+10s',
        deadline: 'Next window at T+30s — 18 seconds remaining'
      },
      {
        id: 'synthesis-task',
        status: 'pending',
        description: 'Build structured report from search and monitor results',
      }
    ],
    'Begin synthesis with available data. Monitor-task is still running — leave it space to hit T+30s window.'
  );

  console.log('\nPhase 2 plan:', phase2.nextActions);
  console.log('Confidence:', phase2.overall_confidence);
}

runResearchAgent();

Tracking Independent State Threads

The secret to reliable concurrent coordination is describing each task’s state independently in the system message. Stratus builds a separate embedding context for each thread.
// ❌ Mixing task state into one blob
const badState = "Doing search, monitoring Twitter, building report, next window in 18s";

// ✅ Clear per-task state
const goodState = `
  SEARCH-TASK [complete]: 47 GitHub repos, 12 HN posts, 8 arXiv papers retrieved.
  MONITOR-TASK [running]: 23 mentions at T+10s. Next window in 18s (T+30s).
  SYNTHESIS-TASK [unblocked]: Can begin. Has search results. Monitor results partial.
  DEPENDENCY: Synthesis must not block monitor's T+30s capture window.
`;

Handling Priority Preemption

When a time-sensitive task needs to interrupt a lower-priority one:
const response = await client.chat.completions.create({
  model: 'stratus-x1ac-base-gpt-4o',
  messages: [
    {
      role: 'system',
      content: `
        Task coordinator. Two concurrent tasks.
        BACKGROUND-TASK [running]: Processing 500 records, 40% complete, non-urgent.
        URGENT-TASK [triggered]: Alert received — must acknowledge within 30 seconds.
        CONSTRAINT: Only one task can hold the write lock at a time.
        Current lock holder: BACKGROUND-TASK.
      `
    },
    {
      role: 'user',
      content: 'Handle the urgent alert without corrupting the background task state'
    }
  ]
});

// Stratus predicts: pause-background → checkpoint-state → acquire-lock → handle-alert → release-lock → resume-background
console.log('Preemption plan:', response.stratus.action_sequence);

Interference Matrix

For complex multi-agent scenarios, make the interference rules explicit:
const interferenceMatrix = `
  Shared resources:
  - write-lock: only one holder at a time
  - api-rate-limit: max 10 req/s across all tasks
  - memory-budget: 2GB total across all tasks

  Current allocations:
  - task-a: holds write-lock, using 800MB, 4 req/s
  - task-b: queued for write-lock, using 600MB, 3 req/s
  - task-c: no lock needed, using 400MB, 2 req/s
`;

Real-World Applications

Parallel Data Pipelines

Multiple ETL jobs sharing write targets — schedule around lock contention automatically.

Multi-Agent Research

Agents querying different sources simultaneously, synthesizing as partial results arrive.

Webhook Orchestration

Multiple async event handlers that must not double-process or race on shared state.

Test Suite Coordination

Parallel test runners with shared fixtures — isolate state, manage teardown ordering.

Next Steps

Temporal Sequencing

When task order matters — avoiding conflicts in sequential workflows.

Cascade Prediction

Actions that trigger downstream waves of effects.

Rollout API

Simulate multi-task plans before any task fires.