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
- Initialization & Setup
- Hive-Mind Operations
- Swarm Operations
- Memory Management
- Neural Operations (SAFLA)
- Goal Planning (GOAP)
- Agent Management
- Hooks System
- GitHub Integration
- Flow Nexus Cloud
- Performance & Analytics
- Benchmarking System
- Hive-Mind Configuration
- Verification & Testing
- Pairing & Collaboration
- SMART Methodology
- Quick Commands
- Monitoring & Debugging
- Help & Documentation
- Utility Functions
- Agentic-Flow Aliases
SPT Aliases
Core Commands
Primary commands for interacting with SPT, automatically wrapping requests with necessary context.
| Alias | Command | Description |
|---|---|---|
rf | ./spt-with-context.sh | Base command. Runs any spt command with auto-loaded context (CLAUDE.md, CCFOREVER.md, agents). |
rf-swarm | ./spt-with-context.sh swarm | Initiates a swarm of agents on a task with auto-loaded context. |
rf-hive | ./spt-with-context.sh hive-mind spawn | Spawns a hive-mind session for complex tasks with auto-loaded context. |
rf-dsp | claude --dangerously-skip-permissions | Shortcut for Claude Code CLI, bypassing permission prompts. |
dsp | claude --dangerously-skip-permissions | Even shorter alias for rf-dsp. |
Example Usage:
cf swarm "Build a REST API with authentication"
rf-hive "Implement enterprise microservices architecture"
dsp # Quick access to Claude Code without permissionsInitialization & Setup
Commands for setting up and verifying your SPT environment.
| Alias | Command | Description |
|---|---|---|
rf-init | sptx init --force | Forces re-initialization of the SPT environment. |
rf-init-nexus | sptx init --flow-nexus | Initializes environment with Flow Nexus cloud features enabled. |
Example Usage:
rf-init # Initialize or reinitialize SPT
rf-init-nexus # Initialize with cloud capabilitiesHive-Mind Operations
For managing complex, multi-agent sessions with persistent memory.
| Alias | Command | Description |
|---|---|---|
rf-spawn | sptx hive-mind spawn | Spawns a new hive-mind session. |
rf-wizard | sptx hive-mind wizard | Starts interactive wizard to configure a hive-mind session. |
rf-resume | sptx hive-mind resume | Resumes a previously saved hive-mind session. |
rf-status | sptx hive-mind status | Checks status of the current hive-mind session. |
Example Usage:
rf-wizard # Interactive setup
rf-spawn "Build user authentication system"
rf-status # Check current session
rf-resume session-12345 # Resume previous sessionSwarm Operations
For simpler, single-prompt agent swarms.
| Alias | Command | Description |
|---|---|---|
rf-continue | sptx swarm --continue-session | Continues the last swarm session. |
rf-swarm-temp | sptx swarm --temp | Runs temporary swarm that won't be saved to memory. |
rf-swarm-namespace | sptx swarm --namespace | Runs swarm within a specific project namespace. |
rf-swarm-init | sptx swarm init | Initializes a new swarm configuration. |
Example Usage:
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.
| Alias | Command | Description |
|---|---|---|
mem-stats | sptx memory stats | Displays statistics about memory usage. |
mem-list | sptx memory list | Lists all items in memory. |
mem-query | sptx memory query | Queries memory with a specific search term. |
mem-recent | sptx memory query --recent | Shows most recent memory entries. |
mem-clear | sptx memory clear | Clears the entire memory. |
mem-export | sptx memory export | Exports memory to a file. |
mem-import | sptx memory import | Imports memory from a file. |
Example Usage:
mem-stats # Quick memory stats (shortcut)
mem-query "authentication patterns"
mem-export ./backup.db
mem-import ./backup.dbNeural Operations (SAFLA)
Self-Aware Feedback Loop Algorithm commands for intelligent learning systems.
| Alias | Command | Description |
|---|---|---|
neural-init | sptx neural init | Initializes the neural module in current project. |
neural-init-force | sptx neural init --force | Force overwrites existing neural module. |
neural-init-target | sptx neural init --target | Installs neural module to custom directory. |
neural-train | sptx neural train | Trains neural patterns from data. |
neural-predict | sptx neural predict | Makes predictions using trained models. |
neural-status | sptx neural status | Shows neural system status. |
neural-models | sptx neural models | Lists available neural models. |
Note: Neural agents use @agent-safla-neural "task" syntax in Claude Code, not CLI commands.
Example Usage:
neural-init # Initialize neural capabilities
neural-train # Train on current dataset
neural-status # Check training progressGoal Planning (GOAP)
Goal-Oriented Action Planning commands for intelligent task decomposition.
| Alias | Command | Description |
|---|---|---|
goal-init | sptx goal init | Initializes the goal module in current project. |
goal-init-force | sptx goal init --force | Force overwrites existing goal module. |
goal-init-target | sptx goal init --target | Installs goal module to custom directory. |
goal-plan | sptx goal plan | Creates an action plan for a goal. |
goal-execute | sptx goal execute | Executes a planned goal. |
goal-status | sptx goal status | Shows goal execution status. |
Note: GOAP agents use @agent-goal-planner "task" syntax in Claude Code, not CLI commands.
Example Usage:
goal-init # Initialize goal planning
goal-plan "Deploy microservices to production"
goal-execute # Execute the plan
goal-status # Check execution progressAgent Management
Commands for managing specialized agents.
| Alias | Command | Description |
|---|---|---|
agents-list | sptx agents list | Lists all available agents. |
agents-spawn | sptx agents spawn | Spawns a new agent instance. |
agents-status | sptx agents status | Shows status of all agents. |
agents-assign | sptx agents assign | Assigns tasks to specific agents. |
Note: Most agent operations use @agent-name "task" syntax in Claude Code for direct invocation.
Example Usage:
cfa # Quick agent list (shortcut)
agents-status # Check all agentsHooks System
Commands for managing automated workflow hooks.
| Alias | Command | Description |
|---|---|---|
hooks-list | sptx hooks list | Lists all configured hooks. |
hooks-enable | sptx hooks enable | Enables specific hooks. |
hooks-disable | sptx hooks disable | Disables specific hooks. |
hooks-config | sptx hooks config | Configures hook settings. |
Note: Hooks are primarily configured in .claude/settings.json via the init command.
Example Usage:
hooks-list # See all hooks
hooks-enable pre-commit
hooks-disable post-deployGitHub Integration
Commands for GitHub repository management and automation.
| Alias | Command | Description |
|---|---|---|
github-init | sptx github init | Initializes GitHub integration with automatic releases. |
github-sync | sptx github sync | Synchronizes with GitHub repository. |
github-pr | sptx github pr | Manages pull requests. |
github-issues | sptx github issues | Manages GitHub issues. |
github-analyze | sptx github analyze | Analyzes repository health. |
github-migrate | sptx github migrate | Migrates repository data. |
Example Usage:
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.
| Alias | Command | Description |
|---|---|---|
nexus-login | sptx nexus login | Logs into Flow Nexus platform. |
nexus-sandbox | sptx nexus sandbox | Manages cloud sandboxes. |
nexus-swarm | sptx nexus swarm | Deploys cloud-based swarms. |
nexus-deploy | sptx nexus deploy | Deploys applications to cloud. |
nexus-challenges | sptx nexus challenges | Accesses coding challenges. |
nexus-marketplace | sptx nexus marketplace | Accesses template marketplace. |
Note: Flow Nexus primarily uses MCP tool syntax: mcp__flow-nexus__user_register({...}).
Example Usage:
nexus-login # Authenticate
cfn "Deploy distributed API swarm" # Quick swarm (shortcut)
nexus-sandbox create --template nodePerformance & Analytics
Commands for benchmarking and performance analysis.
| Alias | Command | Description |
|---|---|---|
benchmark | sptx benchmark | Runs performance benchmarks. |
analyze | sptx analyze | Analyzes system performance. |
optimize | sptx optimize | Optimizes configurations. |
metrics | sptx metrics | Shows performance metrics. |
Example Usage:
benchmark # Run full benchmark suite
metrics # View current metricsBenchmarking System
Comprehensive performance testing and analysis commands.
| Alias | Command | Description |
|---|---|---|
rf-swarm-bench | swarm-bench | Main benchmarking command. |
bench-run | swarm-bench run | Runs benchmark suite. |
bench-load | swarm-bench load-test | Performs load testing. |
bench-swe | swarm-bench swe-bench official | Runs SWE-bench evaluation. |
bench-multi | swarm-bench swe-bench multi-mode | Multi-mode SWE-bench comparison. |
bench-compare | swarm-bench compare | Compares benchmark results. |
bench-monitor | swarm-bench monitor --dashboard | Opens real-time monitoring dashboard. |
bench-diagnose | swarm-bench diagnose | Diagnoses performance issues. |
bench-analyze | swarm-bench analyze-errors | Analyzes error patterns. |
bench-optimize | swarm-bench optimize | Optimizes based on benchmarks. |
Example Usage:
bench-run # Standard benchmark
bench-load # Load testing
bench-monitor # Live dashboardHive-Mind Configuration
Commands for configuring hive-mind topology and behavior.
| Alias | Command | Description |
|---|---|---|
rf-hive-init | spt hive init | Initializes hive with default settings. |
rf-hive-monitor | spt hive monitor | Monitors hive activity in real-time. |
rf-hive-health | spt hive health | Checks hive health status. |
rf-hive-config | spt hive config set | Sets hive configuration options. |
Example Usage:
rf-hive-init # Initialize hive
rf-hive-monitor # Watch agents work
rf-hive-health # Health checkVerification & Testing
Commands for validation and testing.
| Alias | Command | Description |
|---|---|---|
rf-verify | sptx verify | Verifies system integrity. |
rf-truth | sptx truth | Runs truth validation checks. |
rf-test | sptx test | Executes test suites. |
rf-validate | sptx validate | Validates configurations. |
Example Usage:
rf-verify # System verification
rf-test # Run testsPairing & Collaboration
Commands for collaborative development.
| Alias | Command | Description |
|---|---|---|
rf-pair | sptx pair --start | Starts pairing session. |
rf-pair-stop | sptx pair --stop | Stops pairing session. |
rf-pair-status | sptx pair --status | Shows pairing status. |
Example Usage:
rf-pair # Start pair programming
rf-pair-status # Check session
rf-pair-stop # End sessionSMART Methodology
Commands for Specification, Modeling, Architecture, Refinement, Trust-Validation workflow.
| Alias | Command | Description |
|---|---|---|
smart-init | sptx smart init | Initializes SMART workflow. |
smart-plan | sptx smart plan | Creates plan for current task. |
smart-execute | sptx smart execute | Executes planned actions. |
smart-review | sptx smart review | Reviews execution results. |
Note: SMART operations primarily use agent spawn patterns.
Example Usage:
smart-init # Start SMART workflow
smart-plan # Create execution plan
smart-execute # Execute plan
smart-review # Review resultsQuick Commands (Shortcuts)
Single-letter and abbreviated aliases for common operations.
| Alias | Base Command | Description |
|---|---|---|
cfs | rf-swarm | Quick shortcut for swarm operations. |
cfh | rf-hive | Quick shortcut for hive-mind spawn. |
cfr | rf-resume | Quick shortcut for resume session. |
cfst | rf-status | Quick shortcut for status check. |
mem-stats | mem-stats | Quick shortcut for memory stats. |
mem-statsq | mem-query | Quick shortcut for memory query. |
cfa | agents-list | Quick shortcut for agent list. |
cfg | github-analyze | Quick shortcut for GitHub analysis. |
cfn | nexus-swarm | Quick shortcut for Nexus swarm. |
Example Usage:
cfs "Build REST API" # Quick swarm
mem-stats # Memory stats
cfa # List agentsMonitoring & Debugging
Commands for system monitoring and troubleshooting.
| Alias | Command | Description |
|---|---|---|
rf-monitor | claude-monitor | Opens monitoring interface. |
rf-logs | sptx logs | Views system logs. |
rf-debug | sptx debug | Enables debug mode. |
rf-trace | sptx trace | Shows execution traces. |
Example Usage:
rf-monitor # Real-time monitoring
rf-logs # View logs
rf-debug # Enable debuggingHelp & Documentation
Commands for accessing documentation and help resources.
| Alias | Command | Description |
|---|---|---|
rf-help | sptx --help | Shows help information. |
rf-docs | echo 'Visit: https://github.com/SmartPointsTech/spt/wiki' | Opens documentation wiki. |
rf-examples | echo 'Visit: https://github.com/SmartPointsTech/spt/tree/main/examples' | Opens examples repository. |
Example Usage:
rf-help # Show all commands
rf-docs # View documentation
rf-examples # See examplesSPT 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.
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.
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.
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.
rf-sandbox "node" "api-development"
rf-sandbox "python" "ml-training"rf-session [list | resume <id> | status]
Helper to manage hive-mind sessions.
rf-session list # List all sessions
rf-session resume session-12345 # Resume specific session
rf-session status # Check current statusrf-hive-topology "topology" [options]
Initializes hive with specific topology (mesh, hierarchical, ring, star).
rf-hive-topology mesh --agents 8
rf-hive-topology hierarchical --agents 12
rf-hive-topology ring --agents 6bench-quick
Runs quick benchmark comparison across multiple configurations.
bench-quickrf-load-test [agents] [tasks]
Performs load testing with specified agent and task counts.
rf-load-test 50 100 # 50 agents, 100 tasks
rf-load-test # Uses defaults: 20 agents, 200 tasksAgentic-Flow Aliases
Agentic-Flow Core Commands
Primary commands for interacting with Agentic-Flow and its context wrapper system.
| Alias | Command | Description |
|---|---|---|
af | ./af-with-context.sh | Base command. Runs any agentic-flow command with auto-loaded context. |
agentic-flow | npx agentic-flow | Direct access to agentic-flow CLI without context wrapper. |
Example Usage:
af --agent coder --task "Build REST API"
agentic-flow --list # Direct commandAgent Execution
Commands for running agents with various execution modes.
| Alias | Command | Description |
|---|---|---|
af-run | npx agentic-flow --agent | Run a specific agent (requires agent name and task). |
af-stream | npx agentic-flow --stream | Enable real-time streaming output during agent execution. |
af-parallel | npx agentic-flow | Run multi-agent swarm (uses TOPIC, DIFF, DATASET env vars). |
Example Usage:
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-parallelModel Optimization
Commands for intelligent model selection and cost optimization.
| Alias | Command | Description |
|---|---|---|
af-optimize | npx agentic-flow --optimize | Auto-select optimal model for task (balanced quality/cost). |
af-optimize-cost | npx agentic-flow --optimize --priority cost | Prioritize cheapest models (99% savings). |
af-optimize-quality | npx agentic-flow --optimize --priority quality | Prioritize highest quality models. |
af-optimize-speed | npx agentic-flow --optimize --priority speed | Prioritize fastest response models. |
af-optimize-privacy | npx agentic-flow --optimize --priority privacy | Use 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:
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.
| Alias | Command | Description |
|---|---|---|
af-openrouter | npx agentic-flow --model | Use OpenRouter models (99% cost savings). |
af-gemini | npx agentic-flow --provider gemini | Use Google Gemini models (98% cost savings). |
af-onnx | npx agentic-flow --provider onnx | Use local ONNX models (100% free). |
af-anthropic | npx agentic-flow --provider anthropic | Use 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:
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).
| Alias | Command | Description |
|---|---|---|
af-mcp-start | npx agentic-flow mcp start | Start all MCP servers (213 tools). |
af-mcp-stop | npx agentic-flow mcp stop | Stop all MCP servers. |
af-mcp-status | npx agentic-flow mcp status | Check status of MCP servers. |
af-mcp-list | npx agentic-flow mcp list | List 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:
af-mcp-start # Start all servers
afm # Quick list (shortcut)
af-mcp-status # Check statusCustom MCP Servers
Commands for adding and managing custom MCP servers (v1.2.1+).
| Alias | Command | Description |
|---|---|---|
af-mcp-add | npx agentic-flow mcp add | Add custom MCP server to configuration. |
af-mcp-remove | npx agentic-flow mcp remove | Remove MCP server from configuration. |
af-mcp-enable | npx agentic-flow mcp enable | Enable previously disabled MCP server. |
af-mcp-disable | npx agentic-flow mcp disable | Disable MCP server without removing. |
af-mcp-test | npx agentic-flow mcp test | Test MCP server configuration. |
af-mcp-export | npx agentic-flow mcp export | Export MCP configuration to file. |
af-mcp-import | npx agentic-flow mcp import | Import MCP configuration from file. |
Configuration Location: ~/.agentic-flow/mcp-config.json
Example Usage:
# 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.jsonSpecific MCP Servers
Quick commands for starting individual MCP servers.
| Alias | Command | Description |
|---|---|---|
af-mcp-claude | npx agentic-flow mcp start spt | Start SPT MCP server (101 tools). |
af-mcp-nexus | npx agentic-flow mcp start flow-nexus | Start Flow Nexus MCP server (96 tools). |
af-mcp-payments | npx agentic-flow mcp start agentic-payments | Start payment authorization server (10 tools). |
Example Usage:
af-mcp-claude # Only SPT tools
af-mcp-nexus # Only Flow Nexus toolsAgent Types (150+ Agents)
Core Development Agents
| Alias | Command | Description |
|---|---|---|
af-coder | npx agentic-flow --agent coder | Implementation specialist for clean, efficient code. |
af-reviewer | npx agentic-flow --agent reviewer | Code review and quality assurance. |
af-tester | npx agentic-flow --agent tester | Comprehensive testing with 90%+ coverage. |
af-researcher | npx agentic-flow --agent researcher | Deep research and information gathering. |
af-planner | npx agentic-flow --agent planner | Strategic planning and task decomposition. |
Specialized Development Agents
| Alias | Command | Description |
|---|---|---|
af-backend | npx agentic-flow --agent backend-dev | REST/GraphQL API development. |
af-mobile | npx agentic-flow --agent mobile-dev | React Native mobile applications. |
af-ml | npx agentic-flow --agent ml-developer | Machine learning model creation. |
af-architect | npx agentic-flow --agent system-architect | System design and architecture. |
af-cicd | npx agentic-flow --agent cicd-engineer | CI/CD pipeline creation. |
af-docs | npx agentic-flow --agent api-docs | OpenAPI/Swagger documentation. |
af-perf | npx agentic-flow --agent perf-analyzer | Performance bottleneck detection. |
Example Usage:
afc --task "Build REST API" # Shortcut for coder
af-backend --task "Create GraphQL schema"
af-ml --task "Train sentiment model"GitHub Integration Agents
| Alias | Command | Description |
|---|---|---|
af-pr | npx agentic-flow --agent pr-manager | Pull request lifecycle management. |
af-code-review | npx agentic-flow --agent code-review-swarm | Multi-agent code review coordination. |
af-issue | npx agentic-flow --agent issue-tracker | Intelligent issue management. |
af-release | npx agentic-flow --agent release-manager | Automated release coordination. |
Example Usage:
af-pr --task "Review PR #123"
af-code-review --task "Analyze security vulnerabilities"Swarm Coordinators
| Alias | Command | Description |
|---|---|---|
af-hierarchical | npx agentic-flow --agent hierarchical-coordinator | Tree-based leadership coordination. |
af-mesh | npx agentic-flow --agent mesh-coordinator | Peer-to-peer agent coordination. |
af-adaptive | npx agentic-flow --agent adaptive-coordinator | Dynamic topology switching. |
af-swarm-memory | npx agentic-flow --agent swarm-memory-manager | Cross-agent memory synchronization. |
Example Usage:
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.
| Alias | Command | Description |
|---|---|---|
af-docker-build | docker build -f deployment/Dockerfile -t agentic-flow . | Build Agentic Flow Docker image. |
af-docker-run | docker run --rm -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY agentic-flow | Run 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:
af-docker-build
af-docker-run --agent coder --task "Build API"Information & Help
Commands for accessing documentation and system information.
| Alias | Command | Description |
|---|---|---|
af-list | npx agentic-flow --list | List all 150+ available agents. |
af-help | npx agentic-flow --help | Show help information and usage. |
af-version | npx agentic-flow --version | Display Agentic Flow version. |
Example Usage:
af-list # See all agents
af-help # Get help
af-version # Check versionEnvironment Setup
Quick commands for setting API keys.
| Alias | Command | Description |
|---|---|---|
af-env-anthropic | export ANTHROPIC_API_KEY= | Set Anthropic API key. |
af-env-openrouter | export OPENROUTER_API_KEY= | Set OpenRouter API key. |
af-env-gemini | export GOOGLE_GEMINI_API_KEY= | Set Google Gemini API key. |
Example Usage:
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=xxxxxAgentic-Flow Quick Commands
Single-letter and abbreviated aliases for common operations.
| Alias | Base Command | Description |
|---|---|---|
afr | af-run | Quick shortcut for running agents. |
afs | af-stream | Quick shortcut for streaming execution. |
afo | af-optimize | Quick shortcut for optimization. |
afm | af-mcp-list | Quick shortcut for MCP tool list. |
afc | af-coder | Quick shortcut for coder agent. |
afrev | af-reviewer | Quick shortcut for reviewer agent. |
aft | af-tester | Quick shortcut for tester agent. |
Example Usage:
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.
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.
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).
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).
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.
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 savingsdeepseek/deepseek-chat-v3.1- Superior code generation, 97% savingsgoogle/gemini-2.5-flash-preview- Fastest responses, 95% savingsanthropic/claude-3.5-sonnet- Full Claude via OpenRouter
af-gemini-task "agent" "task description"
Run agent task using Google Gemini (fast, cost-effective).
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.
af-swarm "API security" "feat: add OAuth2" "response_times.csv"
# Spawns: researcher + code-reviewer + data-analystaf-add-mcp "name" "command"
Add custom MCP server to configuration.
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.
af-benchmark "Generate API documentation"
af-benchmark "Analyze code performance"Cost Optimization Examples
Scenario 1: Without Optimization (Always Claude Sonnet 4.5)
# 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)
# 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)
# 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)
# 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
# Run the setup script (installs both SPT and Agentic-Flow)
./setup.sh
# Activate aliases
source ~/.bashrc2. Set API Keys
# 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=xxxxx3. Initialize SPT
rf-init # Initialize SPT environment4. Start MCP Servers (Optional)
af-mcp-start # Starts all 213 tools
# or
rf-mcp-start # Same servers, SPT command5. Run Your First Agents
SPT (Swarm Coordination):
# Simple swarm
cfs "Build REST API with authentication"
# Complex hive-mind
rf-wizard
rf-spawn "Build enterprise microservices system"Agentic-Flow (Cost-Optimized Agents):
# 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
# Add weather data
af-mcp-add weather 'npx @modelcontextprotocol/server-weather'
# Add GitHub integration
af-mcp-add github --npm @modelcontextprotocol/server-githubDeployment Comparison
| Feature | SPT | Agentic-Flow |
|---|---|---|
| Primary Use | Multi-agent swarm coordination | Cost-optimized single agents |
| MCP Tools | 213 (all servers) | 213 (all servers) |
| Model Options | Claude only | Claude, 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 For | Complex multi-agent tasks | Cost-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
# 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
# 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
# SPT for coordination
rf-wizard
rf-hive-topology mesh --agents 12
rf-spawn "Build distributed microservices platform"
# Monitor progress
rf-hive-monitor
cfst # Check statusWorkflow 4: Rapid Prototyping
# 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
# List all available agents
af-list # Agentic-Flow agents
cfa # SPT agentsProblem: MCP Tools Not Working
# Check MCP server status
af-mcp-status # or rf-mcp-status
# Restart MCP servers
af-mcp-stop
af-mcp-startProblem: High API Costs
# 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
# 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
# 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
# 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.shInstallation Script Summary
The setup script (setup.sh) automatically installs:
- ✅ Claude Code CLI
- ✅ Claude Monitor (usage tracking)
- ✅ SPT Orchestrator
- ✅ Agentic-Flow (latest)
- ✅ Context wrapper scripts (spt-with-context.sh, af-with-context.sh)
- ✅ All aliases (appended to ~/.bashrc)
- ✅ Claude subagents
- ✅ Playwright for testing
- ✅ TypeScript configuration
After installation:
source ~/.bashrc # Activate all aliases
rf-init # Initialize SPT
af-mcp-start # Start MCP serversAdditional Resources
SPT
- Documentation: https://github.com/SmartPointsTech/spt/wiki
- Examples: https://github.com/SmartPointsTech/spt/tree/main/examples
- GitHub: https://github.com/SmartPointsTech/spt
Agentic-Flow
- GitHub: https://github.com/SmartPointsTech/agentic-flow
- npm Package: https://npmjs.com/package/agentic-flow
- Model Benchmarks:
docs/agentic-flow/benchmarks/ - Integration Guides:
docs/guides/
MCP Protocol
- Official Docs: https://modelcontextprotocol.io
- Anthropic MCP: https://docs.anthropic.com/en/docs/agents-and-tools/mcp
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:
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.