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

@build0.ai/agent-core

v0.4.0

Published

Core framework for Build0 autonomous coding agents

Readme

@build0.ai/agent-core

Core framework for Build0 autonomous coding agents. This package provides the workflow orchestration engine, plugin system, and utilities needed to build autonomous agents.

Installation

npm install @build0.ai/agent-core
# or
pnpm add @build0.ai/agent-core

Quick Start

import { Runner, credentialManager } from "@build0.ai/agent-core";
import { myPlugin } from "./plugins/my-plugin.js";

async function main() {
  // Fetch credentials from remote API
  const credentials = await credentialManager.fetchCredentials();

  // Create runner and register plugins
  const runner = new Runner();
  await runner.registerPlugin(myPlugin, {
    API_KEY: credentials.MY_API_KEY!,
  });

  // Run workflow
  await runner.runWorkflow("./workflow.json");
}

main();

Features

  • Declarative Workflows: Define agent behavior in JSON
  • Type-Safe Plugin System: Build plugins with compile-time validation
  • MCP Tools Integration: Tools are exposed via Model Context Protocol
  • Claude Agent SDK: Leverages Claude for intelligent coding tasks
  • Credential Management: Secure remote credential fetching and decryption
  • Structured Logging: JSON-formatted logs for easy parsing

Workflow Format

{
  "steps": [
    {
      "id": "step_1",
      "type": "tool",
      "tool": "my_tool",
      "args": {
        "param": "value"
      }
    },
    {
      "id": "step_2",
      "type": "ai_agent",
      "args": {
        "prompt": "Analyze the output: {{ step_1.output }}",
        "working_dir": "./workspace"
      }
    }
  ]
}

Creating Plugins

import { McpPlugin, BasePluginConfig, ToolDefinition } from "@build0.ai/agent-core";
import { z } from "zod";

interface MyPluginConfig extends BasePluginConfig {
  API_KEY: string;
}

export const myPlugin: McpPlugin<MyPluginConfig> = {
  name: "my_plugin",
  config: {} as MyPluginConfig,

  async init(config: MyPluginConfig): Promise<void> {
    if (!config.API_KEY) {
      throw new Error("API_KEY is required");
    }
    this.config = config;
  },

  registerTools(): ToolDefinition[] {
    return [
      {
        name: "my_tool",
        description: "Does something useful",
        zodSchema: z.object({
          param: z.string().describe("A parameter"),
        }),
      },
    ];
  },

  async handleToolCall(name, args) {
    if (name === "my_tool") {
      // Implementation
      return {
        content: [{ type: "text", text: "Result" }],
      };
    }
    throw new Error(`Unknown tool: ${name}`);
  },
};

Environment Variables

The framework uses these environment variables:

  • BUILD0_AGENT_CREDENTIALS_URL - Remote credentials API endpoint
  • BUILD0_AGENT_AUTH_TOKEN - Authentication token for credentials API
  • BUILD0_AGENT_ENCRYPTION_KEY - AES-256 key for credential decryption (hex)
  • BUILD0_TRIGGER_PAYLOAD - JSON payload from external triggers (auto-injected as {{ input }})
  • ANTHROPIC_API_KEY - API key for Claude (required by Claude Agent SDK)

Exports

Classes

  • Runner - Main workflow orchestration engine

Singletons

  • logger - Structured JSON logger
  • credentialManager - Credential fetching service

Types

  • McpPlugin<TConfig> - Plugin interface
  • BasePluginConfig - Base plugin configuration
  • ToolDefinition - Tool metadata with Zod schema
  • Workflow - Workflow definition
  • WorkflowStep - Single workflow step
  • Credential - Credential structure
  • AgentResult - AI agent execution result
  • Various log message types

License

MIT