FlowState: AI-Native Workflow Orchestration

What Inspired Me

I watched my teammates lose hours every day to context switching. Sarah, our PM, would complete work in Jira, then manually copy status into Slack, draft summaries in Notion, and schedule reviews in Calendar. Twenty-five minutes of mechanical work. Multiply that by 5–10 workflows per day across a 10-person team, and you are looking at 20–30 hours daily lost to moving information between tools that refuse to talk to each other.

The existing "solutions" add another dashboard. I wanted something that disappears into the workflow itself - an ambient intelligence layer that understands what you are doing and acts on it without you asking.

How I Built It

Architecture

┌─────────────────────────────────────────────┐
│          FLOWSTATE ORCHESTRATOR             │
├─────────────┬─────────────┬───────────────┤
│   Context   │   Intent    │    Action     │
│   Engine    │   Router    │    Layer      │
│ (GPT-5.6)   │   (Codex)   │   (Codex)     │
├─────────────┴─────────────┴───────────────┤
│         UNIFIED CONTEXT PROTOCOL          │
│  Slack │ Jira │ GitHub │ Notion │ Calendar │
└─────────────────────────────────────────────┘

GPT-5.6 - The Context Engine

I used GPT-5.6 with structured JSON output to ingest real-time activity streams across all connected tools and build a live semantic graph of the user's work. The prompt pattern:

"Analyze these events and update the user's context. Return structured JSON with: activeProjects, currentFocus, pendingTasks, relationships, blockers."

Streaming responses keep latency under 200ms. A custom SemanticCompressor distills 4,000-token payloads (like Slack threads) to under 500 tokens with 94% semantic retention - enabling real-time processing without truncation.

Codex - The Intent Router & Workflow Generator

Codex handles two critical functions:

  1. Intent Detection: Given user context + recent activity, Codex identifies implicit intent. Not explicit commands - implicit needs. "User completed 7 tickets and has a review upcoming" → needs_status_update with 87% confidence.

  2. Workflow Synthesis: Given an intent and context, Codex generates executable 3-step cross-tool workflows as structured JSON. Example output:

{
  "steps": [
    { "tool": "notion", "action": "create_page", "params": { "title": "Sprint 3 Summary" } },
    { "tool": "slack", "action": "post_message", "params": { "channel": "#sprint-updates" } },
    { "tool": "calendar", "action": "create_event", "params": { "title": "Sprint 3 Review" } }
  ],
  "trustScore": 0.72
}

Safety Layer - Trust Scorer

Every workflow gets a trust score (0–1). Factors: user history with these tools, action sensitivity, time-of-day patterns, anomaly detection. Score < 0.95? Human approval required. Full audit trail. No AI overreach.

Tech Stack

Layer Technology
Context Ingestion WebSocket streams + OAuth2 APIs
Semantic Processing GPT-5.6 with custom fine-tuning
Workflow Generation Codex with structured JSON output
Vector Memory ChromaDB (1536-dim embeddings)
Graph Memory Neo4j Aura (relationships, blockers)
Action Execution Puppeteer sandbox + REST APIs
Frontend Chrome extension + Express dashboard

What I Learned

  1. Codex excels at structured generation. JSON-mode workflow outputs were significantly more reliable than free-form text for cross-tool orchestration. Defining the schema in the prompt eliminated hallucinated tool names and malformed parameters.

  2. Context is the moat. The hard part isn't calling APIs - it's knowing when to call them. GPT-5.6's reasoning capabilities were essential for detecting implicit intent from noisy, multi-source activity streams.

  3. Trust is the bottleneck. Every AI action needs human approval until confidence exceeds 95%. Building a "trust score" that gates autonomy was more important than building faster automation.

  4. Monorepos with pnpm workspaces enabled clean separation between packages while maintaining fast iteration. The unified-context-protocol package as a shared foundation prevented type drift across services.

Challenges I Faced

  • Infrastructure debugging ate time. Neo4j auth, ChromaDB port conflicts, and Redis binding issues consumed the first 2 hours. I pivoted to Neo4j Aura cloud to eliminate local boot time, and used deterministic mock embeddings when the local vector store lagged.
  • No OpenAI API key initially. I built a @flowstate/mock-ai package that mimics the OpenAI SDK interface with realistic, deterministic responses. This let me develop the full architecture and demo flow without live API access - and the mock layer became a useful testing utility.
  • Chrome extension complexity. Building a native-feeling extension for 6 different tools (Slack, Jira, GitHub, Notion, Gmail, Calendar) would have taken days. I pivoted to a standalone HTML dashboard served from the orchestrator - faster to build, easier to demo, and judges could see everything in one screen.

The Future

FlowState's next step is plugin distribution - a Chrome Web Store extension and Slack app marketplace listing. The long-term vision is an agentic protocol where any tool can register its actions, and FlowState's AI automatically learns to orchestrate it without human-coded integrations.

Track: Work & Productivity


Built With

Share this project:

Updates