Skip to content

Conductus-Labs/baton-framework

Repository files navigation

Baton Framework

The foundational instruction architecture for AI agent orchestration

License: MIT

Overview

Baton Framework is an open-source framework that provides the foundational instruction architecture for building, configuring, and orchestrating AI agents. It combines 19 cognitive thinking patterns with domain specialist templates to enable the creation of specialized agents with specific capabilities.

The framework is organized as a monorepo containing npm packages that can be consumed independently or together:

  • @conductus-labs/baton-core - Core types, utilities, and validation
  • @conductus-labs/baton-agents - 25 pre-defined agent definitions
  • @conductus-labs/baton-cognitive-patterns - 19 cognitive thinking patterns
  • @conductus-labs/baton-knowledge - Knowledge files and best practices
  • @conductus-labs/baton-workflows - Workflow definitions for common tasks

What is Baton Framework?

Baton Framework provides the building blocks for creating AI agents that can:

  • Think strategically using cognitive patterns (strategic, critical, analytical, systems thinking, etc.)
  • Work collaboratively with humans through structured workflows
  • Manage projects using the RHYTHM Method (designed for agents with human integration)
  • Execute tasks through reusable workflows and templates

Key Components

1. Cognitive Patterns (19 Patterns)

Cognitive patterns define how agents think. Each pattern provides:

  • Thinking workflows and decision-making frameworks
  • Communication patterns and quality standards
  • Optimized LLM parameters for that thinking style

Patterns include:

  • Analytical, Critical, Strategic, Systems Thinking
  • Creative Problem Solving, Experimental Thinking
  • Meta-Cognitive, Adaptive Thinking
  • And 11 more specialized patterns

πŸ“– Read the Cognitive Patterns Documentation

2. RHYTHM Method

Rapid, High-Yield, Token-based, Human-in-loop, Management

A project management methodology specifically designed for agents with human integration. RHYTHM Method is the default methodology for Baton Framework projects.

Key Features:

  • TEMPO: Agents operate at fast computational speeds (hours, not weeks)
  • Flow: Continuous execution with dependency-driven prioritization
  • Control: Human-in-the-Loop checkpoints at critical decision points
  • Precision: Token-based estimation replaces abstract story points

πŸ“– Read the RHYTHM Method Documentation

3. Agent Definitions

25 pre-defined agent definitions covering various domains:

  • Engineering agents (backend, frontend, DevOps, database, etc.)
  • Design agents (UI/UX, content strategist)
  • Management agents (project manager, business analyst, business advisor)
  • Specialist agents (security, quality assurance, research, technical writer, etc.)

Installation

Install All Packages

To install all Baton Framework packages:

npm install @conductus-labs/baton-core \
            @conductus-labs/baton-agents \
            @conductus-labs/baton-cognitive-patterns \
            @conductus-labs/baton-knowledge \
            @conductus-labs/baton-workflows

Install Individual Packages

You can install only the packages you need:

# Core package (required by others)
npm install @conductus-labs/baton-core

# Agent definitions
npm install @conductus-labs/baton-agents

# Cognitive patterns
npm install @conductus-labs/baton-cognitive-patterns

# Knowledge files
npm install @conductus-labs/baton-knowledge

# Workflow definitions
npm install @conductus-labs/baton-workflows

Package Installation Behavior

