npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@orchestree/conductor

v1.4.0

Published

Conductor module — AI agent routing, workflow orchestration, memory systems, fleet management

Readme

@orchestree/conductor

Workflow orchestration and agent management for Orchestree. Create, execute, and monitor complex workflows with intelligent agent routing and distributed execution.

Installation

npm install @orchestree/conductor

Quick Start

const { WorkflowClient } = require('@orchestree/conductor');

const client = new WorkflowClient({
  apiKey: 'your-api-key',
  baseURL: 'https://api.orchestree.io',
});

// Create a workflow
const workflow = await client.createWorkflow({
  name: 'DataProcessingPipeline',
  steps: [
    {
      id: 'step1',
      name: 'Validate Data',
      type: 'validation',
      config: { schema: 'data-schema-v1' },
    },
    {
      id: 'step2',
      name: 'Process Data',
      type: 'processing',
      config: { processor: 'standard' },
    },
  ],
  metadata: { version: '1.0' },
});

// Execute the workflow
const execution = await client.runWorkflow(workflow.id, {
  data: { /* input data */ },
});

// Monitor execution
const logs = await client.getExecutionLogs(execution.executionId);
console.log(logs);

Core Concepts

Workflows

Workflows are sequences of steps that define complex processes. Each workflow can be versioned, monitored, and triggered by various events.

Agents

Agents are distributed executors that handle task execution. Register agents to expand the conductor's capabilities.

Memory Store

A distributed key-value store for sharing state across workflow executions.

Fleet Management

Monitor and manage multiple agents as a unified fleet with health checks and load balancing.

API Reference

WorkflowClient

Constructor

new WorkflowClient(config)

Config Options:

  • apiKey (string, required): Your Orchestree API key
  • baseURL (string, optional): API base URL (default: https://api.orchestree.io)

Methods

createWorkflow(workflowDef)

Create a new workflow.

const workflow = await client.createWorkflow({
  name: 'MyWorkflow',
  steps: [/* steps */],
  metadata: { /* optional */ },
});

Parameters:

  • workflowDef.name (string): Workflow name
  • workflowDef.steps (array): Array of workflow steps
  • workflowDef.metadata (object, optional): Additional metadata

Returns: Promise


runWorkflow(workflowId, input, options)

Execute a workflow.

const execution = await client.runWorkflow('workflow-123', {
  userId: 'user-456',
  action: 'process',
});

Parameters:

  • workflowId (string): ID of workflow to execute
  • input (object, optional): Input parameters
  • options (object, optional): Execution options

Returns: Promise


listWorkflows(filters)

List all workflows.

const workflows = await client.listWorkflows({
  status: 'active',
  limit: 20,
  offset: 0,
});

Parameters:

  • filters.status (string): Filter by status
  • filters.limit (number): Maximum results
  • filters.offset (number): Pagination offset
  • filters.tags (array): Filter by tags

Returns: Promise<Workflow[]>


getExecutionLogs(executionId, options)

Retrieve execution logs.

const logs = await client.getExecutionLogs('exec-123', {
  limit: 100,
});

Parameters:

  • executionId (string): Execution ID
  • options (object, optional): Log retrieval options

Returns: Promise<ExecutionLog[]>


registerAgent(agentDef)

Register a new agent.

const agent = await client.registerAgent({
  name: 'DataProcessor',
  endpoint: 'https://agent.example.com',
  capabilities: ['process', 'validate'],
  timeout: 30000,
});

Parameters:

  • agentDef.name (string): Agent name
  • agentDef.endpoint (string): Agent endpoint URL
  • agentDef.capabilities (array): List of capabilities
  • agentDef.metadata (object, optional): Additional metadata
  • agentDef.timeout (number, optional): Request timeout

Returns: Promise


routeTask(task, options)

Route a task to an appropriate agent.

const result = await client.routeTask({
  type: 'data-process',
  payload: { data: [1, 2, 3] },
}, {
  priority: 'high',
  timeout: 60000,
});

Parameters:

  • task.type (string): Task type
  • task.payload (object): Task payload
  • options.timeout (number, optional): Timeout in milliseconds
  • options.retryCount (number, optional): Number of retries
  • options.priority (string, optional): Task priority

Returns: Promise


getMemory(key, scope)

Get value from memory store.

const value = await client.getMemory('session-123', 'global');

Parameters:

  • key (string): Memory key
  • scope (string, optional): Memory scope (default: 'global')

Returns: Promise


setMemory(key, value, scope, options)

Set value in memory store.

await client.setMemory('session-123', { user: 'john' }, 'global', {
  ttl: 3600,
  encrypted: true,
});

Parameters:

  • key (string): Memory key
  • value (any): Value to store
  • scope (string, optional): Memory scope (default: 'global')
  • options.ttl (number, optional): Time to live in seconds
  • options.encrypted (boolean, optional): Enable encryption

Returns: Promise


getFleetStatus(fleetId)

Get fleet status.

const status = await client.getFleetStatus('fleet-123');

Parameters:

  • fleetId (string, optional): Fleet ID

Returns: Promise


listAgents(filters)

List all registered agents.

const agents = await client.listAgents({
  status: 'active',
});

Parameters:

  • filters (object, optional): Filter options

Returns: Promise<Agent[]>


getExecutionStatus(executionId)

Get execution status.

const status = await client.getExecutionStatus('exec-123');

Parameters:

  • executionId (string): Execution ID

Returns: Promise


cancelExecution(executionId)

Cancel a running execution.

await client.cancelExecution('exec-123');

Parameters:

  • executionId (string): Execution ID

Returns: Promise


Error Handling

try {
  const result = await client.runWorkflow('workflow-123', {});
} catch (error) {
  console.error('Execution failed:', error.message);
}

License

MIT