mammoth

module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: MIT

README

Mammoth

A DOT-based pipeline runner for LLM agent workflows. Define a graph, run it, watch it think.

Go implementation of the StrongDM Attractor specification.

Architecture

Mammoth is three layers, bottom-up:

Layer Package Description
LLM SDK llm/ Unified client for OpenAI, Anthropic, and Gemini APIs
Agent Loop agent/ Agentic loop with provider profiles, tools, steering, and subagents
Pipeline Runner attractor/ DOT-based DAG execution, node handlers, human-in-the-loop gates

Supporting packages: dot/ (DOT parser/serializer), spec/ (event-sourced spec builder), web/ (unified web layer), editor/ (DOT graph editor), render/ (DOT→SVG/PNG), tui/ (Bubble Tea terminal UI), cmd/mammoth/ (CLI).

Install

Homebrew (macOS/Linux)
brew install 2389-research/tap/mammoth
Go
go install github.com/2389-research/mammoth/cmd/mammoth@latest
Download binary

Pre-built binaries for macOS and Linux (amd64/arm64) are available on the releases page.

# Example: Linux amd64 — replace VERSION with the desired release (e.g. 0.2.0)
VERSION="0.2.0"
curl -sL "https://github.com/2389-research/mammoth/releases/download/v${VERSION}/mammoth_${VERSION}_Linux_x86_64.tar.gz" | tar xz
sudo mv mammoth /usr/local/bin/
Build from source
git clone https://github.com/2389-research/mammoth.git
cd mammoth
make build
# Binary is at ./bin/mammoth

Quick Start

# Set an API key (at least one required)
export ANTHROPIC_API_KEY="sk-ant-..."
# or: export OPENAI_API_KEY="sk-..."
# or: export GEMINI_API_KEY="..."

# Run a pipeline
mammoth run pipeline.dot

Usage

# Validate a pipeline without running it
mammoth -validate pipeline.dot

# Run with the terminal UI
mammoth run -tui pipeline.dot

# Start the HTTP server
mammoth -server -port 8080

Testing

# Run all tests (5,200+ tests)
go test ./...

# Run with race detector
make test-race

# Run with coverage
go test ./... -coverprofile=coverage.out
go tool cover -func=coverage.out

Documentation

Browse the full docs hub at docs/index.html.

Spec Parity

192/195 Attractor spec requirements implemented (3 partial, 0 missing). See the parity matrix for details.

License

MIT License. See LICENSE for details.


Built by 2389 Research, Inc. | hello@2389.ai

Directories

Path Synopsis
ABOUTME: Named, typed artifact storage for large pipeline outputs.
ABOUTME: Named, typed artifact storage for large pipeline outputs.
cmd
mammoth command
ABOUTME: XDG-based data directory resolution for persistent pipeline state.
ABOUTME: XDG-based data directory resolution for persistent pipeline state.
dot
ABOUTME: Consolidated AST types for the unified DOT parser, merging mammoth attractor and dot-editor ASTs.
ABOUTME: Consolidated AST types for the unified DOT parser, merging mammoth attractor and dot-editor ASTs.
validator
ABOUTME: Unified lint rules for DOT pipeline graphs, merged from mammoth-dot-editor and attractor/validate.go.
ABOUTME: Unified lint rules for DOT pipeline graphs, merged from mammoth-dot-editor and attractor/validate.go.
llm
sse
ABOUTME: In-memory render cache that wraps a DOT rendering function with sha256-keyed caching.
ABOUTME: In-memory render cache that wraps a DOT rendering function with sha256-keyed caching.
spec
agents
ABOUTME: AgentContext feeds state and history to LLM-backed agents within the swarm.
ABOUTME: AgentContext feeds state and history to LLM-backed agents within the swarm.
agents/tools
ABOUTME: Implements the ask_user_boolean tool for asking yes/no questions via mux Tool interface.
ABOUTME: Implements the ask_user_boolean tool for asking yes/no questions via mux Tool interface.
core
ABOUTME: Goroutine-based actor for processing spec commands and broadcasting events.
ABOUTME: Goroutine-based actor for processing spec commands and broadcasting events.
core/export
ABOUTME: Exports a SpecState as a DOT graph for the DOT Runner constrained runtime DSL.
ABOUTME: Exports a SpecState as a DOT graph for the DOT Runner constrained runtime DSL.
export
ABOUTME: Dynamic DOT pipeline generation from SpecState, replacing the old fixed 10-node template.
ABOUTME: Dynamic DOT pipeline generation from SpecState, replacing the old fixed 10-node template.
server
ABOUTME: Shared application state for the mammoth spec builder HTTP server.
ABOUTME: Shared application state for the mammoth spec builder HTTP server.
store
ABOUTME: Append-only JSONL event log for durable event storage.
ABOUTME: Append-only JSONL event log for durable event storage.
web
ABOUTME: Embedded filesystem for spec builder templates and static assets.
ABOUTME: Embedded filesystem for spec builder templates and static assets.
ABOUTME: Top-level Bubble Tea AppModel that orchestrates all TUI sub-panels into a unified layout.
ABOUTME: Top-level Bubble Tea AppModel that orchestrates all TUI sub-panels into a unified layout.
ABOUTME: Selects the codergen backend (Claude Code, agent, mux) from environment variables.
ABOUTME: Selects the codergen backend (Claude Code, agent, mux) from environment variables.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL