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

llm-mar

v1.0.9

Published

LLM-MAR is a compact CLI that creates LLM agents, lets them debate, answers questions, and builds workflows.

Downloads

97

Readme

LLM-MAR

npm version Socket Badge

LLM-MAR (Multi Agent Reasoning) is a compact CLI that creates LLM agents, lets them debate, answers questions, and builds workflows.

Table of Contents

Installation

Option 1: Install from npm (Recommended)

npm install -g llm-mar

Option 2: Install from source

  1. Clone the repository:

    git clone https://github.com/llm-mar/llm-mar.git
    cd llm-mar
  2. Install dependencies:

    npm install
  3. Set up your OpenAI API key:

    export OPENAI_API_KEY=your_api_key_here

Quick Start

Get started with LLM-MAR in minutes! Create intelligent agents, form teams, and orchestrate debates—all through simple YAML configurations.

1. Create Your First Agent

Let's create an AI assistant specialized in creative writing:

llm-mar create agent writer --model gpt-4 --goal "To write engaging stories" --role "Creative Writer" --system-prompt "You are a talented fiction writer with a vivid imagination." --instructions "Use descriptive language,Build suspense,End with a twist" --output text

This generates a YAML configuration file that defines your agent's personality and capabilities.

2. See the YAML Structure

The command above creates default/writer.yaml with this structure:

version: '1.0'
kind: Agent
metadata:
  name: writer
  description: An agent named writer
spec:
  id: writer
  model: gpt-4
  goal: To write engaging stories
  role: Creative Writer
  system_prompt: You are a talented fiction writer with a vivid imagination.
  instructions:
    - Use descriptive language
    - Build suspense
    - End with a twist
  output: text

Key Components:

  • metadata: Basic info and description
  • spec: The agent's configuration including model, role, and behavior
  • instructions: List of guidelines for the AI's responses

3. Run Your Agent

Now let's use the agent to generate a story:

llm-mar run default/writer.yaml --input "Write a short story about a mysterious old clock in an antique shop."

The agent will respond with a creative story based on its configuration!

4. Build a Team

Combine multiple agents for collaborative tasks:

llm-mar create team story_team --agents "default/writer.yaml,default/editor.yaml" --output text

5. Set Up a Debate

Create engaging debates between agents:

llm-mar create debate tech_debate --agents "default/optimist.yaml,default/pessimist.yaml" --judges "default/judge.yaml" --input "Will AI replace human jobs?" --output text

Usage

After installation, use the llm-mar command (or npx llm-mar if installed locally).

Creating Agents

Create a new agent YAML file:

llm-mar create agent myagent --model gpt-4 --goal "To answer questions" --role "Assistant" --system-prompt "You are a helpful assistant." --instructions "Think step by step,Answer clearly" --output text

This creates default/myagent.yaml.

Creating Teams

Create a team of agents:

llm-mar create team myteam --agents "default/agent1.yaml,default/agent2.yaml" --output text

Running Agents

Run an agent with input:

llm-mar run default/myagent.yaml --input "What is the capital of France?"

Running Teams

Run a team with a specific agent:

llm-mar run default/myteam.yaml --agent agent1 --input "Discuss this topic"

Running Debates

Run a debate (assuming you have a debate YAML):

llm-mar run default/debate1.yaml

YAML Structure

LLM-MAR uses YAML files to define agents, teams, and debates. Here's a quick overview of the structure:

Agent YAML

version: '1.0'
kind: Agent
metadata:
  name: Scientist
  description: A scientific analysis agent
spec:
  id: scientist
  model: gpt-4
  goal: To provide scientific explanations
  role: Research Scientist
  system_prompt: You are an expert scientist...
  instructions:
    - Use evidence-based reasoning
    - Explain complex concepts simply
  output: text

Team YAML

version: '1.0'
kind: Team
metadata:
  name: Research Team
  description: Collaborative research team
spec:
  agents:
    - default/scientist.yaml
    - default/analyst.yaml
  output: text

Debate YAML

version: '1.0'
kind: Debate
metadata:
  name: Ethics Debate
  description: Debate on AI ethics
spec:
  method: majority_vote
  input: Should AI have rights?
  judges:
    - default/judge.yaml
  agents:
    - default/pro.yaml
    - default/con.yaml
  output: text

For detailed configuration options and advanced features, see docs/yaml-structure-guide.md.