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

robal-framework

v0.1.0

Published

Agent orchestration framework — delegate, review, and coordinate any AI agents

Readme

robal-framework

Agent orchestration framework. Plug any AI agents, delegate work, review output, coordinate teams.

robal-framework is not an agent — it's the layer that makes agents work together. Bring any CLI agent (Kiro, Claude Code, OpenClaw, Codex, Aider, custom scripts) and this framework handles delegation, review cycles, and multi-agent coordination.

Install

npm install robal-framework

Quick Start

import { createAgentTeam } from 'robal-framework';

const result = await createAgentTeam({
  rootAgent: 'kiro-cli chat --no-interactive --trust-all-tools',
  prompt: 'Build a REST API for user management',
});

console.log(result.output);

That's it. The framework starts the agent, tells it what it can do, and collects the result.

Delegation

The root agent can delegate subtasks to specialist agents. The framework tells the agent who's available — the agent decides whether to delegate or do the work itself.

const result = await createAgentTeam({
  rootAgent: 'kiro-cli chat --no-interactive --trust-all-tools',
  prompt: 'Build a full-stack app with a landing page',
  availableAgents: [
    { name: 'code-agent', description: 'Writes backend code', agent: 'kiro-cli chat --no-interactive --trust-all-tools' },
    { name: 'design-agent', description: 'Creates UI designs', agent: 'dalle-cli generate' },
    { name: 'research-agent', description: 'Searches the web', agent: 'perplexity-cli search' },
  ],
});

The root agent receives instructions like:

Your task: Build a full-stack app with a landing page

Available agents you can delegate to:
- "code-agent": Writes backend code
- "design-agent": Creates UI designs
- "research-agent": Searches the web

Decide: either do the work yourself, or delegate subtasks to sub-agents.

The agent calls the framework's delegate endpoint, the framework starts the specialist agents, collects their results, and returns them. Delegation can go multiple levels deep — a specialist can delegate further.

Review Cycle

Add a reviewer to reject bad output and force retries with feedback:

const result = await createAgentTeam({
  rootAgent: 'kiro-cli chat --no-interactive --trust-all-tools',
  prompt: 'Write a Python web scraper',
  reviewer: 'kiro-cli chat --no-interactive --trust-all-tools',
  maxCycles: 3,
});

Flow: agent executes → reviewer rejects with feedback → agent retries → reviewer approves → done

How It Works

The framework runs a local HTTP server and passes the URL to each agent via environment variables. Agents interact with the framework by calling these endpoints:

| Endpoint | Method | Purpose | |----------|--------|---------| | /task | GET | Read current task (prompt, context, feedback) | | /delegate | POST | Spawn sub-agents, get back results | | /submit-result | POST | Submit final output | | /submit-review | POST | Submit review verdict |

Any process that can make HTTP calls can be an agent — Python, Rust, shell scripts, or any CLI tool. The framework pipes instructions to stdin and sets ROBAL_* environment variables.

Environment Variables

| Variable | Description | |----------|-------------| | ROBAL_BRIDGE_URL | Base URL of the framework server | | ROBAL_PROMPT | The task prompt | | ROBAL_RESULT_URL | POST here to submit your result | | ROBAL_DELEGATE_URL | POST here to delegate subtasks | | ROBAL_TASK_URL | GET here to read full task details | | ROBAL_CAN_DELEGATE | "true" or "false" | | ROBAL_DEPTH | Current depth in delegation hierarchy | | ROBAL_FEEDBACK | Reviewer feedback (if retrying) | | ROBAL_INSTRUCTIONS | Full prompt with task + available actions |

Advanced: Orchestrator API

For more control, use the Orchestrator class to wire multiple teams with channels:

import { Orchestrator, createAgent } from 'robal-framework';

const { agent: researcher } = await createAgent({
  command: 'kiro-cli chat --no-interactive --trust-all-tools',
});
const { agent: writer } = await createAgent({
  command: 'kiro-cli chat --no-interactive --trust-all-tools',
});

const orc = new Orchestrator({
  teams: {
    research: { agent: researcher },
    writing: { agent: writer, reviewer: myReviewer, maxCycles: 3 },
  },
  channels: [
    { from: 'research', to: 'writing' },
  ],
});

// Run a pipeline: research → writing
const result = await orc.pipeline('research', 'Write a report on AI agents');

// Or run teams in parallel
const results = await orc.parallel([
  { teamId: 'research', prompt: 'Market trends' },
  { teamId: 'writing', prompt: 'Blog post draft' },
]);

Channels

Connect teams. Output from one flows as input to the next:

channels: [
  { from: 'research', to: 'writing' },
  { from: 'writing', to: 'review', transform: (output) => `Review this: ${output}` },
  { from: 'review', to: 'publish', gate: (output) => output.includes('approved') },
]

Events

const orc = new Orchestrator({
  teams: { ... },
  onEvent: (event) => {
    // event.type: 'task:started' | 'task:completed' | 'task:failed' | 'worker' | 'review' | 'channel:routed' | 'channel:gated'
    console.log(event.type);
  },
});

Advanced: Agent Interface

For programmatic agents (not CLI), implement the Agent interface directly:

import { Orchestrator } from 'robal-framework';
import type { Agent } from 'robal-framework';

const myAgent: Agent = {
  async execute(task) {
    // task.prompt — what to do
    // task.delegate — function to spawn sub-agents (if available)
    // task.feedback — why the reviewer rejected last attempt
    // task.context — outputs from upstream tasks

    if (task.delegate) {
      const results = await task.delegate([
        { prompt: 'subtask 1', name: 'specialist-a' },
        { prompt: 'subtask 2', name: 'specialist-b' },
      ]);
      return { status: 'completed', output: results.join('\n') };
    }

    return { status: 'completed', output: 'done' };
  },
};

Configuration

| Option | Default | Description | |--------|---------|-------------| | maxCycles | 3 | Max review-retry cycles per task | | maxWorkers | 5 | Max parallel sub-agents when delegating | | maxDepth | 3 | Max delegation depth (0 = no delegation) | | timeoutMs | 120000 | Timeout per agent invocation (2 min) |

License

Apache 2.0