Orchestrator

Manages pipeline registry, execution lifecycle, hooks, and error handling.

Interactive Demo

Register and run pipelines with different strategies

Code Example

orchestrator-demo.ts
import { Orchestrator, MemoryStore } from "@shivamsharma11/agent-sdk";

const orchestrator = new Orchestrator({ storage: new MemoryStore() });

// Register a pipeline
orchestrator.registerPipeline({
  name: "greet",
  run: async (input) => `Hello, ${input}!`,
});

// Run a single pipeline
const result = await orchestrator.run("greet", "World");

// Run multiple pipelines with a strategy
const results = await orchestrator.runStrategy("parallel", [
  { name: "greet", input: "Alice" },
  { name: "greet", input: "Bob" },
]);