Skip to content
nexus-agents

Nexus-Agents Entrypoints

Last Updated: 2026-06-02 (ET) Canonical Source: This document is the single source of truth for all entrypoints. Issue: #210 (Epic #209)


Overview

Nexus-agents provides four interface categories:

Interface Use Case Transport
CLI Commands Terminal usage, CI/CD pipelines Process
MCP Tools Claude Desktop, MCP clients JSON-RPC over stdio
Programmatic API Library usage, custom applications TypeScript import

Quick Reference

Most commonly used commands:

Command Description
nexus-agents doctor Check system health and dependencies
nexus-agents setup Configure Claude CLI integration
nexus-agents orchestrate Run task with agent coordination
nexus-agents review <url> Review a GitHub PR
nexus-agents vote --proposal Multi-agent consensus voting
nexus-agents workflow run Execute predefined workflow
nexus-agents expert list List available expert types
nexus-agents routing-audit Debug model routing decisions
nexus-agents --help Show all available commands

CLI Commands

Entry Point: nexus-agents [command] [options]

The tables between the markers are generated from COMMAND_CATALOG (packages/nexus-agents/src/cli-command-catalog.ts), the same literal nexus-agents --help renders from, so every registered command appears here exactly once (#5458). Commands are grouped by the catalog’s audience band: essential is what a new user needs to install, configure and run a first task; advanced is day-to-day but not first-touch; maintainer is benchmarks, release tooling and deep diagnostics (--help --all); internal is dev/eval loops hidden from --help entirely. nexus-agents <command> --help prints flags and examples for any of them.

Essential — install, configure, run

Command Description
(default) Start MCP server with stdio transport
hello Show welcome message and quick start (no API keys needed)
setup Configure CLI integration (MCP + .rules + data dirs)
verify Check install health (sqlite, adapters, config)
doctor Detailed health check; no model completions by default; –live probes models
config Manage configuration (init, get, set, list, export, import)
orchestrate Execute a task via CLI tools (standalone mode)
vote Run consensus vote on a proposal (7 agents; –quick uses 3)
workflow Manage and run workflow templates (list, run)
expert Manage expert agents (list)
research Manage research registry (status, add, stats, refresh)
auth Manage authentication: init/show/rotate MCP tokens; status shows per-CLI auth state

Advanced — day-to-day extras

Command Description
tour Guided walkthrough of the four headline tools — no API keys, no quota (#2851). –non-interactive runs straight through.
session Manage session persistence (list, show, export, delete)
usage Cost / usage / quality dashboard from per-call telemetry (#2469). –format=json for scripting.
status At-a-glance project health dashboard
capabilities Show model capabilities matrix
mode Inspect detected mode (server/orchestrator) + signals + reasoning (#3214)
jobs Async job-record maintenance (#6224): prune deletes terminal records past the 7-day retention window and marks abandoned pending records failed; –dry-run prints the counts only.
registry Inspect + refresh the dynamic model registry (doctor / refresh)
migrate Relocate homedir state (sessions, checkpoints, traces, runs, audit, pipeline, tasks) into <repo>/.nexus-agents/ for users adopting NEXUS_REPO_PREFERRED=1. Cross-repo state stays homedir. –dry-run for a no-op plan. Epic #2872.
init Initialize portable nexus-agents config in a repo. Flags: –portable (#2305/#2308/#2311), –install / –uninstall (#2311), –gitignore, –mcp-config, –opencode <path> (#2504), –force, –dry-run.
review Review a GitHub PR (dogfooding helper)
scaffold Generate project files from templates
validate Run unified validation (doctor + fitness + config)
index Generate and manage codebase index
improvement-review Observability-driven improvement loop (#2402). Surfaces threshold breaches; –file-issues opt-in.

Maintainer — benchmarks, releases, deep diagnostics

Command Description
login [deprecated alias] Soft alias of “auth status”; renamed in #2449
model-drift Report models the registry does not know and registry models no source lists (#6625). –json; –file-issue opt-in.
auto-remediate Run one auto-remediation cycle (#3540). OFF unless NEXUS_AUTO_REMEDIATE=audit|enforce; never auto-merges.
remediation-review Review audit-mode selections: list · panel-judge –batch N [–quick] · sample –n 10 [–seed S] · mark –evaluator –sound|–unsound [–sample id] · sign-off –owner · readiness (human, panel and owner-sample judgments + soak-store alarm).
demo API-free exploration mode (marketing/demo flow)
hooks Claude CLI hook integration commands
routing-audit Debug model routing decisions
fitness-audit Run CLI orchestration fitness score audit
system-review Automated system review (5-phase checklist)
sprint Automated sprint planning from open issues
evaluate Self-evaluation of codebase components
issue Issue template validation and management
validation Learning validation dashboard
learning-metrics Aggregated learning metrics dashboard
visualize Generate Mermaid diagrams and ASCII dashboards
health Swarm health metrics dashboard
release-notes Generate release notes from git commits
release-validate Run expert swarm validation for releases
release-announce Generate blog release announcements

Internal — dev/eval loops (hidden from –help)

Command Description
server Start MCP server with stdio transport (explicit form)
e2e-eval E2E evaluation scenario runner (dev loop)
memory-benchmark Memory-system benchmark runner (dev loop)
memory-eval Comparative memory evaluation benchmark (dev loop)
routing-ab A/B comparison of routing strategies (dev loop)
scenario Execute a named scenario from the testing framework
warm-up Warm the model/adapter caches before a run

Auto-generated from COMMAND_CATALOG (packages/nexus-agents/src/cli-command-catalog.ts) by scripts/inject-governance.ts. 53 commands.

Release announcements

nexus-agents release-announce --channels blog --dry-run generates a blog preview. The default channel is blog; blog content remains available for manual publication. Automatic Bluesky posting is retired. Explicit --channels bluesky and mixed --channels blog,bluesky requests fail before generating any announcement. To announce on Bluesky, compose a post manually using the release URL and highlights.

Subcommands and modes

The catalog carries a name and a one-line description per command; it has no subcommand or mode field, so this table is hand-maintained and covers only the commands whose subcommand shape is not obvious from the description. Mode is the process mode the command needs (see Mode Selection below); any means it works in both.

Command Subcommand Mode Notes
(default) - server What editors and MCP clients call
server [--interactive] server --interactive opens a REPL
orchestrate <task> orchestrator Routes to the best CLI
vote --proposal "..." any --quick runs the 3-voter panel
review <url> orchestrator Adversarial review of a GitHub PR
workflow list / run <name> orchestrator list works in any mode
research add / discover / review / prioritize / status / overlap any Registry management plus technique-implementation status
setup [--skip-mcp|rules|hooks|opencode|codex|config] any MCP server + hooks + per-CLI configs in one shot
config init / get / set / list / export / import any init generates a starter nexus-agents.yaml
expert list / create / execute any Built-in + custom experts
init --portable [--mcp-config] [--install] [--uninstall] any Bootstraps a workspace-local .nexus-agents/ install
routing-audit <task> any Dry-run: shows the routing decision without executing
hooks session-start / session-end / pre-tool / post-tool / stop any Claude Code hook events
index generate / check / diagram any diagram emits a Mermaid graph
--help [--all] any --all includes maintainer commands
--version - any Display version

Deprecated

Commands whose catalog description starts with [deprecated] still dispatch, but only to a migration message:

Mode Selection

Mode Flag Description
server --mode=server MCP server for Claude Desktop (default)
orchestrator --mode=orchestrator Standalone CLI, CI/CD pipelines
mesh --mode=mesh Planned — not yet implemented

Global Options

Options available for all commands:

Option Type Default Description
-h, --help boolean - Show help message
-v, --version boolean - Show version information
--verbose boolean false Enable verbose output
-m, --mode enum server Server mode (see above)

Command Options Reference

orchestrate

Option Type Default Description
--model enum auto CLI to use: claude, gemini, codex
--format enum text Output format: text, json
--dry-run boolean false Show routing decision without executing
--max-tokens number 100000 Maximum token budget
--max-cost-usd number 10 Maximum cost budget in USD

vote

Option Type Default Description
-p, --proposal string required Proposal text to vote on
--strategy enum simple_majority The bar, as the consensus_vote tool spells it: simple_majority, supermajority, unanimous, higher_order, opinion_wise. Wins over --threshold when both are given (#6227). An unknown value is refused, not dropped.
--threshold enum — Legacy spelling of the bar: majority, supermajority, unanimous. --strategy wins when both are given. No short -t (it is --task).
--ratifies-pr string — <number>@<40-hex-lowercase-sha>: bind the audit record to a governor-path PR at the head the panel reviewed (#6227, #5130). Prints record <id> bound to PR n @ sha; then scripts/append-ratification-record.ts --record-id <id>. Governor bar: --strategy supermajority --error-policy absolute_quorum; a vote below it is still recorded, with a one-line notice.
--artifact-file string — Read a UTF-8 file and inline it into every seat’s proposal, with its basename, SHA-256 digest, and byte count. Maximum 256 KiB (262144 bytes); missing, empty, NUL-containing, or oversized files error.
--error-policy enum per strategy reduce_denominator, count_as_abstain, fail_closed, absolute_quorum (#2630, #4132). Default fail_closed for unanimous, else reduce_denominator.
--timeout number 300 Timeout per vote in seconds (VOTE_TIMEOUTS.defaultMs, #1640; the parse default drifted to 90 until #6236)
--quick boolean false Use 3 agents instead of 7
--dry-run boolean false Simulate votes without agent execution
Merge ratification

Generate the merge resolution diff before starting the panel, then pass it with --artifact-file. Read-only voter seats can have limited access to untracked or ignored files, and git show --remerge-diff can require writes they cannot perform. Run these commands from the checkout containing the merge head being ratified:

git show --remerge-diff --format=fuller HEAD > merge-resolution.diff
nexus-agents vote \
  --proposal "Ratify the merge resolution shown in the attached artifact." \
  --artifact-file merge-resolution.diff \
  --ratifies-pr "<pr-number>@<full-40-hex-lowercase-head-sha>" \
  --strategy supermajority \
  --error-policy absolute_quorum

Use the record ID printed by the vote with pnpm exec tsx scripts/append-ratification-record.ts --record-id <id> to prepare the committed ratification ledger. Owner ratification remains required for governor paths.

The file must contain UTF-8 text, have content, contain no NUL bytes, and be at most 256 KiB (262144 bytes). A missing, empty, binary, or oversized file fails before voting; an oversized-file error reports both its byte size and the cap. The proposal includes Artifact: <basename> sha256:<hex> <bytes> bytes, followed by the text between ===== BEGIN ARTIFACT ===== and ===== END ARTIFACT ===== markers. The existing proposalHash covers this header and content. Seats read the inlined text; this option does not grant access to the working tree or make a resolution-only diff a review of the entire PR. State the scope the panel should review in the proposal.

review

Option Type Default Description
--setup boolean false Run setup wizard
--dry-run boolean false Review without posting to GitHub
--skip-checks boolean false Skip pre-flight validation

setup

Option Type Default Description
--interactive boolean false Run the setup wizard. Without it, setup applies every step without prompting
--non-interactive boolean false Required when stdout is not a TTY or in CI; setup exits with an error without it
--force boolean false Overwrite existing files
--skip-mcp boolean false Skip MCP configuration
--skip-rules boolean false Skip rules file generation
--skip-hooks boolean false Skip hook configuration
--scope enum user MCP config scope: user, project
--dry-run boolean false Show changes without making them

routing-audit

Option Type Default Description
--format enum table Output format: table, json
--dry-run boolean false Use deterministic TOPSIS-only
--bandit-stats boolean false Show LinUCB bandit statistics

system-review

Option Type Default Description
--create-issue boolean false Create GitHub issue with results
--fix boolean false Auto-fix correctable issues

learning-metrics

Option Type Default Description
--period number 24 Time period in hours
--format enum ascii Output format: ascii, json
--bandit-stats boolean false Include LinUCB bandit statistics

research

Option Type Default Description
--format enum table Output format: table, json
-o, --output string - Custom output path for refresh

index

Option Type Default Description
--format enum yaml Output format: yaml, json
-o, --output string - Custom output path

Doctor readiness

nexus-agents doctor checks local installation, configuration, and credentials; it makes no model completions. These checks do not prove an adapter can serve. doctor --deep adds learning-loop and routing diagnostics without model calls.

nexus-agents doctor --live sends one tiny prompt with a 16-token output hint (where the adapter supports it) through each eligible adapter in the existing doctor enumeration. Each completion uses the central interactive operation-class timeout, also passed to the adapter. Reaching the deadline bounds the wait and signals cancellation to supporting adapters, including CLI subprocesses. Retries and Claude’s in-family model fallback are disabled, and Claude is not probed a second time. Live checks spend generation quota and report:

  • ok (<latency>ms) when nonempty content comes back.
  • failed (<class>): <message> for auth, quota (including “Key limit exceeded”), timeout, sandbox, or other execution failures. Empty content also fails.
  • skipped (not configured) when the CLI is absent, or skipped (credentials unavailable) when its local credential check prevents a probe. Neither result measures serving.

Failure messages are sanitized; completion content and credentials are not printed. Any failed live completion makes the exit code nonzero. When nothing is probed, the report says so and preserves the local doctor’s exit status. Skipping an adapter is not evidence that it serves. A live result measures readiness at that moment; it is not cached or a guarantee about the next call.

Gateway-served slots retain their gateway attribution; their completion proves the named gateway model serves, rather than certifying an unavailable CLI. --gateway --probe remains a separate opt-in probe of gateway model families.

Usage Examples

# Start MCP server (default)
nexus-agents

# Local health check (no model completions)
nexus-agents doctor

# Verify serving with one tiny completion per configured adapter (uses quota)
nexus-agents doctor --live

# Generate config
nexus-agents config init

# List experts
nexus-agents expert list

# Run workflow
nexus-agents workflow run code-review --input='{"url": "..."}'

# Review PR
nexus-agents review https://github.com/owner/repo/pull/123

# Debug routing
nexus-agents routing-audit "Implement a sorting algorithm" --format=json

# Standalone orchestration
nexus-agents orchestrate "Review this code for security issues"

# Consensus voting
nexus-agents vote --proposal "Should we adopt TypeScript 6.0?"

# System review (5-phase checklist)
nexus-agents system-review
nexus-agents system-review --create-issue
nexus-agents system-review --fix --verbose

# Research registry
nexus-agents research status                       # Show all techniques
nexus-agents research status --status=implemented  # Filter by status
nexus-agents research status aegean-consensus      # Show specific technique
nexus-agents research overlap trinity-roles        # Find related techniques
nexus-agents research add 2501.06322 --dry-run     # Preview adding paper
nexus-agents research discover --topic=orchestration                # Discover from all sources
nexus-agents research discover --topic=agents --source=github       # GitHub repos only
nexus-agents research discover --topic=agents --source=semantic_scholar  # Semantic Scholar
nexus-agents research discover --topic=agents --source=papers_with_code  # Papers with Code
nexus-agents research review --topic=orchestration                  # Discover, score, rank findings
nexus-agents research review --topic=agents --create-issues         # Auto-create GitHub issues
nexus-agents research prioritize                                    # Show priority backlog
nexus-agents research prioritize --topic=consensus                  # Filter by topic
nexus-agents research autofile --dry-run                            # Preview auto-filing research + gap candidates
nexus-agents research autofile --topic=agents --max=3               # File candidates as issues (safeguarded, #3382)

# Quick verification
nexus-agents verify

# PR review with setup wizard
nexus-agents review <pr-url> --setup

# Learning-validation dashboard
nexus-agents validation

# SWE-bench evaluation — DEPRECATED, see https://github.com/nexus-substrate/nexus-eval-swebench
# (the in-tree commands stub out with a migration message; harness lives in its own repo per #2514)

# Setup Claude CLI integration
nexus-agents setup                    # Auto-configure MCP + hooks + rules
nexus-agents setup --dry-run          # Preview what would be done
nexus-agents setup --skip-hooks       # Skip hook configuration

# Learning metrics dashboard
nexus-agents learning-metrics
nexus-agents learning-metrics --period=48
nexus-agents learning-metrics --bandit-stats --format=json

# Codebase index
nexus-agents index generate
nexus-agents index diagram

# Claude CLI hooks (called by Claude Code, not user)
nexus-agents hooks session-start
nexus-agents hooks pre-tool --tool Bash --validate
nexus-agents hooks post-tool --track-metrics
nexus-agents hooks stop --check-tasks

Source Files

File Purpose
src/cli-commands.ts Command dispatcher
src/cli/doctor.ts Doctor command
src/cli/config-init.ts Config init command
src/cli/expert-list.ts Expert list command
src/cli/workflow-run.ts Workflow commands
src/cli/review-command.ts PR review command
src/cli/routing-audit.ts Routing audit command
src/cli/orchestrate-command.ts Orchestrate command
src/cli/system-review.ts System review command
src/cli/verify-command.ts Verify command
src/cli/review-demo-command.ts Review demo command
src/cli/validation-dashboard-command.ts Validation dashboard
src/cli/swe-bench-command.ts SWE-bench command
src/cli/research-command.ts Research registry CLI
src/cli/setup-command.ts Setup command
src/cli/learning-metrics-command.ts Learning metrics
src/cli/index-command.ts Index command
src/cli/hooks/index.ts Hooks command

MCP Tools

Protocol: Model Context Protocol (2025-11-25) Transport: JSON-RPC 2.0 over stdio

Tool Description Auth Rate Limit
orchestrate Orchestrate a task by analyzing it, breaking it into subtasks if needed, and coordinating expert agents None (local) Shared bucket
create_expert Create a specialized expert agent for code, architecture, security, documentation, testing, devops, research, product management, UX, infrastructure, quality assurance (QA), or data visualization tasks None (local) Shared bucket
execute_expert Run a task through an expert YOU PREVIOUSLY CREATED via create_expert. None (local) Shared bucket
run_workflow Run a LINEAR (single-path) workflow template by name with typed inputs. None (local) Shared bucket
delegate_to_model Pick which existing model should HANDLE a task. None (local) Shared bucket
list_experts Inventory of expert ROLES available to create_expert (architect, security, devex, etc.). None (local) Shared bucket
list_workflows Inventory of multi-step TEMPLATES available to run_workflow (code-review, security-audit, etc.). None (local) Shared bucket
consensus_vote Execute multi-model consensus voting on a proposal. None (local) Shared bucket
research_query Query the research registry for technique status, overlaps, statistics, or text search. None (local) Shared bucket
research_add PAPER-only: add an arXiv preprint to the research registry by arXiv ID. None (local) Shared bucket
research_add_source NON-PAPER source: add a GitHub repo / tool / blog URL to the research registry with auto quality-scoring. None (local) Shared bucket
research_discover Discover new research papers and repositories from external sources. None (local) Shared bucket
research_analyze Analyze the research registry for gaps, trends, priorities, stale entries, or coverage. None (local) Shared bucket
research_catalog_review Review auto-cataloged research references found during tool execution. None (local) Shared bucket
research_synthesize Synthesize the research registry by grouping papers into topic clusters with themes, insights, and implementation opportunities. None (local) Shared bucket
survey_oss_landscape Transient OSS project search via the GitHub search API. None (local) Shared bucket
vendor_publishing_audit Look up a vendor’s published-artifact signing infrastructure: GPG key fingerprints, SHA256SUMS URL pattern, signature shape (clearsigned / detached / detached-on-iso), release cadence, key rotation notes, and the vendor doc citation. None (local) Shared bucket
compare_data_feeds Diff two upstream data feeds (YAML or JSON files) along coverage and per-field axes. None (local) Shared bucket
memory_query Query across all memory backends with unified results and relevance scoring. None (local) Shared bucket
memory_stats Get memory system statistics dashboard showing backend availability and metrics. None (local) Shared bucket
memory_write Write a memory entry to a specific backend. None (local) Shared bucket
weather_report Get multi-CLI performance weather report with per-CLI success rates and adaptive routing bonuses. None (local) Shared bucket
issue_triage Triage GitHub issues with trust classification and typed action recommendations. None (local) Shared bucket
run_graph_workflow Run a DAG-shaped workflow with per-node checkpoints, event streaming, and an audit trail. None (local) Shared bucket
execute_spec Execute an AI software factory spec through the full pipeline (parse, decompose, compile, execute, validate). None (local) Shared bucket
registry_import Draft a registry ENTRY YAML for a NEW model so routing can consider it later. None (local) Shared bucket
query_trace Query execution traces by run ID. None (local) Shared bucket
query_task_state Read the structured task-state log for a task ID and return the current snapshot. None (local) Shared bucket
get_job_result Read the result of an async-mode tool invocation by jobId (#3042 / epic #2631). None (local) Shared bucket
list_jobs List async-mode jobs across all tools (#3046 / epic #2631 Stage 5). None (local) Shared bucket
cancel_job Cancel an async-mode job and abort its in-flight work. None (local) Shared bucket
ci_health_check Diagnostic for CI infrastructure health (#3076). None (local) Shared bucket
verify_audit_chain Verify the hash chain of a persisted FileAuditStorage audit log directory (#2281 follow-up). None (local) Shared bucket
repo_analyze Analyze a GitHub repository structure. None (local) Shared bucket
repo_security_plan Generate a security scanning pipeline recommendation for a GitHub repository based on detected tech stack. None (local) Shared bucket
extract_symbols Parse a SINGLE source file with the TypeScript compiler API and return its structural symbols (functions, classes, types). None (local) Shared bucket
search_codebase Cross-file search across an index of declared symbol NAMES over the working directory — declarations only, NOT usages, call-sites, comments, or string content. None (local) Shared bucket
search_usages Structural USAGE / call-site search for a symbol via ast-grep (tree-sitter). None (local) Shared bucket
run_dev_pipeline Run the multi-agent development pipeline. Optional Shared bucket
run_pipeline Single unified entry point for all pipeline templates (dev/research/audit/greenfield/general). None (local) Shared bucket
pr_review Run multi-voter consensus review on a PR diff (#2233). None (local) Shared bucket
supply_chain_tradeoff_panel Run a structured per-axis tradeoff vote on an engineering proposal (#2294, child of #2293). None (local) Shared bucket
improvement_review Periodic threshold-gated observability-driven improvement loop (#2402). None (local) Shared bucket
run_quality_gate MCP surface over the runQualityGate QA engine (#1684, #3356). None (local) Shared bucket
suggest_research_tasks SUGGEST-ONLY surface over checkForResearchTriggers + checkForCapabilityGapTriggers (#1715 / #1711 / #3576). None (local) Shared bucket
list_available_models Probe every model-discovery transport (#3406, epic #3403) — the OpenRouter live catalog + the opencode/claude/codex/gemini CLI adapters — and return a per-transport health report { transport, ok, modelCount, sampleModelIds, error, breakerOpen }. None (local) Shared bucket
run DEFAULT ENTRY POINT (epic #3548): give a goal and nexus-agents selects the right strategy (single-shot / dev-pipeline / pipeline / graph-workflow / orchestrate / consensus / spec / research) via the MetaOrchestrator. None (local) Shared bucket

Auto-generated from REGISTERED_TOOL_NAMES + TOOL_DESCRIPTIONS by scripts/inject-governance.ts. 47 tools.

Rate limiting: All tools share a single token bucket rate limiter (capacity: 100 tokens, refill: 10 tokens/sec). Each tool call consumes one token.

Audit repository targets: The run_pipeline audit template accepts a GitHub HTTP(S) URL anywhere in the task, an explicit repo: owner/name or repository: owner/name marker, or a concise owner/name / audit owner/name task. For example, Audit repo: owner/name after checking /path/to/artifact.json selects the remote repository while treating the artifact path as task context. Use a marker or GitHub URL for dotted repository names. Repeated references to the same repository are allowed; invalid, missing, or distinct conflicting targets fail before GitHub calls and produce no successful audit report. Absolute paths and paths prefixed with ./ or ../ alone do not request a repository audit. A standalone extensionless two-segment task deliberately uses the remote repository convention, even when those segments could also name a relative path.

Graph workflow templates call no model. The run_graph_workflow templates security-audit, test-generation and documentation run local substring and regex checks over the input. No node invokes a model, CLI or adapter, and no tokens are spent. Their steps are labelled [heuristic]. Read a result as a keyword scan, not as a review by any model family (#6676). They are separate from the run_workflow templates security-audit and test-generation listed below.

Tool Schemas

Full per-tool input schemas — every parameter with its type, required/optional status, constraints (enum members, min/max, pattern, defaults), and description — live in the generated MCP Tool Reference. Those pages are generated directly from the registered Zod input schemas (pnpm docs:tools) and drift-gated in CI, so they never fall out of sync with the runtime contract.

Agents should discover schemas live via the MCP tools/list request; the generated reference is the human-readable companion.

Built-in Workflow Templates

11 built-in templates are available (source: src/workflows/template-types.ts):

Template Category Keywords
code-review review review, quality, security, analysis, code
docs-audit documentation docs, audit, verify, accuracy, drift, documentation, fact-check
feature-implementation development feature, implement, develop, create, build
bug-fix development bug, fix, debug, error, issue, patch
documentation-update documentation docs, documentation, readme, api, update
infrastructure-audit infrastructure infrastructure, hardware, server, idrac, ipmi, bare-metal
refactoring development refactor, clean, improve, restructure, simplify
research-review review research, paper, arxiv, discover, catalog, registry
security-audit review security, audit, vulnerability, owasp, scan
standards-review review standards, lint, typecheck, fitness, compliance
test-generation testing test, generate, coverage, unit, integration

Source Files

File Purpose
src/mcp/tools/index.ts Tool registration
src/mcp/tools/orchestrate.ts Orchestrate tool
src/mcp/tools/create-expert.ts Create expert tool
src/mcp/tools/run-workflow.ts Run workflow tool
src/mcp/tools/delegate-to-model.ts Delegate tool
src/mcp/tools/list-experts.ts List experts tool
src/mcp/tools/list-workflows.ts List workflows tool
src/mcp/tools/research-query.ts Research query tool
src/mcp/tools/research-add.ts Research add tool
src/mcp/tools/research-discover.ts Research discover tool
src/mcp/tools/research-analyze.ts Research analyze tool
src/mcp/tools/research-catalog-review.ts Catalog review tool
src/mcp/tools/research-auto-catalog.ts Auto-catalog module
src/mcp/tools/execute-expert.ts Execute expert tool
src/mcp/tools/consensus-vote.ts Consensus vote tool
src/mcp/tools/consensus-vote-types.ts Consensus vote schemas
src/mcp/tools/memory-query.ts Memory query tool
src/mcp/tools/memory-stats.ts Memory stats tool
src/mcp/tools/weather-report.ts Weather report tool
src/mcp/tools/issue-triage.ts Issue triage tool
src/mcp/tools/run-graph-workflow.ts Graph workflow tool
src/mcp/tools/execute-spec.ts Execute spec tool
src/mcp/tools/registry-import.ts Registry import tool

Programmatic API

Package: nexus-agents Entry Point: import { ... } from 'nexus-agents'

Core Exports

// Result Pattern
import { ok, err, isOk, isErr, map, mapErr, unwrap } from 'nexus-agents';

// Errors
import {
  NexusError,
  ValidationError,
  ConfigError,
  ModelError,
  AgentError,
  WorkflowError,
  SecurityError,
  TimeoutError,
} from 'nexus-agents';

// Configuration
import { AppConfigSchema, defaultConfig, type AppConfig } from 'nexus-agents';

Model Adapters

import {
  // Factory functions
  createClaudeAdapter,
  createOpenAIAdapter,
  createGeminiAdapter,
  createOllamaAdapter,
  AdapterFactory,

  // Classes
  ClaudeAdapter,
  OpenAIAdapter,
  GeminiAdapter,
  OllamaAdapter,

  // Types
  type IModelAdapter,
  type CompletionRequest,
  type CompletionResponse,
} from 'nexus-agents';

Agents & Experts

import {
  // Core agents
  Orchestrator, // preferred (TechLead still available as deprecated alias)
  Expert,
  ExpertFactory,

  // Built-in experts
  CodeExpert,
  SecurityExpert,
  ArchitectureExpert,
  TestingExpert,
  DocumentationExpert,

  // Selection utilities
  selectExperts,
  analyzeTask,

  // Types
  type Task,
  type TaskResult,
  type ExecutionPlan,
} from 'nexus-agents';

Workflows

import {
  // Parsing
  parseWorkflowYaml,
  loadWorkflowFile,
  validateWorkflow,

  // Templates
  BUILT_IN_TEMPLATES,
  createTemplateRegistry,

  // Types
  type WorkflowDefinition,
  type WorkflowStep,
  type WorkflowResult,
} from 'nexus-agents';

MCP Server

import {
  // Server creation
  createServer,
  startStdioServer,

  // Tool registration
  registerTools,
  registerOrchestrateTool,
  registerCreateExpertTool,
  registerRunWorkflowTool,

  // Types
  type ServerConfig,
  type ServerInstance,
} from 'nexus-agents';

CLI Adapters

import {
  // Adapter creation
  createCliAdapter,
  createAllAdapters,
  getAvailableClis,

  // Adapter classes
  ClaudeCliAdapter,
  GeminiCliAdapter,
  CodexCliAdapter,

  // Routing
  CompositeRouter,
  createCompositeRouter,

  // Detection
  CliDetectionCache,
  createCliDetectionCache,

  // Types
  type ICliAdapter,
  type CliTask,
  type CliResponse,
} from 'nexus-agents';

Context & Memory

import {
  // Token counting
  TokenCounter,
  createTokenCounter,

  // Context management
  ContextManager,

  // Types
  type ITokenCounter,
  type TokenCountResult,
} from 'nexus-agents';

Observability

import {
  // Orchestration observation (renamed from SwarmObserver in v2.24)
  OrchestrationObserver,
  createOrchestrationObserver,

  // Audit logging
  AuditLogger,
  createAuditLogger,

  // Types
  type IOrchestrationObserver,
  type IAuditLogger,
} from 'nexus-agents';

Learning & Feedback

import {
  // Feedback collection
  OutcomeFeedbackCollector,
  createOutcomeFeedbackCollector,

  // Integration
  FeedbackIntegration,
  createFeedbackIntegration,

  // Utilities
  computeOutcomeReward,

  // Types
  type TaskOutcome,
  type ComputedReward,
} from 'nexus-agents';

Quick Start Examples

MCP Server Mode

import { startStdioServer } from 'nexus-agents';

await startStdioServer({
  name: 'my-server',
  version: '1.0.0',
});

Programmatic Usage

import { createClaudeAdapter, createOrchestrator } from 'nexus-agents';

const adapter = createClaudeAdapter({ model: 'claude-sonnet-4-6' });
const orchestrator = createOrchestrator({ adapter });
const result = await orchestrator.execute({
  description: 'Analyze this codebase for security issues',
});

if (result.ok) {
  console.log(result.value.summary);
}

Source Files

File Purpose
src/index.ts Main exports
src/core/types/index.ts Type definitions
src/adapters/index.ts Model adapters
src/agents/index.ts Agent framework
src/workflows/index.ts Workflow engine

Machine-Parseable Reference

cli_commands:
  - name: help
    flags: ['--help', '-h']
    mode: any
  - name: version
    flags: ['--version', '-v']
    mode: any
  - name: doctor
    mode: any
  - name: config init
    mode: any
  - name: expert list
    mode: any
  - name: workflow list
    mode: any
  - name: workflow run
    args: ['<template>']
    mode: orchestrator
  - name: server
    flags: ['--interactive']
    mode: server
  - name: review
    args: ['<url>']
    mode: orchestrator
  - name: routing-audit
    args: ['<task>']
    flags: ['--format', '--verbose', '--dry-run']
    mode: any
  - name: orchestrate
    args: ['<task>']
    mode: orchestrator
  - name: system-review
    flags: ['--create-issue', '--fix', '--verbose']
    mode: any
  - name: setup
    flags:
      ['--non-interactive', '--force', '--skip-mcp', '--skip-rules', '--skip-hooks', '--dry-run']
    mode: any
  - name: learning-metrics
    flags: ['--period', '--format', '--bandit-stats', '--export']
    mode: any
  - name: index
    subcommands: ['generate', 'check', 'diagram', 'validate', 'entrypoints', 'freshness', 'links']
    mode: any
  - name: hooks
    subcommands: ['session-start', 'session-end', 'pre-tool', 'post-tool', 'stop']
    mode: any
  - name: vote
    flags: ['--proposal', '-p', '--threshold', '--quick', '--strategy']
    mode: any
  - name: fitness-audit
    flags: ['--format', '--verbose']
    mode: any
  - name: research
    subcommands: ['query', 'add', 'discover', 'analyze']
    mode: any
  - name: release-validate
    args: ['<version>']
    flags: ['--verbose', '--strict', '--skip']
    mode: any
  - name: verify
    flags: ['--verbose']
    mode: any
mcp_tools:
  rate_limiting: 'shared token bucket (capacity: 100, refill: 10/sec)'
  tools:
    - name: orchestrate
      auth: none
    - name: create_expert
      auth: none
    - name: execute_expert
      auth: none
    - name: run_workflow
      auth: none
    - name: delegate_to_model
      auth: none
    - name: list_experts
      auth: none
    - name: list_workflows
      auth: none
    - name: consensus_vote
      auth: none
    - name: research_query
      auth: none
    - name: research_add
      auth: none
    - name: research_add_source
      auth: none
    - name: research_discover
      auth: none
    - name: research_analyze
      auth: none
    - name: research_catalog_review
      auth: none
    - name: research_synthesize
      auth: none
    - name: survey_oss_landscape
      auth: none
    - name: vendor_publishing_audit
      auth: none
    - name: compare_data_feeds
      auth: none
    - name: memory_query
      auth: none
    - name: memory_stats
      auth: none
    - name: memory_write
      auth: none
    - name: weather_report
      auth: none
    - name: issue_triage
      auth: none
    - name: run_graph_workflow
      auth: none
    - name: execute_spec
      auth: none
    - name: registry_import
      auth: none
    - name: query_trace
      auth: none
    - name: query_task_state
      auth: none
    - name: get_job_result
      auth: none
    - name: list_jobs
      auth: none
    - name: cancel_job
      auth: none
    - name: ci_health_check
      auth: none
    - name: verify_audit_chain
      auth: none
    - name: repo_analyze
      auth: none
    - name: repo_security_plan
      auth: none
    - name: extract_symbols
      auth: none
    - name: search_codebase
      auth: none
    - name: search_usages
      auth: none
    - name: run_dev_pipeline
      auth: optional
    - name: run_pipeline
      auth: none
    - name: pr_review
      auth: none
    - name: supply_chain_tradeoff_panel
      auth: none
    - name: improvement_review
      auth: none
    - name: run_quality_gate
      auth: none
    - name: suggest_research_tasks
      auth: none
    - name: list_available_models
      auth: none
    - name: run
      auth: none

Cross-References

  • CLAUDE.md - Quick Reference section links here
  • README.md - Installation links here for “full reference”
  • ARCHITECTURE.md - Interface Layer section links here
  • guides/COMPOSITION_PATTERNS.md - Compose execute_spec / GraphBuilder / consensus into custom pipelines

Generated per Process Automation Proposal #3 (Issue #210) Approved by 5-agent consensus vote (8.6/10, unanimous)