nxusKit Examples
Examples Docs · SDK Docs · nxusKit SDK · Examples Portfolio · Field Notes · Website
34 production-quality 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.
A Word About CLIPS
Section titled “A Word About CLIPS”During its development at NASA from 1985 to 1996, the primary CLIPS contributors were: Robert Savely, who conceived and championed the project; Chris Culbert, who managed the project; Gary Riley and Brian Dantes, who were the lead developers; and Frank Lopez, who developed the first version. Since leaving NASA in 1996, Gary Riley has maintained CLIPS as public domain software.
Quick Start
Section titled “Quick Start”# 1. Install the SDK (see https://docs.nxus.systems/nxuskit/getting-started/installation/)# 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 | Edition | Description | Languages |
|---|---|---|---|
| basic-chat | Community | Basic chat completion with a simple prompt | Rust, Go, Python |
| streaming | Community | Streaming chat completion with real-time output | Rust, Go, Python |
| multi-provider | Community | Using multiple providers in one application | Rust, Go, Python, CLI/Bash |
| convenience-api | Community | LiteLLM-style convenience API usage | Rust, Go |
| blocking-api | Community | Synchronous blocking API for simpler use cases | Rust, Go |
| capability-detection | Community | Detecting provider capabilities at runtime | Rust, Go, CLI/Bash |
| cost-routing | Community | Cost-aware provider routing and selection | Rust, Go, Python, CLI/Bash |
| polymorphic | Community | Polymorphic provider patterns with trait objects | Rust, Go |
| retry-fallback | Community | Retry and fallback strategies across providers | Rust, Go, Python, CLI/Bash |
| structured-output | Community | JSON mode and structured output generation | Rust, Go, Python, CLI/Bash |
| timeout-config | Community | Timeout configuration and connection management | Rust, Go, Python |
| token-budget | Community | Token budget management and cost estimation | Rust, Go, Python, CLI/Bash |
| vision | Community | Vision and multimodal capabilities with images | Rust, Go, Python, CLI/Bash |
| auth-helper | Community | 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 | Pro | 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 | ||
| ↳ real-world: Theme Park Planning | Facility layout, capital budgeting, resource allocation | ||
| ↳ real-world: Space Colony Planning | Infrastructure sizing, capacity planning, disaster recovery modeling | ||
| ↳ real-world: Fantasy Sports Draft | Portfolio optimization, team composition, auction bidding strategies | ||
| bayesian-inference | Community | 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 | ||
| ↳ real-world: Haunted House | Fault diagnosis, anomaly detection, sensor fusion from multiple noisy sensors pointing to hidden causes | ||
| ↳ real-world: Coffee Shop | Manufacturing quality control, process parameter tuning, root cause analysis in production | ||
| ↳ real-world: Plant Doctor | Medical diagnosis, agricultural advisory systems, multi-symptom differential diagnosis | ||
| solver-what-if | Pro | What-if scenario analysis with solver scoping | Rust, Go, Python, CLI/Bash |
↳ 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 | ||
| ↳ real-world: Wedding Budget Planning | Event planning, capital budgeting, portfolio allocation | ||
| ↳ real-world: Mars Colony Planning | Infrastructure sizing, supply chain planning, disaster preparedness | ||
| ↳ real-world: Recipe Scaling | Manufacturing scaling, formulation optimization, process engineering |
Integrations — Combining SDK features
Section titled “Integrations — Combining SDK features”| Example | Edition | Description | Languages |
|---|---|---|---|
| ollama | Community | Using Ollama for local inference | Rust, Go, Python |
| lmstudio | Community | Using LM Studio for local inference | Rust, Go |
| alert-triage | Community | Alert triage with LLM-powered analysis | Rust, Go, CLI/Bash |
| cli-assistant | Community | Interactive CLI assistant with LLM backend | Rust, Go |
| clips-basics | Community | CLIPS rule engine basics via nxusKit SDK | Rust, Go, CLI/Bash |
| clips-llm-hybrid | Community | Hybrid CLIPS rules + LLM reasoning | Rust, Go, Python, CLI/Bash |
| common-sense-guardrails | Community Runs in Community Edition with CLIPS and selected BN risk scoring. Pro adds Solver/Z3 and ZEN guardrails for repair feedback when selected. | Progressive LLM guardrails with CE CLIPS/BN and optional Pro Solver/ZEN repair feedback | Python, CLI/Bash |
↳ car-wash | Catch the classic car-wash walk-vs-drive failure with CLIPS rules and optional Solver/Z3 feasibility | ||
↳ coupon-stack | Reject promotion stacking that violates eligibility and margin policy, with optional ZEN validation and BN risk scoring | ||
↳ pallet-door | Block unsafe warehouse advice that ignores dimensional clearance, with optional Solver/Z3 feasibility | ||
↳ cold-chain | Prevent cheaper logistics recommendations that violate handling requirements, with optional ZEN validation and BN review-risk scoring | ||
| ↳ real-world: LLM answer validation | Catch plausible recommendations that fail physical, operational, or policy preconditions before they reach users | ||
| ↳ real-world: Policy enforcement | Turn free-form answers into facts, apply deterministic rules, and produce auditable repair context | ||
| ↳ real-world: Operational decision support | Preserve fast LLM drafting while requiring concrete feasibility evidence for workflow-critical recommendations | ||
| model-research-harness | Community Runs in Community Edition. Future Pro profiles may add Solver portfolio optimization and ZEN decision tables. | Python-first harness for provider-neutral model research, Promptfoo import, CLIPS policy, Bayesian scoring, and dry-run lifecycle recommendations | Python, CLI/Bash |
↳ basic-ticket-routing | Run a credentials-free support ticket classification research smoke | ||
↳ promptfoo-import | Import a Promptfoo config and run the converted nxusKit harness matrix | ||
↳ software-dev | Evaluate code analysis, bug finding, patching, generation, refactoring, and review outputs | ||
| ↳ real-world: Model evaluation | Score model candidates against task-specific outputs and report confidence instead of relying on ad hoc impressions | ||
| ↳ real-world: Provider comparison | Compare local and cloud providers through one provider-neutral workflow while keeping capability claims honest | ||
| ↳ real-world: Lifecycle policy | Generate dry-run pull, pin, keep, or retest recommendations bounded by deterministic policy | ||
| ↳ real-world: Software development workflow research | Exercise code analysis, bug finding, bugfixing, generation, refactoring, and review scenarios with public-safe fixtures | ||
| bn-solver-clips-pipeline | Pro | 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 | ||
| ↳ real-world: Event planning | Predict attendance, optimize resource allocation, enforce safety codes | ||
| ↳ real-world: Emergency response | Estimate survival windows, deploy rescue assets, enforce operational protocols | ||
| ↳ real-world: Manufacturing | Forecast demand, schedule production, enforce quality and safety standards | ||
| ↳ real-world: Logistics | Predict delivery volumes, optimize fleet routing, enforce regulatory compliance | ||
| ↳ real-world: Healthcare | Predict patient load, optimize staff scheduling, enforce clinical safety protocols | ||
| llm-solver-hybrid | Pro | 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 | Community | 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 | ||
| ↳ real-world: Epidemiology | Discover disease risk factor relationships from patient records | ||
| ↳ real-world: Manufacturing | Identify root causes of defects from production data | ||
| ↳ real-world: Finance | Map causal relationships between economic indicators | ||
| ↳ real-world: Genomics | Learn gene regulatory networks from expression data | ||
| ↳ real-world: Quality control | Find which process parameters affect product quality | ||
| zen-decisions | Pro | 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 | Edition | Description | Languages |
|---|---|---|---|
| puzzler | Pro | 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 | Pro | 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 | Pro | 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 | Pro | 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 | Pro | 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) |
Edition labels describe the minimum runnable edition for the default path. A Community example can still list optional Pro enhancements; those stages are disabled by default and require a Pro entitlement only when you run them.
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 and helpers (Rust, Go, Python, CLI/Bash)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.pyCLI/Bash
Section titled “CLI/Bash”cd examples/<category>/<name>/bashmake runBuilt 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 or Apache 2.0, at your option. See LICENSE, LICENSE-MIT, and LICENSE-APACHE.
Copyright 2025-2026 nxus.SYSTEMS LLC.