Skip to content

open-octopus/coral

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

OpenOctopus

coral

Family event routing engine β€” same event, every member, the right context.

CI License Status Core Discord


Status: Alpha β€” Workflow parser, DAG executor, context interpolation, gateway client, and resume support are implemented with 114 tests passing.

What is coral?

coral is the family event routing engine for OpenOctopus. It powers the core differentiator: one event triggers intelligent, role-aware responses across realms and family members. coral provides DAG-based (Directed Acyclic Graph) orchestration for cross-realm coordination with family-aware routing.

Named after the coral structures that connect and support diverse life in a reef, coral connects your Realms into coordinated workflows β€” and routes outputs to the right family member with the right context.

The Killer Scenario: Grandpa's Knee

When grandpa mentions "My knee hurts again" in the family group chat, coral routes intelligently:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Trigger: "Grandpa says his knee hurts"        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β–Ό            β–Ό            β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚ Health     β”‚ β”‚ Finance β”‚ β”‚ Parents  β”‚
   β”‚ Realm      β”‚ β”‚ Realm   β”‚ β”‚ Realm    β”‚
   β”‚            β”‚ β”‚         β”‚ β”‚          β”‚
   β”‚ Medical    β”‚ β”‚ Insuranceβ”‚ β”‚ Family   β”‚
   β”‚ history +  β”‚ β”‚ balance +β”‚ β”‚ schedule β”‚
   β”‚ available  β”‚ β”‚ coverage β”‚ β”‚ check    β”‚
   β”‚ doctors    β”‚ β”‚ status   β”‚ β”‚          β”‚
   β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
         β”‚              β”‚           β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚ Role-Aware       β”‚
              β”‚ Routing          β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β–Ό            β–Ό            β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚ β†’ Dad      β”‚ β”‚ β†’ Mom   β”‚ β”‚ β†’ Daughterβ”‚
   β”‚            β”‚ β”‚         β”‚ β”‚          β”‚
   β”‚ "Schedule  β”‚ β”‚ "Buy    β”‚ β”‚ (not     β”‚
   β”‚  checkup?" β”‚ β”‚ pain    β”‚ β”‚ disturbed)β”‚
   β”‚ + history  β”‚ β”‚ relief?"β”‚ β”‚          β”‚
   β”‚ + slots    β”‚ β”‚ + supplyβ”‚ β”‚          β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

3 seconds. Same event, 3 different family members, 3 different versions β€” each with the context they need.

More Examples

Travel Preparation

When you say "I'm traveling to Tokyo next week for 5 days", coral orchestrates across multiple Realms:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Trigger: "Travel to Tokyo, 5 days"      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β–Ό            β–Ό            β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚ Pet Realm  β”‚ β”‚ Finance β”‚ β”‚ Work     β”‚
   β”‚            β”‚ β”‚ Realm   β”‚ β”‚ Realm    β”‚
   β”‚ Momo:      β”‚ β”‚         β”‚ β”‚          β”‚
   β”‚ "Who feeds β”‚ β”‚ Budget  β”‚ β”‚ Set OOO  β”‚
   β”‚  me for    β”‚ β”‚ estimateβ”‚ β”‚ Delegate β”‚
   β”‚  5 days?"  β”‚ β”‚ Β₯X,XXX  β”‚ β”‚ tasks    β”‚
   β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
         β”‚              β”‚           β”‚
         β–Ό              β–Ό           β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚ Parents    β”‚ β”‚ Vehicle β”‚ β”‚ Health   β”‚
   β”‚ Realm      β”‚ β”‚ Realm   β”‚ β”‚ Realm    β”‚
   β”‚            β”‚ β”‚         β”‚ β”‚          β”‚
   β”‚ Mom: "I canβ”‚ β”‚ Airport β”‚ β”‚ Travel   β”‚
   β”‚ come take  β”‚ β”‚ parking β”‚ β”‚ insuranceβ”‚
   β”‚ care of    β”‚ β”‚ or taxi?β”‚ β”‚ check    β”‚
   β”‚ Momo!"     β”‚ β”‚         β”‚ β”‚          β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚              β”‚           β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚ Travel Checklist  β”‚
              β”‚ (unified action   β”‚
              β”‚  plan for user    β”‚
              β”‚  confirmation)    β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Each Realm's agents contribute their perspective, and coral merges the results into a unified, actionable plan.

coral DAG Execution Architecture

Planned Design

DAG Orchestration

Workflows are defined as directed acyclic graphs where each node is a Realm query or action:

workflow: travel-preparation
trigger: "travel to {destination} for {duration}"
steps:
  - id: pet-care
    realm: pet
    action: arrange-care
    params: { duration: "{{duration}}" }

  - id: budget
    realm: finance
    action: estimate-budget
    params: { destination: "{{destination}}", duration: "{{duration}}" }

  - id: work-handoff
    realm: work
    action: set-out-of-office
    params: { duration: "{{duration}}" }

  - id: transport
    realm: vehicle
    action: plan-transport
    depends_on: [budget]

  - id: health-check
    realm: health
    action: travel-health-check
    params: { destination: "{{destination}}" }

  - id: summarize
    action: merge-results
    depends_on: [pet-care, budget, work-handoff, transport, health-check]

Core Capabilities

  • DAG execution β€” Parallel and sequential step orchestration with dependency resolution
  • Cross-realm context β€” Each step can read (but not write) data from other Realms
  • Summoned agent participation β€” Summoned entities contribute to workflows from their perspective
  • Human-in-the-loop β€” Critical actions require user confirmation before execution
  • Failure handling β€” Retry, skip, or fallback strategies per step
  • Resumable β€” Pause at approval gates, resume later without re-running completed steps

Workflow Step Lifecycle

Planned CLI

# Run a workflow by name
coral run travel-preparation --args '{"destination":"Tokyo","duration":"5 days"}'

# Run from a YAML file
coral run --file workflows/travel-preparation.yml --args '{"destination":"Tokyo","duration":"5 days"}'

# Dry run β€” show what would execute without side effects
coral run travel-preparation --dry-run --args '{"destination":"Tokyo","duration":"5 days"}'

# List available workflows
coral list

# Validate a workflow file
coral validate workflows/my-workflow.yml

# Resume a paused workflow (at approval gate)
coral resume --token wf_abc123

Expected Output

$ coral run travel-preparation --args '{"destination":"Tokyo","duration":"5 days"}'

[coral] Starting workflow: travel-preparation
[coral] Step pet-care     ... running (Pet Realm)
[coral] Step budget       ... running (Finance Realm)
[coral] Step work-handoff ... running (Work Realm)
[coral] Step health-check ... running (Health Realm)
[coral] Step pet-care     ... done β€” Mom will care for Momo
[coral] Step budget       ... done β€” Estimated budget: Β₯180,000
[coral] Step work-handoff ... done β€” OOO set, tasks delegated
[coral] Step health-check ... done β€” Travel insurance valid
[coral] Step transport    ... running (Vehicle Realm, depends on: budget)
[coral] Step transport    ... done β€” Airport taxi booked, Β₯6,500
[coral] Step summarize    ... merging results

Travel Checklist:
  - Pet care: Mom will visit daily (confirmed)
  - Budget: Β₯180,000 estimated (flights Β₯85,000 + hotel Β₯65,000 + daily Β₯30,000)
  - Work: OOO Mar 15-20, 3 tasks delegated to team
  - Transport: Taxi to NRT, Β₯6,500 (pickup 6:00 AM)
  - Health: Travel insurance active, no vaccinations needed

Approve this plan? [y/n]

More Workflow Examples

Morning Routine

workflow: morning-routine
trigger: "good morning"
steps:
  - id: health-check
    realm: health
    action: daily-summary

  - id: calendar
    realm: work
    action: today-preview

  - id: pet-status
    realm: pet
    action: care-status

  - id: weather
    action: fetch-weather

  - id: summarize
    action: merge-results
    depends_on: [health-check, calendar, pet-status, weather]

Moving House

workflow: moving-house
trigger: "moving to {address} on {date}"
steps:
  - id: utilities
    realm: home
    action: transfer-utilities
    params: { new_address: "{{address}}", date: "{{date}}" }

  - id: pet-logistics
    realm: pet
    action: moving-plan
    params: { date: "{{date}}" }

  - id: address-update
    realm: legal
    action: update-address
    params: { new_address: "{{address}}" }

  - id: insurance
    realm: finance
    action: update-policies
    depends_on: [address-update]

  - id: vet-transfer
    realm: pet
    action: find-new-vet
    depends_on: [pet-logistics]
    params: { near: "{{address}}" }
    approval: required

  - id: checklist
    action: merge-results
    depends_on: [utilities, pet-logistics, address-update, insurance, vet-transfer]

Planned Tech Stack

Component Choice
Runtime Node.js >= 22 + TypeScript
DAG Engine Custom (inspired by LangGraph, Temporal)
Workflow Format YAML definitions
Integration WebSocket RPC to ink gateway

Roadmap

  • Workflow YAML format specification
  • DAG parser and validator
  • Step executor with dependency resolution
  • Cross-realm context injection
  • Summoned agent participation protocol
  • Built-in workflow templates (travel, moving, event planning)
  • Visual workflow editor (dashboard integration)

Related Projects

Project Description
openoctopus Core monorepo β€” Realm manager, agent runner, ink gateway
realms Official realm packages
realmhub Realm package marketplace

Contributing

coral is in the planning phase. Join The Reef (Discord) to discuss workflow design, or open an issue with use case ideas.

See CONTRIBUTING.md for general guidelines.

License

MIT β€” see the .github repo for the full license text.

About

Realm-native workflow engine β€” cross-realm automation pipelines πŸͺΈ

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors