Programs of Programs
The Universal Orchestration Layer
Happen is a universal orchestration layer designed to solve the fundamental "schism" between disparate programs.
Every piece of software—your React frontend, your Python AI agent, your Postgres database, your Salesforce integration—is a "black box" program living in its own silo, speaking its own language. This creates brittle, complex integration code that obscures causality and makes systems impossible to observe or reason about.
Happen solves this with three core primitives:
The Core
1. Nodes & Events A single, universal communication protocol. Everything is an event. No distinction between "requests," "responses," "commands," or "notifications"—just events flowing between nodes.
2. The Causal Event Web A single, unbroken record that traces events from origin through every program they touch. Correlation IDs preserve causality automatically.
Programs of Programs
The power of Happen is recursive composition via events. Any wrapped program becomes a composable primitive that can:
Consume events from other programs
Emit events to other programs
Itself contain/orchestrate other programs (which are also just event-emitting nodes)
There is no distinction between a simple database query, a complex AI agent, an entire Python ecosystem, or your whole application. They're all just nodes speaking events.
Example 1: Simple Orchestration
A user action flows through three different wrapped programs.
Program 1: Browser UI (BrowserNode)
javascript
browserNode.broadcast({
type: 'report.generate',
payload: { user: 'sarah' }
});Program 2: Agent (AgentNode)
javascript
agentNode.on('report.generate', (event) => {
// Agent decides it needs analytics data
agentNode.broadcast({
type: 'analytics.getData',
payload: { user: event.payload.user },
correlationId: event.correlationId // Preserves causality
});
});Program 3: Database (DB-WrapperNode)
javascript
dbWrapper.on('analytics.getData', async (event) => {
// Translate to SQL
const data = await db.query('SELECT ...', [event.payload.user]);
// Emit result as event
dbWrapper.broadcast({
type: 'analytics.dataReady',
payload: data.rows,
correlationId: event.correlationId
});
});The agent listens for analytics.dataReady and completes the flow. The schism between browser, agent, and database disappears.
Example 2: Composing Entire Ecosystems
The real power: composition is fractal. Wrapping a single function is identical to wrapping an entire ecosystem.
Program 1: Your Happen Agent
javascript
happenAgent.broadcast({
type: 'financials.analyzeRisk',
payload: { company: 'ACME' },
correlationId: 'task-789'
});Program 2: Python CrewAI Ecosystem (Wrapped)
javascript
crewWrapper.on('financials.analyzeRisk', async (event) => {
// Translate event to CrewAI's language
const crew = createFinancialAnalysisCrew(event.payload.company);
// Run the entire ecosystem (itself a "program of programs")
const result = await crew.kickoff();
// Translate result back to event
crewWrapper.broadcast({
type: 'financials.analysisComplete',
payload: { result },
correlationId: event.correlationId
});
});From Happen's perspective, calling a database function and calling an entire AI agent swarm are identical operations. Both are just nodes emitting events.
What This Achieves
Universal composition: All programs become peers in a single event mesh, regardless of language, vendor, or complexity.
Fractal orchestration: A browser can trigger an agent, which triggers a Python swarm, which triggers a Salesforce wrapper. The depth doesn't matter—it's events all the way down.
Total observability: The Causal Event Web traces every event from origin through every program it touches, across all boundaries, automatically.
This is the Happen vision: not just building programs, but building a single, observable program of programs.
Last updated