Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

llm-mar

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

llm-mar

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

latest
Source
npmnpm
Version
1.0.9
Version published
Maintainers
1
Created
Source

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

npm install -g llm-mar

Option 2: Install from source

  • Clone the repository:

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

    npm install
    
  • 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.

Keywords

llm

FAQs

Package last updated on 11 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts