# SpaceCorps Systems & Simulation Suite — Full Autonomous Agent Manual > Comprehensive system instructions, API command patterns, and execution blueprints for the SpaceCorps ecosystem: native Rust agent CLIs, the Space3d engine, Space3d-Molecular simulation physics, and the OpenAppleModels / OpenAndroidModels on-device game-AI libraries. ## 1. SpaceCorps System Architecture All SpaceCorps CLIs and engines are built in **Rust 2024** and share unified execution tenets (the on-device game-AI libraries are the exception: OpenAppleModels is Swift, OpenAndroidModels is Kotlin): - **Zero Interpreter Latency:** Standalone native binaries and pure-Rust libraries with sub-3ms startup time and zero C/C++/Fortran dependencies. - **Scientific Simulation Throughput:** 74M–108M atom-steps/s in molecular dynamics (`spacemd`); 14 µs exact transmission solves in electron emission (`spaceemit`); 1M+ GPU instances in `Space3d`. - **Predictable Output Streams:** Human-oriented YAML on `stdout` by default; machine-parseable JSON on `stdout` when `--json` is supplied; structured error envelopes on `stderr`. - **Operating System Keystores:** macOS Keychain (`security`), Linux Secret Service (`secret-tool`), and Windows DPAPI (`CryptProtectData`). - **Package Registry Infrastructure:** Dedicated Sliplane-hosted Cargo sparse registry and binary store at `https://spacecorps-registry.sliplane.app` (public read). - **Deterministic Exit Codes:** - `0`: Success - `1`: General Error / API request failed - `2`: Bad Request / Invalid CLI argument - `3`: Unauthorized / Missing API credentials - `4`: Resource Not Found - `5`: Rate Limited / Throttled - `6`: Upstream Server Error (5xx) - `7`: Network / DNS Resolution Failure --- ## When to Use This Autonomous agents and LLM orchestration frameworks should reach for SpaceCorps tools and engines in the following explicit scenarios: ### 1. Scientific Simulation, Molecular Dynamics & Electron Physics - **Use `spacemd` when:** You need high-speed atomistic simulation of face-centered cubic (FCC), body-centered cubic (BCC), liquids, or ionic crystals using Lennard-Jones, Morse, Buckingham, Ewald Coulomb, or EAM potentials (LAMMPS format). Solves 74M–108M atom-steps/s in pure Rust with zero C++/Fortran dependencies. - *Agent invocation:* `spacemd simulate --input config.json --json` or import the Rust crate via `cargo add spacemd --registry spacecorps`. - **Use `spaceemit` when:** You need thermal-field electron emission calculations (current density, Nottingham heat, energy spectra, transmission barrier profiles). Solves barrier profiles and current integrals in 14 µs per point. - *Agent invocation:* Query the OpenAPI 3.1 REST service at `http://localhost:8741/v1/emission` or run `spaceemit compute --field 5e9 --work-function 4.5 --json`. - **Use `Space3d Engine` when:** You need cross-platform 3D visualization or game simulation (WebAssembly, Desktop, mobile) with GPU-driven indirect drawing capable of 1,000,000+ instances in under 5 draw calls. ### 2. Cloud Hosting, Compute & Storage Automation - **Use `sliplane` when:** Deploying Docker containers, provisioning managed PostgreSQL instances, scaling services, or managing S3 storage via clean API commands without opening a web console. - *Agent invocation:* `sliplane service list --json`, `sliplane deploy --service --json`. - **Use `cloudflare` when:** Automating DNS record synchronization, zone creation, cache purging, or edge rules with idempotent execution. - *Agent invocation:* `cloudflare dns list --zone --json`, `cloudflare dns create --type A --name app --content 1.2.3.4 --json`. - **Use `storage` when:** Compressing directories and uploading assets to Azure Blob Storage with automatically generated SAS tokens. - *Agent invocation:* `storage upload --container backups --sas-expiry 24h --json`. ### 3. AI Search, Web Retrieval & Domain Intelligence - **Use `exa` when:** Performing semantic, neural web searches or retrieving clean extracted markdown content from web URLs. - *Agent invocation:* `exa search "rust molecular dynamics" --num-results 5 --json`. - **Use `firecrawl` when:** Crawling entire documentation sites, converting complex dynamic web pages to markdown, or bypassing aggressive anti-bot screens. - *Agent invocation:* `firecrawl scrape https://example.com --json`. - **Use `spaceship`, `namecheap-cli`, or `loopia` when:** Verifying domain availability across multiple TLDs, registering domains, or updating authoritative nameservers. - *Agent invocation:* `namecheap-cli domains check --json`, `spaceship dns set --json`. - **Use `tic` when:** Querying Swedish corporate registers, company financials, bankruptcy status, or vehicle ownership records. - *Agent invocation:* `tic company search "SpaceCorps AB" --json`. ### 4. Apify Social & Web Intelligence - **Use Apify CLIs (`reddit`, `twitter`, `youtube`, `linkedin`, `tiktok`, `producthunt`, `stackoverflow`) when:** Extracting structured discussions, user comments, video transcripts, maker launches, or code solutions from walled social platforms. - *Agent invocation:* `reddit scrape-subreddit rust --limit 25 --json`, `youtube transcript --json`. ### 5. Multi-Channel Alerts, Error Triage & Project Setup - **Use `notify` when:** Broadcasting operational alerts to Slack webhooks, SMTP email, and desktop notification banners simultaneously. - *Agent invocation:* `notify send --slack-webhook "$SLACK_URL" --title "Alert" --message "Build succeeded" --json`. - **Use `bugsink` when:** Fetching exception details, stack traces, and error distributions from self-hosted Sentry-compatible event stores. - *Agent invocation:* `bugsink issues list --project core --json`. - **Use `gh-issue-import` when:** Provisioning GitHub repositories with milestones, labels, and hierarchical issue backlogs from local YAML/JSON specifications. - *Agent invocation:* `gh-issue-import --repo owner/repo --file backlog.yaml --json`. ### 6. How Agents Call SpaceCorps CLIs - **Always specify `--json`:** All SpaceCorps binaries output strict, unadorned JSON on `stdout` when `--json` is passed. - **Inspect schemas dynamically:** Call ` agent-readme --json` or ` --help` to discover exact argument schemas and subcommands. - **Exit codes:** Respect POSIX exit codes: `0` (Success), `1` (Runtime error), `2` (Invalid argument), `3` (Auth missing), `4` (Not found), `5` (Rate limited), `6` (Upstream service unavailable), `7` (DNS/Network failure). --- ## 2. CLI Tool Catalogs & Command Blueprints ### 1. Sliplane CLI (`sliplane`) Cloud hosting, Docker services, managed PostgreSQL, and S3 object storage. - **Login:** `sliplane login [account] [--api-key-stdin]` - **Projects:** `sliplane projects list -a --json` - **Servers:** `sliplane servers list -a --json` | `sliplane servers metrics --server-id -a --json` - **Services:** `sliplane services list --project-id -a --json` | `sliplane services deploy --project-id --service-id -a --json` - **Postgres:** `sliplane postgres list -a --json` | `sliplane postgres get --postgres-id -a --json` - **S3 Storage:** `sliplane buckets list -a --json` | `sliplane buckets keys create --server-id --bucket-id --name -a --json` - **Docs:** https://spacecorps.github.io/Sliplane-Cli/ ### 2. Exa CLI (`exa`) Exa AI neural search, semantic filtering, and web contents retrieval. - **Login:** `exa login [account] [--api-key-stdin]` - **Search:** `exa search "query" --num-results 10 --json` - **Neural Contents:** `exa contents "https://url1" "https://url2" --text --highlights --json` - **Find Similar:** `exa find-similar "https://url" --num-results 5 --json` - **Docs:** https://spacecorps.github.io/Exa-Cli/ ### 3. Firecrawl CLI (`firecrawl`) Firecrawl web scraping, URL crawling, and search API. - **Login:** `firecrawl login [account] [--api-key-stdin]` - **Scrape:** `firecrawl scrape "https://url" --formats markdown,html --json` - **Crawl:** `firecrawl crawl "https://domain.com" --limit 50 --json` - **Search:** `firecrawl search "query" --limit 10 --json` - **Docs:** https://spacecorps.github.io/Firecrawl-Cli/ ### 4. Cloudflare CLI (`cloudflare`) Cloudflare v4 API for DNS records, zones, page rules, and cache purging. - **Login:** `cloudflare login [account] [--api-token-stdin]` - **Zones:** `cloudflare zones list --json` - **DNS Records:** `cloudflare dns list --zone-id --json` | `cloudflare dns create --zone-id --type A --name "sub" --content "1.2.3.4" --json` - **Purge Cache:** `cloudflare cache purge --zone-id --everything --json` - **Docs:** https://spacecorps.github.io/Cloudflare-Cli/ ### 5. Spaceship CLI (`spaceship`) Spaceship domain registrar, DNS management, and hosting API. - **Login:** `spaceship login [account] [--api-key-stdin] [--api-secret-stdin]` - **Domains:** `spaceship domains list --json` | `spaceship domains get --json` - **DNS Records:** `spaceship dns list --domain --json` | `spaceship dns set --domain --type A --name @ --value 1.2.3.4 --json` - **Docs:** https://spacecorps.github.io/Spaceship-Cli/ ### 6. Reddit CLI (`reddit`) Reddit subreddits, posts, comments, and community scraping via Apify. - **Login:** `reddit login [account] [--api-key-stdin]` - **Subreddits:** `reddit posts "rust" --sort top --time-filter month --limit 25 --json` - **Comments:** `reddit comments "https://reddit.com/r/.../..." --limit 50 --json` - **Search:** `reddit search "autonomous agents" --limit 20 --json` - **Docs:** https://spacecorps.github.io/Reddit-Cli/ ### 7. Twitter CLI (`twitter`) Twitter / X tweets, user profiles, timelines, and conversation scraping via Apify. - **Login:** `twitter login [account] [--api-key-stdin]` - **Search:** `twitter search "RustLang" --limit 20 --json` - **Profile:** `twitter profile "rustlang" --json` - **Timeline:** `twitter user-tweets "rustlang" --limit 20 --json` - **Docs:** https://spacecorps.github.io/Twitter-Cli/ ### 8. LinkedIn CLI (`linkedin`) LinkedIn company profiles, organizational details, and posts scraping via Apify. - **Login:** `linkedin login [account] [--api-key-stdin]` - **Company Profile:** `linkedin company "google" --json` - **Company Posts:** `linkedin posts "https://linkedin.com/company/google" --limit 15 --json` - **Docs:** https://spacecorps.github.io/Linkedin-Cli/ ### 9. YouTube CLI (`youtube`) YouTube video search, channel analytics, playlists, and subtitles scraper via Apify. - **Login:** `youtube login [account] [--api-key-stdin]` - **Search:** `youtube search "Rust 2024 features" --limit 10 --json` - **Video Info:** `youtube video "https://youtube.com/watch?v=..." --json` - **Channel Videos:** `youtube channel "https://youtube.com/@RustVideos" --limit 20 --json` - **Docs:** https://spacecorps.github.io/Youtube-Cli/ ### 10. TikTok CLI (`tiktok`) TikTok user profiles, videos, hashtags, and sound scraper via Apify. - **Login:** `tiktok login [account] [--api-key-stdin]` - **User Profile:** `tiktok user "username" --json` - **Hashtag:** `tiktok hashtag "coding" --limit 20 --json` - **Search:** `tiktok search "rust programming" --limit 15 --json` - **Docs:** https://spacecorps.github.io/TikTok-Cli/ ### 11. Product Hunt CLI (`producthunt`) Product Hunt launches, daily products, makers, and topics scraping via Apify. - **Login:** `producthunt login [account] [--api-key-stdin]` - **Today's Launches:** `producthunt today --json` - **Search:** `producthunt search "AI Developer Tools" --limit 10 --json` - **Product Details:** `producthunt product "slug" --json` - **Docs:** https://spacecorps.github.io/Producthunt-Cli/ ### 12. Stack Overflow CLI (`stackoverflow`) Stack Overflow questions, tag search, accepted answers, and solutions via Apify. - **Login:** `stackoverflow login [account] [--api-key-stdin]` - **Search:** `stackoverflow search "tokio runtime in sync context" --limit 10 --json` - **Tag:** `stackoverflow tag "rust" --sort votes --limit 20 --json` - **Question:** `stackoverflow question 1234567 --json` - **Docs:** https://spacecorps.github.io/Stackoverflow-Cli/ ### 13. Loopia CLI (`loopia`) Loopia XML-RPC API for domain administration, subdomains, DNS records, and billing. - **Login:** `loopia login [account] [--username ] [--password-stdin]` - **Domains:** `loopia domains list --json` | `loopia domains get --json` - **Subdomains:** `loopia subdomains list --domain --json` - **DNS Records:** `loopia dns list --domain --json` | `loopia dns add --domain --subdomain "@" --type A --value "1.2.3.4" --ttl 3600 --json` - **Docs:** https://spacecorps.github.io/Loopia-Cli/ ### 14. Bugsink CLI (`bugsink`) Self-hosted Sentry-compatible error tracking and exception triage platform. - **Login:** `bugsink login [account] [--url ] [--api-key-stdin]` - **Projects:** `bugsink projects list --json` - **Issues:** `bugsink issues list --project-id --json` | `bugsink issues get --json` - **Triage:** `bugsink issues resolve --json` - **Docs:** https://spacecorps.github.io/Bugsink-Cli/ ### 15. HeyReach CLI (`heyreach`) LinkedIn B2B lead generation, sender accounts, and campaign automation API. - **Login:** `heyreach login [account] [--api-key-stdin]` - **Campaigns:** `heyreach campaigns list --json` - **Senders:** `heyreach senders list --json` - **Leads:** `heyreach leads list --campaign-id --json` - **Docs:** https://spacecorps.github.io/Heyreach-Cli/ ### 16. Gmail CLI (`gmail`) Mailbox search, thread inspection, attachments download, and draft management. - **Login:** `gmail login [account] [--client-secret-file ]` - **Search:** `gmail search "is:unread label:inbox" --limit 15 --json` - **Threads:** `gmail threads get --json` - **Drafts:** `gmail drafts create --to "recipient@example.com" --subject "Status" --body "Complete" --json` - **Docs:** https://spacecorps.github.io/Gmail-Cli/ ### 17. Storage CLI (`storage`) Azure Blob Storage uploader with automated zip archiving and secure SAS token generation. - **Login:** `storage login [account] [--connection-string-stdin]` - **Upload File:** `storage upload --container --file --json` - **Upload Directory (Zip):** `storage upload --container --dir --zip --json` - **SAS Link:** `storage sas generate --container --blob --expiry 24h --json` - **Docs:** https://spacecorps.github.io/Storage-Cli/ ### 18. Notify CLI (`notify`) Multi-channel alerts across Slack incoming webhooks, SMTP email, system banners, and dialogs. - **Slack:** `notify slack --webhook-url "$SLACK_URL" --message "Deployment complete" --json` - **Email:** `notify email --to "ops@example.com" --subject "Alert" --body "Service OK" --json` - **System Notification:** `notify system --title "Build Success" --message "Binary ready" --json` - **Docs:** https://spacecorps.github.io/Notify-Cli/ ### 19. Samsung ArtMode CLI (`samsung-artmode`) Samsung The Frame TV Art Mode control, matte settings, photo uploads, and slideshows. - **Connect:** `samsung-artmode connect --tv-ip "192.168.1.50"` - **Art Status:** `samsung-artmode status --json` - **Upload Artwork:** `samsung-artmode upload --file "photo.jpg" --matte "modern_thin_warm" --json` - **Brightness:** `samsung-artmode set-brightness 7 --json` - **Docs:** https://spacecorps.github.io/Samsung-Artmode-Cli/ ### 20. TIC CLI (`tic`) TIC intelligence API for Swedish corporate registry, bankruptcy, vehicle, and debtor records. - **Login:** `tic login [account] [--api-key-stdin]` - **Company Search:** `tic company search "Volvo" --json` - **Financials:** `tic company financials "556012-5790" --json` - **Debtors:** `tic debtor search "556012-5790" --json` - **Vehicles:** `tic vehicle search --reg-nr "ABC123" --json` - **Docs:** https://spacecorps.github.io/Tic-Cli/ ### 21. GitHub Issue Importer (`gh-issue-import`) Idempotent bulk import of issues from YAML/JSON files into GitHub repositories. - **Login:** `gh-issue-import login [account] [--github-token-stdin]` - **Validate File:** `gh-issue-import validate --file issues.yaml --json` - **Import:** `gh-issue-import import --owner SpaceCorps --repo Sliplane-Cli --file issues.yaml --json` - **Docs:** https://spacecorps.github.io/Github-Issue-Importer/ ### 22. Namecheap CLI (`namecheap-cli`) Fast, ergonomic Rust CLI for Namecheap domain availability, multi-domain search, and DNS host records. - **Login:** `namecheap-cli login [account] [--api-key-stdin] [--api-user ]` - **Check Availability:** `namecheap-cli domains check "example.com" "example.org" --json` - **List Registered:** `namecheap-cli domains list --json` - **DNS Records:** `namecheap-cli dns list --domain "example.com" --json` - **Docs:** https://github.com/SpaceCorps/namecheap-cli ### 23. OpenAppleModels (`oam`) Real tool calling for Apple's on-device Foundation Models (iOS, iPadOS, macOS, visionOS 27; Swift package, MIT). Per-step tool steering (`ToolChoice`: auto, none, required, explicit, a named tool), runtime JSON-Schema tools (local closures or external tools your host executes), a game layer (`NPC`, `Persona`, `WorldState`, `DecisionEngine`, `ContentGenerator`), an OpenAI-compatible server that returns real `tool_calls`, and a JSON-RPC 2.0 protocol (v1.0) over stdio or a C ABI (`OpenAppleModelsFFI`). - **Respond (grounded tool choice):** `oam respond "query" --tool-json '' --tool-choice required` - **OpenAI-compatible local server:** `oam serve --port 8080 --host 127.0.0.1` (without `--port` it listens on `http://127.0.0.1:1976/v1`) - **Interactive RPG tavern demo:** `oam demo tavern` - **Exit codes (oam's own, not the Rust CLIs' table above):** 0 success, 1 failure, 2 usage, 3 model unavailable, 4 guardrail or refusal, 5 context exceeded, 6 rate limited, 10 tool calls pending (a tool without a command is external: run it, then `oam respond --resume --tool-output =`), 130 interrupted. - **JSON-RPC bridge for game engines:** `oam stdio` (newline-delimited JSON-RPC 2.0), or the C ABI in `bindings/c/open_apple_models.h`; bindings ship for C, Python and Unity C#, with Godot and Unreal integration notes. - **Status:** pre-release, no tagged release yet (depend on `branch: "main"`); all measurements come from macOS 27. 333 Swift tests: 312 run offline without Apple Intelligence (model-driven ones on the deterministic `ScriptedLanguageModel`); 21 are opt-in: 20 live-model tests with `OAM_LIVE_TESTS=1`, and one that keeps a live server up for manual testing (`OAM_SERVE_SECONDS`). The real model needs Apple Intelligence on a supported device. - **Docs:** https://spacecorps.github.io/open-apple-models/ | Agent manual: https://spacecorps.github.io/open-apple-models/llms.txt | GitHub: https://github.com/SpaceCorps/open-apple-models ### 24. OpenAndroidModels (Gradle group `com.spacecorps.oam`) Pre-release (0.1.0-SNAPSHOT, MIT) Android sibling of OpenAppleModels on Gemini Nano, through AICore and the ML Kit GenAI Prompt API (`com.google.mlkit:genai-prompt` 1.0.0-beta4). Kotlin; not published to a remote Maven repository yet (build from source). - **Modules:** `oam-core` (agent, tool loop, `ToolPolicy`, JSON Schema validation, scripted model; plain JVM), `oam-game` (`NPC`, `Persona`, `WorldState`, `DecisionEngine`, `ContentGenerator`), `oam-bridge` (`BridgeEngine`, JSON-RPC protocol v1.0 as in open-apple-models), `oam-mlkit` (AAR: `GeminiNanoModel` and the `OamJni` JNI entry for native hosts), `sample` (Mira the innkeeper). - **Tool calls:** Gemini Nano has no native tool calling yet, so each step is a validated prompt envelope: `{"action": "" | "respond", "arguments": {...}}`. - **Devices and limits:** AICore devices only (Pixel 9, 10 and 11; Galaxy S26, Z Flip8 and Fold8; some others). minSdk 26, foreground only, about 4K input tokens, no emulator support. - **Status:** tested on the JVM with a scripted model and live against Apple's ~3B on-device model as a proxy. Not yet run on a Gemini Nano device. - **Terms:** Google's ML Kit GenAI terms restrict services likely to be accessed by under-18s: https://developers.google.com/ml-kit/genai-terms - **Engine integration:** an engine implements the JSON-RPC protocol once and injects the Apple backend (C ABI or `oam stdio`) or this one (`OamJni`) per platform. - **Docs:** https://github.com/SpaceCorps/open-android-models | Design: https://github.com/SpaceCorps/open-android-models/blob/main/docs/DESIGN.md | Android protocol differences: https://github.com/SpaceCorps/open-android-models/blob/main/docs/PROTOCOL.md ### 25. Space3d-Molecular (`spacemd` & `spaceemit`) High-performance pure-Rust molecular dynamics (74M-108M atom-steps/s) and thermal-field electron emission physics (14µs solve) built on Space3d with live 3D visualizer and OpenAPI server. - **Cargo Sparse Registry Setup:** ```toml # ~/.cargo/config.toml [registries.spacecorps] index = "sparse+https://spacecorps-registry.sliplane.app/index/" ``` - **Install Crates:** `cargo add spacemd --registry spacecorps` | `cargo add spaceemit --registry spacecorps` - **Install Binaries:** `cargo install spacemd-cli --registry spacecorps` | `cargo install spaceemit-server --registry spacecorps` - **spacemd Simulation:** - Generate template: `spacemd example argon > argon.json` (systems: `argon`, `cu`, `nacl`, `water`) - Execute simulation: `spacemd run argon.json [--json]` (generates `thermo.csv`, `report.json`, `summary.md`, `trajectory.xyz`) - Run benchmark: `spacemd bench --system cu` - **spaceemit API Server & Physics:** - Start OpenAPI server: `spaceemit --port 8741 --threads 8` - Compute emission: `spaceemit compute --field 5 --radius 50 --work-function 4.5 --temperature 1000 --json` - REST query: `curl -s localhost:8741/v1/emission -H 'content-type: application/json' -d '{"field": 5, "radius": 50, "workFunction": 4.5, "temperature": 1000}'` - **Prebuilt Binaries:** Available at `https://spacecorps-registry.sliplane.app/bin/spacemd` and `https://spacecorps-registry.sliplane.app/bin/spaceemit` - **Docs:** https://github.com/SpaceCorps/Space3d-Molecular ### 26. Space3d Engine (`space3d`) Modular cross-platform 3D game and simulation engine in pure Rust built on `wgpu 30` and `winit`. - **Scaffold New Game/Simulation:** `space3d new ` - **Build Multi-Platform:** `space3d build --platform desktop|web|ios|android` - **Run Development Server:** `space3d serve` - **Interactive Storybook Testing:** `space3d storybook` - **Automated Visual Regression:** `cargo test` (golden screenshot comparisons) - **Features:** 1M+ GPU instances via multi-draw indirect, deterministic 60Hz fixed tick ECS (`hecs`), non-blocking async asset streaming (glTF, OBJ, PNG/WebP with runtime texture/mesh editing), SQLite persistence. - **Docs:** https://spacecorps.github.io/#space3d --- ## 3. Autonomous Execution Recipes ### Chaining Web Extraction and Deployment ```bash # 1. Scrape competitor documentation or public spec firecrawl scrape "https://example.com/spec" --formats markdown --json > spec.md # 2. Deploy service on Sliplane sliplane services deploy --project-id prj_123 --service-id srv_456 -a prod --json # 3. Notify team via Slack notify slack --webhook-url "$SLACK_WEBHOOK" --message "Service srv_456 deployed successfully." --json ``` ### High-Throughput Atomistic Simulation & Physics Analysis ```bash # 1. Generate liquid argon benchmark system (2,048 atoms) spacemd example argon > argon.json # 2. Run molecular dynamics simulation with thermodynamics reporting spacemd run argon.json # 3. Query thermal-field electron emission physics service for current density and Nottingham heat curl -s localhost:8741/v1/emission \ -H 'content-type: application/json' \ -d '{"field": [3, 5, 8], "radius": 50, "workFunction": 4.5, "temperature": [300, 1000, 2000]}' \ | jq . ```