When you install Baton Framework packages, they automatically:

  1. Create baton/ folder in your project root (if it doesn't exist)
  2. Copy framework files from node_modules/ to baton/ folder:
    • baton/agents/ - Agent definition files
    • baton/cognitive/ - Cognitive pattern files
    • baton/knowledge/ - Knowledge files
    • baton/workflows/ - Workflow files
    • baton/core/ - Core framework files

This makes framework files easily accessible in your project without navigating node_modules/.

Quick Start

1. Install Packages

npm install @conductus-labs/baton-core \
            @conductus-labs/baton-agents \
            @conductus-labs/baton-cognitive-patterns \
            @conductus-labs/baton-workflows

2. Initialize Your Project

After installation, framework files are automatically available in the baton/ folder. For project-specific configuration:

Option 1: Use Platform Tools (Recommended)

  • Use RHYTHM Board or Baton Platform for project initialization and management

Option 2: Manual Setup

  • Create .baton/ folder manually
  • Copy framework files from baton/ to .baton/ as needed
  • Create project.config.yml and project.manifest.md manually

Note: Programmatic initialization utilities may be added in future releases.

3. Use Framework Components

import { loadAgent, validateAgent } from "@conductus-labs/baton-core";
import type { AgentDefinition } from "@conductus-labs/baton-core";

// Load an agent definition
const agent = loadAgent("baton-agent");

// Validate agent structure
if (validateAgent(agent)) {
  console.log(`Agent: ${agent.agent_name}`);
  console.log(`Patterns: ${agent.cognitive_patterns.primary.length}`);
}

Package Details

@conductus-labs/baton-core

Core types, utilities, and validation for Baton Framework.

npm install @conductus-labs/baton-core

Exports:

  • TypeScript type definitions for all framework components
  • Validation utilities for agents, patterns, workflows, and knowledge files
  • File parsing utilities (YAML, Markdown, frontmatter)
  • Path resolution utilities
  • Version comparison utilities

Usage:

import {
  AgentDefinition,
  validateAgent,
  loadAgent,
  parseYamlFrontmatter,
} from "@conductus-labs/baton-core";

πŸ“– Core Package README

@conductus-labs/baton-agents

25 pre-defined agent definitions for various domains.

npm install @conductus-labs/baton-agents

Contents:

  • 25 agent definition files (.md format)
  • Agent types and interfaces (re-exported from core)

Usage:

import type { AgentDefinition } from "@conductus-labs/baton-agents";

// Agent files are available in baton/agents/ after installation
// Use loadAgent() from baton-core to load them

πŸ“– Agents Package README

@conductus-labs/baton-cognitive-patterns

19 cognitive thinking patterns that define how agents think.

npm install @conductus-labs/baton-cognitive-patterns

Contents:

  • 19 cognitive pattern files (.yml format)
  • Pattern types and interfaces (re-exported from core)

Usage:

import type { CognitivePattern } from "@conductus-labs/baton-cognitive-patterns";

// Pattern files are available in baton/cognitive/ after installation
// Use loadPattern() from baton-core to load them

πŸ“– Cognitive Patterns Package README

@conductus-labs/baton-knowledge

Knowledge files and best practices for agent operations.

npm install @conductus-labs/baton-knowledge

Contents:

  • Knowledge files for Git CLI, GitHub API, GitHub CLI
  • Knowledge types and interfaces (re-exported from core)

Usage:

import type { KnowledgeFile } from "@conductus-labs/baton-knowledge";

// Knowledge files are available in baton/knowledge/ after installation

πŸ“– Knowledge Package README

@conductus-labs/baton-workflows

Workflow definitions for common agent tasks and project management.

npm install @conductus-labs/baton-workflows

Contents:

  • 4 main workflows (agent initialization, context sync, boundary management, project initialization)
  • 10 sub-flows for workflow composition
  • Workflow types and interfaces (re-exported from core)

Usage:

import type { WorkflowDefinition } from "@conductus-labs/baton-workflows";

// Workflow files are available in baton/workflows/ after installation
// Use loadWorkflow() from baton-core to load them

πŸ“– Workflows Package README

Repository Structure

baton-framework/
β”œβ”€β”€ packages/                    # npm packages (monorepo)
β”‚   β”œβ”€β”€ core/                    # @conductus-labs/baton-core
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ types/           # TypeScript type definitions
β”‚   β”‚   β”‚   β”œβ”€β”€ validation/      # Validation utilities
β”‚   β”‚   β”‚   β”œβ”€β”€ utils/           # Shared utilities
β”‚   β”‚   β”‚   β”œβ”€β”€ manifest/        # Framework manifest
β”‚   β”‚   β”‚   β”œβ”€β”€ config/          # Core configuration
β”‚   β”‚   β”‚   └── permissions/     # Workflow permissions
β”‚   β”‚   └── package.json
β”‚   β”œβ”€β”€ agents/                  # @conductus-labs/baton-agents
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   └── agents/          # 25 agent definition files
β”‚   β”‚   └── package.json
β”‚   β”œβ”€β”€ cognitive-patterns/      # @conductus-labs/baton-cognitive-patterns
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   └── patterns/         # 19 cognitive pattern files
β”‚   β”‚   └── package.json
β”‚   β”œβ”€β”€ knowledge/               # @conductus-labs/baton-knowledge
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   └── knowledge/       # Knowledge files
β”‚   β”‚   └── package.json
β”‚   └── workflows/               # @conductus-labs/baton-workflows
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   └── workflows/       # 4 main workflows + 10 sub-flows
β”‚       └── package.json
β”‚
β”œβ”€β”€ docs/                         # Framework documentation
β”‚   β”œβ”€β”€ cognitive-patterns/       # Cognitive pattern documentation
β”‚   β”œβ”€β”€ rhythm/                   # RHYTHM Method documentation
β”‚   └── workflows/                # Workflow documentation
β”‚
β”œβ”€β”€ .github/                      # GitHub Actions workflows
β”‚   └── workflows/                # CI/CD workflows
β”‚
β”œβ”€β”€ package.json                  # Root workspace configuration
β”œβ”€β”€ tsconfig.json                 # Root TypeScript configuration
└── README.md                     # This file

Folder Structure After Installation

When you install Baton Framework packages in your project:

your-project/
β”œβ”€β”€ baton/                        # Framework files (from npm packages)
β”‚   β”œβ”€β”€ agents/                   # Agent definition files
β”‚   β”œβ”€β”€ cognitive/                # Cognitive pattern files
β”‚   β”œβ”€β”€ knowledge/                # Knowledge files
β”‚   β”œβ”€β”€ workflows/                # Workflow files
β”‚   └── core/                     # Core framework files
β”‚
β”œβ”€β”€ .baton/                       # Project configuration (created by init)
β”‚   β”œβ”€β”€ project.config.yml        # Project configuration
β”‚   β”œβ”€β”€ project.manifest.md       # Project manifest
β”‚   β”œβ”€β”€ agents/                   # Project-specific agent instances
β”‚   β”œβ”€β”€ workflows/                # Project-specific workflow instances
β”‚   β”œβ”€β”€ boundaries/               # Project boundaries
β”‚   β”œβ”€β”€ context/                  # Agent context files
β”‚   └── knowledge/                # Project-specific knowledge
β”‚
β”œβ”€β”€ node_modules/                 # npm packages
β”‚   └── @conductus-labs/
β”‚       β”œβ”€β”€ baton-core/
β”‚       β”œβ”€β”€ baton-agents/
β”‚       └── ...
β”‚
└── package.json

Key Points:

  • baton/ (no dot) = Framework files from npm packages (read-only, managed by npm)
  • .baton/ (with dot) = Project configuration (read-write, project-specific)

Documentation

Getting Started

Cognitive Patterns

RHYTHM Method

  • Dictionary - Key terms and concepts
  • Principles - Core principles of RHYTHM Method
  • TEMPO - Understanding TEMPO: the speed/pace at which agents operate
  • Workflows - RHYTHM Method workflows and processes

Package Documentation

Philosophy

Baton Framework is designed with these principles:

  1. Agent-First Design: Built for agents with human integration, not the other way around
  2. Reusable Patterns: Cognitive patterns and workflows can be combined and reused
  3. Open and Extensible: Framework components can be customized and extended
  4. Documentation-Driven: Comprehensive documentation for both humans and agents
  5. Package-Based: Modular packages allow consumers to install only what they need

Development

Building the Framework

# Build all packages
npm run build

# Build specific package
cd packages/core && npm run build

Running Tests

# Run all tests
npm run test

# Run tests for specific package
cd packages/core && npm run test

# Run tests in watch mode
npm run test:watch

# Generate coverage report
npm run test:coverage

Monorepo Structure

This repository uses npm workspaces to manage multiple packages. All packages are located in the packages/ directory and share common tooling (TypeScript, Vitest, etc.) configured at the root level.

Contributing

We welcome contributions! Please see our Contributing Guidelines for details on:

  • How to contribute to the framework
  • Package contribution process
  • Adding new components (agents, patterns, workflows, knowledge)
  • Versioning process
  • Code of conduct

License

This project is licensed under the MIT License - see the LICENSE file for details.

About Conductus Labs

Baton Framework is developed by Conductus Labs Ltd, a UK-based AI application layer company.

Related Projects

  • Baton Platform: The commercial SaaS platform built on Baton Framework
  • RHYTHM Board: Project management tool that consumes Baton Framework packages

Built with ❀️ in the UK

About

Open-source AI agent orchestration framework with 19 cognitive patterns, RHYTHM Method project management, and CLI tooling for building specialized AI agents

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors