Skip to content

SPT & Agentic Flow Aliases Guide

This document provides a comprehensive reference for all shell aliases and utility functions configured for SPT Orchestrator and Agentic-Flow. These shortcuts streamline your workflow and make interacting with both frameworks faster and more intuitive.

Performance Note: SPT v2.5.0 introduces 100-600x speedup through Claude Code SDK integration, session forking, and in-process MCP servers. Agentic-Flow adds multi-model routing with up to 99% cost savings.


Table of Contents


SPT Aliases

Core Commands

Primary commands for interacting with SPT, automatically wrapping requests with necessary context.

AliasCommandDescription
rf./spt-with-context.shBase command. Runs any spt command with auto-loaded context (CLAUDE.md, CCFOREVER.md, agents).
rf-swarm./spt-with-context.sh swarmInitiates a swarm of agents on a task with auto-loaded context.
rf-hive./spt-with-context.sh hive-mind spawnSpawns a hive-mind session for complex tasks with auto-loaded context.
rf-dspclaude --dangerously-skip-permissionsShortcut for Claude Code CLI, bypassing permission prompts.
dspclaude --dangerously-skip-permissionsEven shorter alias for rf-dsp.

Example Usage:

bash
cf swarm "Build a REST API with authentication"
rf-hive "Implement enterprise microservices architecture"
dsp  # Quick access to Claude Code without permissions

Initialization & Setup

Commands for setting up and verifying your SPT environment.

AliasCommandDescription
rf-initsptx init --forceForces re-initialization of the SPT environment.
rf-init-nexussptx init --flow-nexusInitializes environment with Flow Nexus cloud features enabled.

Example Usage:

bash
rf-init              # Initialize or reinitialize SPT
rf-init-nexus        # Initialize with cloud capabilities

Hive-Mind Operations

For managing complex, multi-agent sessions with persistent memory.

AliasCommandDescription
rf-spawnsptx hive-mind spawnSpawns a new hive-mind session.
rf-wizardsptx hive-mind wizardStarts interactive wizard to configure a hive-mind session.
rf-resumesptx hive-mind resumeResumes a previously saved hive-mind session.
rf-statussptx hive-mind statusChecks status of the current hive-mind session.

Example Usage:

bash
rf-wizard            # Interactive setup
rf-spawn "Build user authentication system"
rf-status            # Check current session
rf-resume session-12345  # Resume previous session

Swarm Operations

For simpler, single-prompt agent swarms.

AliasCommandDescription
rf-continuesptx swarm --continue-sessionContinues the last swarm session.
rf-swarm-tempsptx swarm --tempRuns temporary swarm that won't be saved to memory.
rf-swarm-namespacesptx swarm --namespaceRuns swarm within a specific project namespace.
rf-swarm-initsptx swarm initInitializes a new swarm configuration.

Example Usage:

bash
rf-continue          # Continue last swarm
rf-swarm-temp "Quick prototype without saving"
rf-swarm-namespace auth-service "Implement OAuth2"

Memory Management

For interacting with the agent's long-term SQLite-based memory system.

AliasCommandDescription
mem-statssptx memory statsDisplays statistics about memory usage.
mem-listsptx memory listLists all items in memory.
mem-querysptx memory queryQueries memory with a specific search term.
mem-recentsptx memory query --recentShows most recent memory entries.
mem-clearsptx memory clearClears the entire memory.
mem-exportsptx memory exportExports memory to a file.
mem-importsptx memory importImports memory from a file.

Example Usage:

bash
mem-stats                  # Quick memory stats (shortcut)
mem-query "authentication patterns"
mem-export ./backup.db
mem-import ./backup.db

Neural Operations (SAFLA)

Self-Aware Feedback Loop Algorithm commands for intelligent learning systems.

AliasCommandDescription
neural-initsptx neural initInitializes the neural module in current project.
neural-init-forcesptx neural init --forceForce overwrites existing neural module.
neural-init-targetsptx neural init --targetInstalls neural module to custom directory.
neural-trainsptx neural trainTrains neural patterns from data.
neural-predictsptx neural predictMakes predictions using trained models.
neural-statussptx neural statusShows neural system status.
neural-modelssptx neural modelsLists available neural models.

Note: Neural agents use @agent-safla-neural "task" syntax in Claude Code, not CLI commands.

Example Usage:

bash
neural-init       # Initialize neural capabilities
neural-train      # Train on current dataset
neural-status     # Check training progress

Goal Planning (GOAP)

Goal-Oriented Action Planning commands for intelligent task decomposition.

AliasCommandDescription
goal-initsptx goal initInitializes the goal module in current project.
goal-init-forcesptx goal init --forceForce overwrites existing goal module.
goal-init-targetsptx goal init --targetInstalls goal module to custom directory.
goal-plansptx goal planCreates an action plan for a goal.
goal-executesptx goal executeExecutes a planned goal.
goal-statussptx goal statusShows goal execution status.

Note: GOAP agents use @agent-goal-planner "task" syntax in Claude Code, not CLI commands.

Example Usage:

bash
goal-init         # Initialize goal planning
goal-plan "Deploy microservices to production"
goal-execute      # Execute the plan
goal-status       # Check execution progress

Agent Management

Commands for managing specialized agents.

AliasCommandDescription
agents-listsptx agents listLists all available agents.
agents-spawnsptx agents spawnSpawns a new agent instance.
agents-statussptx agents statusShows status of all agents.
agents-assignsptx agents assignAssigns tasks to specific agents.

Note: Most agent operations use @agent-name "task" syntax in Claude Code for direct invocation.

Example Usage:

bash
cfa                  # Quick agent list (shortcut)
agents-status     # Check all agents

Hooks System

Commands for managing automated workflow hooks.

AliasCommandDescription
hooks-listsptx hooks listLists all configured hooks.
hooks-enablesptx hooks enableEnables specific hooks.
hooks-disablesptx hooks disableDisables specific hooks.
hooks-configsptx hooks configConfigures hook settings.

Note: Hooks are primarily configured in .claude/settings.json via the init command.

Example Usage:

bash
hooks-list        # See all hooks
hooks-enable pre-commit
hooks-disable post-deploy

GitHub Integration

Commands for GitHub repository management and automation.

AliasCommandDescription
github-initsptx github initInitializes GitHub integration with automatic releases.
github-syncsptx github syncSynchronizes with GitHub repository.
github-prsptx github prManages pull requests.
github-issuessptx github issuesManages GitHub issues.
github-analyzesptx github analyzeAnalyzes repository health.
github-migratesptx github migrateMigrates repository data.

Example Usage:

bash
github-init       # Setup GitHub integration
cfg                  # Quick GitHub analysis (shortcut)
github-pr create "New feature implementation"

Flow Nexus Cloud

Commands for cloud-based AI development platform.

AliasCommandDescription
nexus-loginsptx nexus loginLogs into Flow Nexus platform.
nexus-sandboxsptx nexus sandboxManages cloud sandboxes.
nexus-swarmsptx nexus swarmDeploys cloud-based swarms.
nexus-deploysptx nexus deployDeploys applications to cloud.
nexus-challengessptx nexus challengesAccesses coding challenges.
nexus-marketplacesptx nexus marketplaceAccesses template marketplace.

Note: Flow Nexus primarily uses MCP tool syntax: mcp__flow-nexus__user_register({...}).

Example Usage:

bash
nexus-login       # Authenticate
cfn "Deploy distributed API swarm"  # Quick swarm (shortcut)
nexus-sandbox create --template node

Performance & Analytics

Commands for benchmarking and performance analysis.

AliasCommandDescription
benchmarksptx benchmarkRuns performance benchmarks.
analyzesptx analyzeAnalyzes system performance.
optimizesptx optimizeOptimizes configurations.
metricssptx metricsShows performance metrics.

Example Usage:

bash
benchmark         # Run full benchmark suite
metrics           # View current metrics

Benchmarking System

Comprehensive performance testing and analysis commands.

AliasCommandDescription
rf-swarm-benchswarm-benchMain benchmarking command.
bench-runswarm-bench runRuns benchmark suite.
bench-loadswarm-bench load-testPerforms load testing.
bench-sweswarm-bench swe-bench officialRuns SWE-bench evaluation.
bench-multiswarm-bench swe-bench multi-modeMulti-mode SWE-bench comparison.
bench-compareswarm-bench compareCompares benchmark results.
bench-monitorswarm-bench monitor --dashboardOpens real-time monitoring dashboard.
bench-diagnoseswarm-bench diagnoseDiagnoses performance issues.
bench-analyzeswarm-bench analyze-errorsAnalyzes error patterns.
bench-optimizeswarm-bench optimizeOptimizes based on benchmarks.

Example Usage:

bash
bench-run         # Standard benchmark
bench-load        # Load testing
bench-monitor     # Live dashboard

Hive-Mind Configuration

Commands for configuring hive-mind topology and behavior.

AliasCommandDescription
rf-hive-initspt hive initInitializes hive with default settings.
rf-hive-monitorspt hive monitorMonitors hive activity in real-time.
rf-hive-healthspt hive healthChecks hive health status.
rf-hive-configspt hive config setSets hive configuration options.

Example Usage:

bash
rf-hive-init         # Initialize hive
rf-hive-monitor      # Watch agents work
rf-hive-health       # Health check

Verification & Testing

Commands for validation and testing.

AliasCommandDescription
rf-verifysptx verifyVerifies system integrity.
rf-truthsptx truthRuns truth validation checks.
rf-testsptx testExecutes test suites.
rf-validatesptx validateValidates configurations.

Example Usage:

bash
rf-verify            # System verification
rf-test              # Run tests

Pairing & Collaboration

Commands for collaborative development.

AliasCommandDescription
rf-pairsptx pair --startStarts pairing session.
rf-pair-stopsptx pair --stopStops pairing session.
rf-pair-statussptx pair --statusShows pairing status.

Example Usage:

bash
rf-pair              # Start pair programming
rf-pair-status       # Check session
rf-pair-stop         # End session

SMART Methodology

Commands for Specification, Modeling, Architecture, Refinement, Trust-Validation workflow.

AliasCommandDescription
smart-initsptx smart initInitializes SMART workflow.
smart-plansptx smart planCreates plan for current task.
smart-executesptx smart executeExecutes planned actions.
smart-reviewsptx smart reviewReviews execution results.

Note: SMART operations primarily use agent spawn patterns.

Example Usage:

bash
smart-init        # Start SMART workflow
smart-plan        # Create execution plan
smart-execute     # Execute plan
smart-review      # Review results

Quick Commands (Shortcuts)

Single-letter and abbreviated aliases for common operations.

AliasBase CommandDescription
cfsrf-swarmQuick shortcut for swarm operations.
cfhrf-hiveQuick shortcut for hive-mind spawn.
cfrrf-resumeQuick shortcut for resume session.
cfstrf-statusQuick shortcut for status check.
mem-statsmem-statsQuick shortcut for memory stats.
mem-statsqmem-queryQuick shortcut for memory query.
cfaagents-listQuick shortcut for agent list.
cfggithub-analyzeQuick shortcut for GitHub analysis.
cfnnexus-swarmQuick shortcut for Nexus swarm.

Example Usage:

bash
cfs "Build REST API"         # Quick swarm
mem-stats                          # Memory stats
cfa                          # List agents

Monitoring & Debugging

Commands for system monitoring and troubleshooting.

AliasCommandDescription
rf-monitorclaude-monitorOpens monitoring interface.
rf-logssptx logsViews system logs.
rf-debugsptx debugEnables debug mode.
rf-tracesptx traceShows execution traces.

Example Usage:

bash
rf-monitor           # Real-time monitoring
rf-logs              # View logs
rf-debug             # Enable debugging

Help & Documentation

Commands for accessing documentation and help resources.

AliasCommandDescription
rf-helpsptx --helpShows help information.
rf-docsecho 'Visit: https://github.com/SmartPointsTech/spt/wiki'Opens documentation wiki.
rf-examplesecho 'Visit: https://github.com/SmartPointsTech/spt/tree/main/examples'Opens examples repository.

Example Usage:

bash
rf-help              # Show all commands
rf-docs              # View documentation
rf-examples          # See examples

SPT Utility Functions

Advanced shell functions that accept arguments for dynamic operations.

rf-task "your task description"

Quickly starts a swarm for a given task using the --claude flag.

bash
rf-task "Build a REST API with authentication"
rf-task "Implement user management system"

rf-hive-ns "your task" "namespace"

Spawns a hive-mind session for a task within a specified namespace.

bash
rf-hive-ns "Implement user management" "auth-service"
rf-hive-ns "Build payment gateway" "payments"

rf-search "query"

Searches the memory and includes recent context in the query.

bash
rf-search "authentication patterns"
rf-search "API design decisions"

rf-sandbox "template_name" "sandbox_name"

Creates a new Flow Nexus cloud sandbox from a template.

bash
rf-sandbox "node" "api-development"
rf-sandbox "python" "ml-training"

rf-session [list | resume <id> | status]

Helper to manage hive-mind sessions.

bash
rf-session list                    # List all sessions
rf-session resume session-12345    # Resume specific session
rf-session status                  # Check current status

rf-hive-topology "topology" [options]

Initializes hive with specific topology (mesh, hierarchical, ring, star).

bash
rf-hive-topology mesh --agents 8
rf-hive-topology hierarchical --agents 12
rf-hive-topology ring --agents 6

bench-quick

Runs quick benchmark comparison across multiple configurations.

bash
bench-quick

rf-load-test [agents] [tasks]

Performs load testing with specified agent and task counts.

bash
rf-load-test 50 100    # 50 agents, 100 tasks
rf-load-test           # Uses defaults: 20 agents, 200 tasks

Agentic-Flow Aliases

Agentic-Flow Core Commands

Primary commands for interacting with Agentic-Flow and its context wrapper system.

AliasCommandDescription
af./af-with-context.shBase command. Runs any agentic-flow command with auto-loaded context.
agentic-flownpx agentic-flowDirect access to agentic-flow CLI without context wrapper.

Example Usage:

bash
af --agent coder --task "Build REST API"
agentic-flow --list  # Direct command

Agent Execution

Commands for running agents with various execution modes.

AliasCommandDescription
af-runnpx agentic-flow --agentRun a specific agent (requires agent name and task).
af-streamnpx agentic-flow --streamEnable real-time streaming output during agent execution.
af-parallelnpx agentic-flowRun multi-agent swarm (uses TOPIC, DIFF, DATASET env vars).

Example Usage:

bash
af-run coder --task "Build REST API"
af-stream --agent researcher --task "Analyze trends"
export TOPIC="API security" DIFF="feat: OAuth" DATASET="logs.csv"
af-parallel

Model Optimization

Commands for intelligent model selection and cost optimization.

AliasCommandDescription
af-optimizenpx agentic-flow --optimizeAuto-select optimal model for task (balanced quality/cost).
af-optimize-costnpx agentic-flow --optimize --priority costPrioritize cheapest models (99% savings).
af-optimize-qualitynpx agentic-flow --optimize --priority qualityPrioritize highest quality models.
af-optimize-speednpx agentic-flow --optimize --priority speedPrioritize fastest response models.
af-optimize-privacynpx agentic-flow --optimize --priority privacyUse only local ONNX models (100% offline).

Optimization Priorities:

  • quality: 70% quality, 20% speed, 10% cost
  • balanced: 40% quality, 40% cost, 20% speed (default)
  • cost: 70% cost, 20% quality, 10% speed
  • speed: 70% speed, 20% quality, 10% cost
  • privacy: Local-only, zero cloud API calls

Example Usage:

bash
afo --agent coder --task "Build API"  # Shortcut for optimize
af-optimize-cost --agent tester --task "Write tests"
af-optimize-privacy --agent researcher --task "Analyze medical data"

Provider Selection

Commands for selecting specific AI model providers.

AliasCommandDescription
af-openrouternpx agentic-flow --modelUse OpenRouter models (99% cost savings).
af-gemininpx agentic-flow --provider geminiUse Google Gemini models (98% cost savings).
af-onnxnpx agentic-flow --provider onnxUse local ONNX models (100% free).
af-anthropicnpx agentic-flow --provider anthropicUse Anthropic Claude models (premium quality).

Provider Comparison:

  • Anthropic: $3-15 per 1M tokens, premium quality
  • OpenRouter: $0.06-0.55 per 1M tokens, 97-99% savings
  • Gemini: $0.075-1.25 per 1M tokens, 95-98% savings
  • ONNX: $0 (free), local inference, privacy-focused

Example Usage:

bash
af-gemini --agent coder --task "Build API"
af-onnx --agent researcher --task "Analyze private data"
af-openrouter meta-llama/llama-3.1-8b-instruct --task "Code review"

MCP Server Management

Commands for managing Model Context Protocol (MCP) servers (213 tools total).

AliasCommandDescription
af-mcp-startnpx agentic-flow mcp startStart all MCP servers (213 tools).
af-mcp-stopnpx agentic-flow mcp stopStop all MCP servers.
af-mcp-statusnpx agentic-flow mcp statusCheck status of MCP servers.
af-mcp-listnpx agentic-flow mcp listList all 213 available MCP tools.

Available MCP Servers:

  • spt - 101 tools (neural networks, GitHub, workflows)
  • flow-nexus - 96 tools (cloud sandboxes, distributed swarms)
  • agentic-payments - 10 tools (payment authorization, signatures)
  • spt-sdk - 6 tools (in-process memory, coordination)

Example Usage:

bash
af-mcp-start         # Start all servers
afm                  # Quick list (shortcut)
af-mcp-status        # Check status

Custom MCP Servers

Commands for adding and managing custom MCP servers (v1.2.1+).

AliasCommandDescription
af-mcp-addnpx agentic-flow mcp addAdd custom MCP server to configuration.
af-mcp-removenpx agentic-flow mcp removeRemove MCP server from configuration.
af-mcp-enablenpx agentic-flow mcp enableEnable previously disabled MCP server.
af-mcp-disablenpx agentic-flow mcp disableDisable MCP server without removing.
af-mcp-testnpx agentic-flow mcp testTest MCP server configuration.
af-mcp-exportnpx agentic-flow mcp exportExport MCP configuration to file.
af-mcp-importnpx agentic-flow mcp importImport MCP configuration from file.

Configuration Location: ~/.agentic-flow/mcp-config.json

Example Usage:

bash
# Add weather MCP server
af-mcp-add weather '{"command":"npx","args":["-y","weather-mcp"],"env":{"API_KEY":"xxx"}}'

# Add GitHub MCP server (flag style)
af-mcp-add github --npm @modelcontextprotocol/server-github --env "GITHUB_TOKEN=ghp_xxx"

# Test configuration
af-mcp-test weather

# Backup configuration
af-mcp-export ./mcp-backup.json
af-mcp-import ./mcp-backup.json

Specific MCP Servers

Quick commands for starting individual MCP servers.

AliasCommandDescription
af-mcp-claudenpx agentic-flow mcp start sptStart SPT MCP server (101 tools).
af-mcp-nexusnpx agentic-flow mcp start flow-nexusStart Flow Nexus MCP server (96 tools).
af-mcp-paymentsnpx agentic-flow mcp start agentic-paymentsStart payment authorization server (10 tools).

Example Usage:

bash
af-mcp-claude        # Only SPT tools
af-mcp-nexus         # Only Flow Nexus tools

Agent Types (150+ Agents)

Core Development Agents

AliasCommandDescription
af-codernpx agentic-flow --agent coderImplementation specialist for clean, efficient code.
af-reviewernpx agentic-flow --agent reviewerCode review and quality assurance.
af-testernpx agentic-flow --agent testerComprehensive testing with 90%+ coverage.
af-researchernpx agentic-flow --agent researcherDeep research and information gathering.
af-plannernpx agentic-flow --agent plannerStrategic planning and task decomposition.

Specialized Development Agents

AliasCommandDescription
af-backendnpx agentic-flow --agent backend-devREST/GraphQL API development.
af-mobilenpx agentic-flow --agent mobile-devReact Native mobile applications.
af-mlnpx agentic-flow --agent ml-developerMachine learning model creation.
af-architectnpx agentic-flow --agent system-architectSystem design and architecture.
af-cicdnpx agentic-flow --agent cicd-engineerCI/CD pipeline creation.
af-docsnpx agentic-flow --agent api-docsOpenAPI/Swagger documentation.
af-perfnpx agentic-flow --agent perf-analyzerPerformance bottleneck detection.

Example Usage:

bash
afc --task "Build REST API"              # Shortcut for coder
af-backend --task "Create GraphQL schema"
af-ml --task "Train sentiment model"

GitHub Integration Agents

AliasCommandDescription
af-prnpx agentic-flow --agent pr-managerPull request lifecycle management.
af-code-reviewnpx agentic-flow --agent code-review-swarmMulti-agent code review coordination.
af-issuenpx agentic-flow --agent issue-trackerIntelligent issue management.
af-releasenpx agentic-flow --agent release-managerAutomated release coordination.

Example Usage:

bash
af-pr --task "Review PR #123"
af-code-review --task "Analyze security vulnerabilities"

Swarm Coordinators

AliasCommandDescription
af-hierarchicalnpx agentic-flow --agent hierarchical-coordinatorTree-based leadership coordination.
af-meshnpx agentic-flow --agent mesh-coordinatorPeer-to-peer agent coordination.
af-adaptivenpx agentic-flow --agent adaptive-coordinatorDynamic topology switching.
af-swarm-memorynpx agentic-flow --agent swarm-memory-managerCross-agent memory synchronization.

Example Usage:

bash
af-mesh --task "Coordinate distributed API build"
af-hierarchical --task "Manage large codebase refactor"

To see all 150+ agents: af-list


Docker Deployment

Commands for containerized agent deployment.

AliasCommandDescription
af-docker-builddocker build -f deployment/Dockerfile -t agentic-flow .Build Agentic Flow Docker image.
af-docker-rundocker run --rm -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY agentic-flowRun agent in Docker container.

Docker Benefits:

  • ✅ All 203 MCP tools work (full subprocess support)
  • ✅ Reproducible builds and deployments
  • ✅ Works on Kubernetes, ECS, Cloud Run, Fargate
  • ✅ Isolated execution environment

Example Usage:

bash
af-docker-build
af-docker-run --agent coder --task "Build API"

Information & Help

Commands for accessing documentation and system information.

AliasCommandDescription
af-listnpx agentic-flow --listList all 150+ available agents.
af-helpnpx agentic-flow --helpShow help information and usage.
af-versionnpx agentic-flow --versionDisplay Agentic Flow version.

Example Usage:

bash
af-list              # See all agents
af-help              # Get help
af-version           # Check version

Environment Setup

Quick commands for setting API keys.

AliasCommandDescription
af-env-anthropicexport ANTHROPIC_API_KEY=Set Anthropic API key.
af-env-openrouterexport OPENROUTER_API_KEY=Set OpenRouter API key.
af-env-geminiexport GOOGLE_GEMINI_API_KEY=Set Google Gemini API key.

Example Usage:

bash
af-env-anthropic sk-ant-xxx
af-env-openrouter sk-or-v1-xxx
af-env-gemini xxxxx

# Or set directly:
export ANTHROPIC_API_KEY=sk-ant-xxx
export OPENROUTER_API_KEY=sk-or-v1-xxx
export GOOGLE_GEMINI_API_KEY=xxxxx

Agentic-Flow Quick Commands

Single-letter and abbreviated aliases for common operations.

AliasBase CommandDescription
afraf-runQuick shortcut for running agents.
afsaf-streamQuick shortcut for streaming execution.
afoaf-optimizeQuick shortcut for optimization.
afmaf-mcp-listQuick shortcut for MCP tool list.
afcaf-coderQuick shortcut for coder agent.
afrevaf-reviewerQuick shortcut for reviewer agent.
aftaf-testerQuick shortcut for tester agent.

Example Usage:

bash
afc --task "Build API"           # Quick coder
afs --agent researcher --task "Analyze trends"
afo --agent coder --task "Build auth"

Agentic-Flow Utility Functions

Advanced shell functions that accept arguments for dynamic operations.

af-task "agent" "task description"

Quickly run an agent task with streaming output enabled.

bash
af-task coder "Build REST API with authentication"
af-task researcher "Analyze AI trends in 2025"

af-opt-task "agent" "task description"

Run an agent task with automatic model optimization.

bash
af-opt-task reviewer "Review security vulnerabilities"
af-opt-task tester "Write comprehensive unit tests"

af-cheap "agent" "task description"

Run an agent task with maximum cost optimization (99% savings).

bash
af-cheap coder "Write simple CRUD functions"
af-cheap tester "Generate basic test cases"

Cost Comparison:

  • Without optimization: $0.08/task (Claude Sonnet 4.5)
  • With af-cheap: $0.001/task (Llama 3.1 8B)
  • Savings: 99% ($237/month for 100 daily tasks)

af-private "agent" "task description"

Run an agent task using only local ONNX models (100% offline, free).

bash
af-private researcher "Analyze confidential medical data"
af-private coder "Process sensitive customer information"

Privacy Benefits:

  • ✅ 100% local processing (no cloud API calls)
  • ✅ GDPR/HIPAA compliant
  • ✅ $0 cost
  • ✅ ~6 tokens/sec CPU, 60-300 tokens/sec GPU

af-openai "model" [options]

Run agent with specific OpenRouter model.

bash
af-openai meta-llama/llama-3.1-8b-instruct --agent coder --task "Build API"
af-openai deepseek/deepseek-chat-v3.1 --agent reviewer --task "Review code"

Popular OpenRouter Models:

  • meta-llama/llama-3.1-8b-instruct - 99% cost savings
  • deepseek/deepseek-chat-v3.1 - Superior code generation, 97% savings
  • google/gemini-2.5-flash-preview - Fastest responses, 95% savings
  • anthropic/claude-3.5-sonnet - Full Claude via OpenRouter

af-gemini-task "agent" "task description"

Run agent task using Google Gemini (fast, cost-effective).

bash
af-gemini-task researcher "Analyze market trends"
af-gemini-task coder "Build simple web scraper"

Gemini Benefits:

  • ✅ 2.5 Flash: FREE up to rate limits
  • ✅ Fastest responses (avg 1.5s)
  • ✅ 98% cost savings vs Claude

af-swarm "topic" "diff" "dataset"

Run multi-agent swarm with three parallel agents.

bash
af-swarm "API security" "feat: add OAuth2" "response_times.csv"
# Spawns: researcher + code-reviewer + data-analyst

af-add-mcp "name" "command"

Add custom MCP server to configuration.

bash
af-add-mcp weather 'npx @modelcontextprotocol/server-weather'
af-add-mcp github '{"command":"npx","args":["server-github"]}'

