prism

module
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT

README

Prism

Prism logo

Keep your AI editor or MCP host as the orchestrator. Offload narrow work to local Ollama specialists.

Prism is an MCP server + CLI that runs tool-specific agents on Ollama — GitHub CI, Kubernetes, Argo, docs lookup, Go codegen — and returns compact JSON summaries. Your paid model sees a short brief, not every skill, constitution, and evidence dump.

Why use it

  • Lower orchestrator cost94% orchestrator input reduction on a live todo-app coding task (benchmarks)
  • Local specialists at $0 — Ollama runs absorb skill bodies and domain context; the orchestrator synthesizes from summaries
  • Editor stays in charge — no autonomous swarm; you pick agent + skills per subtask
  • Progressive disclosure — only attached Agent Skills per call, enforced by allowlists
  • Repo-native specs — agents, skills, and constitutions are versioned Markdown in this tree

Quick start

Requires: Go 1.22+, Ollama at http://127.0.0.1:11434, model from agent specs (default llama3.1:8b).

go install ./cmd/prism
ollama pull llama3.1:8b

cd /path/to/prism          # or pass --root everywhere
prism config doctor        # Ollama + agent registry check
prism agent list

# CLI: one specialist run
echo "Summarize PR #42 CI status" | \
  prism run github-cli --skills gh-pr-triage

Use with an MCP host

Register Prism as an MCP server in your AI editor. Example for Cursor (~/.cursor/mcp.json; other MCP hosts use equivalent config — see docs/usage.md):

Use the full path to your prism binary:

{
  "mcpServers": {
    "prism": {
      "command": "/absolute/path/to/prism",
      "args": ["mcp", "serve", "--root", "/absolute/path/to/prism"],
      "env": { "PRISM_OLLAMA_HOST": "http://127.0.0.1:11434" }
    }
  }
}

Reload MCP servers in your editor, then call **run_agent** with agent_id, task, and skill_names.

Available tools include:

  • core: list_agents, run_agent, get_constitution, doctor
  • prompt/resource compatibility: list_prompts, get_prompt, list_resources, get_resource

Typical flow: paste a short brief → delegate evidence-heavy subtasks to specialists → synthesize their compact summaries. Do not paste all skills and evidence into chat.

Full setup, flags, troubleshooting: docs/usage.md

Built-in agents

Agent Use for
github-cli PR triage, GitHub Actions failures
kubectl Pod/rollout diagnostics
argo Argo CD sync, workflow debug
web-docs-search Docs harvest, release notes
go-helper Small Go helpers and utilities
go-scaffold Package boilerplate, test scaffolds

Add your own under agents/ and skills/. See agents/README.md and skills/README.md.

Install skills via skills CLI

You can install Prism skills with the skills.sh CLI:

# List discoverable skills from this repo
npx skills add github.com/bryanbarton525/prism -l --full-depth

# Install a specific skill (example: MCP orchestration playbook)
npx skills add github.com/bryanbarton525/prism --skill prism-mcp-orchestrator --full-depth

Useful skill for parent-model delegation behavior:

  • prism-mcp-orchestrator — tells the orchestrator when to delegate and how to call Prism MCP tools/resources/prompts in the correct sequence.

Note: this orchestrator skill is intentionally stored under orchestrator-skills/ (not skills/) so Prism MCP runtime agents do not load it as an attachable specialist skill.

How it compares

Capability Prism Claude subagents Cursor Skills+MCP CrewAI/LangGraph
Orchestrator stays in editor
Specialist isolation partial
Local Ollama specialists optional
Token/cost benchmarks
Ops specialists (gh/k8s/argo) DIY DIY DIY

Full breakdown: docs/comparison.md

Proof it saves tokens

Benchmark view
Executive benchmark view

Workload assumption (per engineer): 20 coding prompts/day, 400 prompts/month, 4800 prompts/year.

Task definition: one completed coding request equal to todo-spa-build (live run on 2026-05-31), including implementation output + README.

Orchestrator token footprint per task: without Prism 6,191 in / 811 outwith Prism 363 in / 1,072 out (94.1% input reduction).

Model Monthly cost without Prism Monthly cost with Prism Monthly savings Annual savings
gpt-5.4 $11.04 $6.80 $4.24 $50.88
gpt-5.5 $22.12 $13.60 $8.52 $102.24
claude-opus-4.7 $20.48 $11.44 $9.04 $108.48
claude-opus-4.6 $20.48 $11.44 $9.04 $108.48
claude-sonnet-4.6 $12.28 $6.88 $5.40 $64.80
Model Without ($/task) With ($/task) Savings/task Daily savings
gpt-5.4 $0.0276 $0.0170 $0.0107 $0.2120
gpt-5.5 $0.0553 $0.0340 $0.0213 $0.4260
claude-opus-4.7 $0.0512 $0.0286 $0.0226 $0.4520
claude-opus-4.6 $0.0512 $0.0286 $0.0226 $0.4520
claude-sonnet-4.6 $0.0307 $0.0172 $0.0136 $0.2700

Pricing sources: OpenAI and Anthropic list rates configured in testdata/benchmarks/orchestrator-models.yaml. Token counts come from testdata/benchmarks/results.yaml. Regenerate with prism benchmark project --write.

prism benchmark run todo-spa-build
prism benchmark project --write

More scenarios: docs/benchmark-scale.md

Documentation

Doc What's inside
docs/usage.md CLI/MCP reference, examples, troubleshooting
docs/comparison.md Landscape vs Claude, Cursor, frameworks
docs/benchmark-scale.md At-scale scenarios, monthly projections
docs/workflow-token-diagrams.md Why token savings happen (visual diagrams)
docs/blog-prism-launch.md Launch post / product narrative
docs/implementation-plan.md Architecture and design
docs/success-metrics.md Benchmark targets and report format

Develop

go test ./...
go build -o prism ./cmd/prism
Prevent direct pushes to main

Install pre-commit and enable both commit checks and the push guard:

pre-commit install
pre-commit install --hook-type pre-push

Run all commit-stage hooks manually:

pre-commit run --all-files

Commit hooks include go test ./..., go build ./cmd/prism, and basic file checks. The pre-push hook in .pre-commit-config.yaml runs scripts/hooks/pre-push-block-main.sh to block direct pushes to main.

If you need an emergency one-off bypass:

PRISM_ALLOW_MAIN_PUSH=1 git push origin <ref>

License

See LICENSE.

Directories

Path Synopsis
cmd
prism command
Command prism is the entry point for the Prism CLI.
Command prism is the entry point for the Prism CLI.
internal
agent
Package agent loads and validates Prism agent specifications.
Package agent loads and validates Prism agent specifications.
app
Package app provides the shared AgentRunner used by both the CLI and MCP adapters.
Package app provides the shared AgentRunner used by both the CLI and MCP adapters.
cli
Package cli provides Cobra command handlers for the Prism CLI.
Package cli provides Cobra command handlers for the Prism CLI.
mcp
Package mcp provides the MCP server adapter for Prism.
Package mcp provides the MCP server adapter for Prism.
ollama
Package ollama provides a minimal Ollama REST client for Prism.
Package ollama provides a minimal Ollama REST client for Prism.
result
Package result defines the normalized output envelope for all Prism agents.
Package result defines the normalized output envelope for all Prism agents.
skill
Package skill loads and validates Prism Agent Skills from SKILL.md files.
Package skill loads and validates Prism Agent Skills from SKILL.md files.

Jump to

Keyboard shortcuts

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