Examples
nxus.SYSTEMS · Examples Portfolio · nxusKit SDK
32 production examples for the nxusKit SDK in Rust, Go, and Python, plus selected CLI/Bash implementations for shell-first orchestration — covering LLM patterns, CLIPS rule engines, Z3 constraint solvers, Bayesian networks, and ZEN decision tables.
Quick Start
Section titled “Quick Start”# 1. Install the SDK (see nxusKit Getting Started guide)# 2. Set up this projectsource ~/.nxuskit/sdk/current/scripts/setup-sdk.sh # Go, env vars, library paths./scripts/setup-sdk-symlink.sh # Rust Cargo paths override
# 3. Run an examplecargo run --manifest-path examples/patterns/basic-chat/rust/Cargo.toml # Rustgo run -tags nxuskit ./examples/patterns/basic-chat/go # Gopython examples/patterns/basic-chat/python/main.py # PythonExamples
Section titled “Examples”Patterns — Reusable SDK integration patterns
Section titled “Patterns — Reusable SDK integration patterns”| Example | Description | Languages |
|---|---|---|
| basic-chat | Basic chat completion with a simple prompt | Rust, Go, Python |
| streaming | Streaming chat completion with real-time output | Rust, Go, Python |
| multi-provider | Using multiple providers in one application | Rust, Go, Python, CLI/Bash |
| convenience-api | LiteLLM-style convenience API usage | Rust, Go |
| blocking-api | Synchronous blocking API for simpler use cases | Rust, Go |
| capability-detection | Detecting provider capabilities at runtime | Rust, Go, CLI/Bash |
| cost-routing | Cost-aware provider routing and selection | Rust, Go, Python, CLI/Bash |
| polymorphic | Polymorphic provider patterns with trait objects | Rust, Go |
| retry-fallback | Retry and fallback strategies across providers | Rust, Go, Python, CLI/Bash |
| structured-output | JSON mode and structured output generation | Rust, Go, Python, CLI/Bash |
| timeout-config | Timeout configuration and connection management | Rust, Go, Python |
| token-budget | Token budget management and cost estimation | Rust, Go, Python |
| vision | Vision and multimodal capabilities with images | Rust, Go, Python |
| auth-helper | OAuth login flow and credential management helper | Rust, Go |
↳ status | List provider authentication status and stored credentials | |
↳ set | Store an API key for a specific provider | |
↳ remove | Remove a stored API key for a provider | |
↳ dashboard | Open provider credential dashboard in browser | |
| solver | Z3 constraint solver integration via nxusKit SDK | Rust, Go, Python, CLI/Bash |
↳ theme-park | Budget and space planning for a theme park with rides, food courts, and entertainment zones | |
↳ space-colony | Resource allocation for a space colony dealing with solar storm what-if scenarios | |
↳ fantasy-draft | Fantasy sports draft optimization under salary cap with injury what-if analysis | |
| bayesian-inference | Bayesian network inference via nxusKit SDK | Rust, Go, Python, CLI/Bash |
↳ haunted-house | Investigate a haunted house — is it a ghost or a raccoon? | |
↳ coffee-shop | Diagnose bad espresso from grind size, temperature, and bean age | |
↳ plant-doctor | Diagnose a sick plant from overwatering, nutrient, and disease evidence | |
| solver-what-if | What-if scenario analysis with solver scoping | Rust, Go, Python |
↳ wedding | Wedding budget planning with $25k constraint and vendor what-if scenarios | |
↳ mars | Mars colony resource allocation with dust storm what-if disruptions | |
↳ recipe | Recipe scaling with vegan substitution — may be UNSAT |
Integrations — Combining SDK features
Section titled “Integrations — Combining SDK features”| Example | Description | Languages |
|---|---|---|
| ollama | Using Ollama for local inference | Rust, Go, Python |
| lmstudio | Using LM Studio for local inference | Rust, Go |
| alert-triage | Alert triage with LLM-powered analysis | Rust, Go, CLI/Bash |
| cli-assistant | Interactive CLI assistant with LLM backend | Rust, Go |
| clips-basics | CLIPS rule engine basics via nxusKit SDK | Rust, Go, CLI/Bash |
| clips-llm-hybrid | Hybrid CLIPS rules + LLM reasoning | Rust, Go, Python, CLI/Bash |
| bn-solver-clips-pipeline | Three-stage BN prediction → Solver optimization → CLIPS safety pipeline | Rust, Go, CLI/Bash |
↳ festival | Music festival staging — crowd predictions drive band scheduling and safety | |
↳ rescue | Search and rescue — survivor probability drives team assignment and safety checks | |
↳ bakery | Bakery scheduling — demand forecasts drive oven allocation and allergen separation | |
| llm-solver-hybrid | Hybrid LLM + Z3 solver problem solving | Rust, Go, Python, CLI/Bash |
↳ seating | Wedding dinner seating — 12 guests across 3 tables with constraints | |
↳ dungeon | Dungeon layout — 5 rooms with boss and treasure placement rules | |
↳ road-trip | Road trip planning — 14 days across 5 national parks with preferences | |
| bn-structure-learning | Bayesian network structure learning from data | Rust, Go, Python |
↳ golf | Golf course conditions — weather, soil, and maintenance factor learning | |
↳ bmx | BMX performance — skill level, technique, and jump factor learning | |
↳ sourdough | Sourdough baking — feeding schedule, flour type, and temperature factor learning | |
| zen-decisions | ZEN decision table evaluation via nxusKit SDK | Rust, Go, Python, CLI/Bash |
↳ maze-rat | First Hit Policy — route a maze runner through personality-driven decisions | |
↳ potion | Collect Hit Policy — match ingredient lists against brewing recipes | |
↳ food-truck | Expression Nodes — compute dynamic pricing with conditional logic |
Apps — Complete applications
Section titled “Apps — Complete applications”| Example | Description | Languages |
|---|---|---|
| puzzler | Multi-approach puzzle solver comparing CLIPS, LLM, and hybrid strategies | Rust, Go |
↳ sudoku | Solve Sudoku puzzles using CLIPS constraint propagation | |
↳ set-game | Find valid SET card combinations using CLIPS pattern matching | |
↳ compare | Side-by-side comparison of CLIPS, LLM, and hybrid solvers | |
| racer | CLIPS vs LLM head-to-head benchmarking tool | Rust, Go |
↳ race | Head-to-head CLIPS vs LLM race on a single problem | |
↳ benchmark | Statistical benchmarking with multiple runs and timing | |
↳ list | List all available problems with difficulty ratings | |
↳ describe | Show detailed description of a specific problem | |
| riffer | Music sequence analysis and transformation tool (still learning to shred) | Rust, Go |
↳ analyze | Analyze a music sequence for key, intervals, and rhythm patterns | |
↳ score | Score a sequence on six musical dimensions | |
↳ transform | Transform a sequence — transpose, invert, or retrograde | |
↳ convert | Convert between MIDI and MusicXML formats | |
| ruler | LLM-powered CLIPS rule generator with automatic validation | Rust, Go, CLI/Bash |
↳ generate | Generate CLIPS rules from natural language descriptions | |
↳ validate | Validate CLIPS rule syntax and semantic correctness | |
↳ save | Save generated rules to a file for later use | |
↳ load | Load previously saved rules from a file | |
↳ examples | Run progressive complexity examples demonstrating rule generation | |
| arbiter | CLIPS-validated LLM retry app with rule-based answer verification | Rust, Go, CLI/Bash |
↳ classification | Categorize input text into specified categories | |
↳ extraction | Extract structured information from unstructured text | |
↳ reasoning | Perform logical inference and multi-step reasoning |
SDK Editions
Section titled “SDK Editions”| Badge | Meaning |
|---|---|
| Community | Runs with the free OSS SDK |
| Pro | Requires a Pro license (activation guide) |
See conformance/example-tiers.json for the full tier map.
Project Structure
Section titled “Project Structure”examples/├── patterns/ Community-tier reusable patterns├── integrations/ SDK feature combinations├── apps/ Complete applications (mostly Pro tier)└── shared/ Shared libraries (Rust, Go, interactive utilities)conformance/ Example manifest and tier definitionsscripts/ Build and test helpersBuilding
Section titled “Building”All examples require the nxusKit SDK. Run these once after cloning:
# Set up Go workspace, env vars, and native library pathssource ~/.nxuskit/sdk/current/scripts/setup-sdk.sh
# Set up Rust Cargo paths override (generates .cargo/config.toml)./scripts/setup-sdk-symlink.shThe first script creates Go workspace files and exports environment variables. The second generates a .cargo/config.toml that tells Cargo where to find the installed Rust SDK (the generated file is .gitignored — each developer runs this once).
cargo run --manifest-path examples/<category>/<name>/rust/Cargo.tomlgo run -tags nxuskit ./examples/<category>/<name>/go/cmdPython
Section titled “Python”python examples/<category>/<name>/python/main.pyBuilt with gratitude for the open-source projects that make nxusKit possible. See ACKNOWLEDGEMENTS.md for a curated list of key projects.
License
Section titled “License”nxusKit Examples is dual-licensed under MIT and Apache 2.0. See LICENSE-MIT and LICENSE-APACHE.
Copyright 2025-2026 nxus.SYSTEMS LLC.