af-benchmark "task description"

Run quick benchmark comparison with optimization.

bash
af-benchmark "Generate API documentation"
af-benchmark "Analyze code performance"

Cost Optimization Examples

Scenario 1: Without Optimization (Always Claude Sonnet 4.5)

bash
# 100 code reviews/day × $0.08 each = $8/day = $240/month
npx agentic-flow --agent reviewer --task "Review PR"

Scenario 2: With Optimization (DeepSeek R1)

bash
# 100 code reviews/day × $0.012 each = $1.20/day = $36/month
# Savings: $204/month (85% reduction)
af-optimize --agent reviewer --task "Review PR"

Scenario 3: Maximum Savings (Llama 3.1 8B)

bash
# 100 simple tasks/day × $0.001 each = $0.10/day = $3/month
# Savings: $237/month (99% reduction)
af-cheap tester "Write unit tests"

Scenario 4: Zero Cost (Local ONNX)

bash
# 100 private tasks/day × $0.00 each = $0/month
# Savings: $240/month (100% reduction)
af-private researcher "Analyze confidential data"

Model Tier Reference

Tier 1: Flagship (Premium Quality)

  • Claude Sonnet 4.5: $3/$15 per 1M tokens
  • GPT-4o: $2.50/$10 per 1M tokens
  • Gemini 2.5 Pro: $0.00/$2.00 per 1M tokens

Tier 2: Cost-Effective (2025 Breakthrough)

  • DeepSeek R1: $0.55/$2.19 per 1M tokens (85% cheaper, flagship quality)
  • DeepSeek Chat V3: $0.14/$0.28 per 1M tokens (98% cheaper)

Tier 3: Balanced

  • Gemini 2.5 Flash: $0.07/$0.30 per 1M tokens (fastest)
  • Llama 3.3 70B: $0.30/$0.30 per 1M tokens (open-source)

Tier 4: Budget

  • Llama 3.1 8B: $0.055/$0.055 per 1M tokens (ultra-low cost)

Tier 5: Local/Privacy

  • ONNX Phi-4: FREE (offline, private, no API)

Quick Start Guide

1. Installation

bash
# Run the setup script (installs both SPT and Agentic-Flow)
./setup.sh

# Activate aliases
source ~/.bashrc

2. Set API Keys

bash
# Required for Claude models
export ANTHROPIC_API_KEY=sk-ant-...

# Optional: For 99% cost savings
export OPENROUTER_API_KEY=sk-or-v1-...

# Optional: For speed optimization
export GOOGLE_GEMINI_API_KEY=xxxxx

3. Initialize SPT

bash
rf-init              # Initialize SPT environment

4. Start MCP Servers (Optional)

bash
af-mcp-start         # Starts all 213 tools
# or
rf-mcp-start         # Same servers, SPT command

5. Run Your First Agents

SPT (Swarm Coordination):

bash
# Simple swarm
cfs "Build REST API with authentication"

# Complex hive-mind
rf-wizard
rf-spawn "Build enterprise microservices system"

Agentic-Flow (Cost-Optimized Agents):

bash
# Basic execution
afc --task "Build REST API" --stream

# With optimization (recommended)
af-optimize --agent coder --task "Build REST API"

# Maximum cost savings
af-cheap coder "Build simple function"

# Privacy mode (offline)
af-private researcher "Analyze sensitive data"

6. Add Custom Tools

bash
# Add weather data
af-mcp-add weather 'npx @modelcontextprotocol/server-weather'

# Add GitHub integration
af-mcp-add github --npm @modelcontextprotocol/server-github

Deployment Comparison

FeatureSPTAgentic-Flow
Primary UseMulti-agent swarm coordinationCost-optimized single agents
MCP Tools213 (all servers)213 (all servers)
Model OptionsClaude onlyClaude, OpenRouter, Gemini, ONNX
Cost Optimization❌ No✅ Yes (up to 99% savings)
Privacy Mode❌ No✅ Yes (local ONNX)
Swarm Support✅ Advanced (hive-mind)✅ Basic (parallel)
Memory System✅ Persistent SQLite✅ Shared memory
Best ForComplex multi-agent tasksCost-sensitive workflows

Performance Characteristics

SPT Performance (v2.5.0)

  • Session Forking: 10-20x faster parallel agent spawning
  • Hook Matchers: 2-3x faster selective hook execution
  • In-Process MCP: 50-100x faster tool calls
  • Combined Speedup: 100-600x potential gain

Agentic-Flow Performance

ONNX Local Inference:

  • CPU: ~6 tokens/sec, ~2GB RAM
  • GPU: 60-300 tokens/sec, ~3GB VRAM
  • Cost: $0.00 (100% free)
  • Privacy: 100% local processing

Cloud APIs:

  • Latency: 1-3 seconds first token
  • Throughput: Variable by provider
  • Cost: $0.055-15 per 1M tokens

Model Selection:

  • Optimization: <100ms overhead
  • Rule-based routing: Instant
  • Quality assessment: Built-in agent profiles

Common Workflows

Workflow 1: Cost-Optimized Development

bash
# Initialize environment
rf-init
af-mcp-start

# Development tasks (cheap models)
af-cheap coder "Implement user CRUD"
af-cheap tester "Write unit tests"

# Code review (quality model)
af-optimize --agent reviewer --task "Review security" --priority quality

# Deploy
github-pr create "New feature implementation"

Workflow 2: Privacy-First Analysis

bash
# All processing stays local
af-private researcher "Analyze patient medical records"
af-private coder "Process confidential financial data"
af-private tester "Test sensitive algorithms"

Workflow 3: Complex Multi-Agent System

bash
# SPT for coordination
rf-wizard
rf-hive-topology mesh --agents 12
rf-spawn "Build distributed microservices platform"

# Monitor progress
rf-hive-monitor
cfst  # Check status

Workflow 4: Rapid Prototyping

bash
# Use fast Gemini models
af-gemini-task coder "Quick prototype REST API"
af-gemini-task tester "Generate basic tests"

# Review with optimized model
af-optimize-speed --agent reviewer --task "Quick review"

Troubleshooting

Problem: Agent Not Found

bash
# List all available agents
af-list              # Agentic-Flow agents
cfa                  # SPT agents

Problem: MCP Tools Not Working

bash
# Check MCP server status
af-mcp-status        # or rf-mcp-status

# Restart MCP servers
af-mcp-stop
af-mcp-start

Problem: High API Costs

bash
# Enable optimization
af-optimize --agent coder --task "your task"

# Or use cost priority
af-cheap coder "your task"

# Or go fully offline
af-private coder "your task"

Problem: Privacy Concerns

bash
# Use local-only mode (no cloud API calls)
af-private researcher "sensitive task"

# Verify no cloud calls
af-onnx --agent researcher --task "your task"

Problem: Slow Performance

bash
# Use speed-optimized models
af-optimize-speed --agent coder --task "your task"

# Or use Gemini (fastest)
af-gemini-task coder "your task"

Problem: Context Not Loading

bash
# Verify context wrapper scripts exist
ls -l spt-with-context.sh af-with-context.sh

# Recreate if needed
chmod +x spt-with-context.sh af-with-context.sh

Installation Script Summary

The setup script (setup.sh) automatically installs:

  1. ✅ Claude Code CLI
  2. ✅ Claude Monitor (usage tracking)
  3. ✅ SPT Orchestrator
  4. ✅ Agentic-Flow (latest)
  5. ✅ Context wrapper scripts (spt-with-context.sh, af-with-context.sh)
  6. ✅ All aliases (appended to ~/.bashrc)
  7. ✅ Claude subagents
  8. ✅ Playwright for testing
  9. ✅ TypeScript configuration

After installation:

bash
source ~/.bashrc      # Activate all aliases
rf-init               # Initialize SPT
af-mcp-start          # Start MCP servers

Additional Resources

SPT

Agentic-Flow

MCP Protocol


Summary

This guide covers all aliases from the aliases.sh script:

SPT (rf-*):

  • 80+ aliases for swarm coordination, hive-mind operations, memory management, neural ops, GOAP, GitHub integration, Flow Nexus cloud, benchmarking, and more
  • 10 utility functions for advanced workflows

Agentic-Flow (af-*):

  • 60+ aliases for cost-optimized agents, multi-model routing, MCP management, and specialized agents
  • 10 utility functions for cost optimization and privacy

Key Benefits:

  • SPT: 100-600x performance speedup, advanced multi-agent coordination
  • Agentic-Flow: Up to 99% cost savings, local privacy-first inference
  • Combined: Best of both worlds - fast coordination + cost optimization

Get Started:

bash
source ~/.bashrc              # Activate all aliases
rf-init                       # Initialize SPT
af-mcp-start                  # Start 213 MCP tools

# SPT: Complex coordination
cfs "Build distributed system"

# Agentic-Flow: Cost-optimized tasks
af-cheap coder "Build REST API"

# Agentic-Flow: Privacy-first
af-private researcher "Analyze sensitive data"

For complete documentation, visit the GitHub repositories and documentation links above.

Released under the MIT License.