Skip to content

nxusKit Examples

License: MIT OR Apache-2.0 Rust Go Python

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.

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.

Terminal window
# 1. Install the SDK (see https://docs.nxus.systems/nxuskit/getting-started/installation/)
# 2. Set up this project
source ~/.nxuskit/sdk/current/scripts/setup-sdk.sh # Go, env vars, library paths
./scripts/setup-sdk-symlink.sh # Rust Cargo paths override
# 3. Run an example
cargo run --manifest-path examples/patterns/basic-chat/rust/Cargo.toml # Rust
go run -tags nxuskit ./examples/patterns/basic-chat/go # Go
python examples/patterns/basic-chat/python/main.py # Python

Patterns — Reusable SDK integration patterns

Section titled “Patterns — Reusable SDK integration patterns”
ExampleEditionDescriptionLanguages
basic-chatCommunityBasic chat completion with a simple promptRust, Go, Python
streamingCommunityStreaming chat completion with real-time outputRust, Go, Python
multi-providerCommunityUsing multiple providers in one applicationRust, Go, Python, CLI/Bash
convenience-apiCommunityLiteLLM-style convenience API usageRust, Go
blocking-apiCommunitySynchronous blocking API for simpler use casesRust, Go
capability-detectionCommunityDetecting provider capabilities at runtimeRust, Go, CLI/Bash
cost-routingCommunityCost-aware provider routing and selectionRust, Go, Python, CLI/Bash
polymorphicCommunityPolymorphic provider patterns with trait objectsRust, Go
retry-fallbackCommunityRetry and fallback strategies across providersRust, Go, Python, CLI/Bash
structured-outputCommunityJSON mode and structured output generationRust, Go, Python, CLI/Bash
timeout-configCommunityTimeout configuration and connection managementRust, Go, Python
token-budgetCommunityToken budget management and cost estimationRust, Go, Python, CLI/Bash
visionCommunityVision and multimodal capabilities with imagesRust, Go, Python, CLI/Bash
auth-helperCommunityOAuth login flow and credential management helperRust, Go
  ↳ statusList provider authentication status and stored credentials
  ↳ setStore an API key for a specific provider
  ↳ removeRemove a stored API key for a provider
  ↳ dashboardOpen provider credential dashboard in browser
solverProZ3 constraint solver integration via nxusKit SDKRust, Go, Python, CLI/Bash
  ↳ theme-parkBudget and space planning for a theme park with rides, food courts, and entertainment zones
  ↳ space-colonyResource allocation for a space colony dealing with solar storm what-if scenarios
  ↳ fantasy-draftFantasy sports draft optimization under salary cap with injury what-if analysis
  ↳ real-world: Theme Park PlanningFacility layout, capital budgeting, resource allocation
  ↳ real-world: Space Colony PlanningInfrastructure sizing, capacity planning, disaster recovery modeling
  ↳ real-world: Fantasy Sports DraftPortfolio optimization, team composition, auction bidding strategies
bayesian-inferenceCommunityBayesian network inference via nxusKit SDKRust, Go, Python, CLI/Bash
  ↳ haunted-houseInvestigate a haunted house — is it a ghost or a raccoon?
  ↳ coffee-shopDiagnose bad espresso from grind size, temperature, and bean age
  ↳ plant-doctorDiagnose a sick plant from overwatering, nutrient, and disease evidence
  ↳ real-world: Haunted HouseFault diagnosis, anomaly detection, sensor fusion from multiple noisy sensors pointing to hidden causes
  ↳ real-world: Coffee ShopManufacturing quality control, process parameter tuning, root cause analysis in production
  ↳ real-world: Plant DoctorMedical diagnosis, agricultural advisory systems, multi-symptom differential diagnosis
solver-what-ifProWhat-if scenario analysis with solver scopingRust, Go, Python, CLI/Bash
  ↳ weddingWedding budget planning with $25k constraint and vendor what-if scenarios
  ↳ marsMars colony resource allocation with dust storm what-if disruptions
  ↳ recipeRecipe scaling with vegan substitution — may be UNSAT
  ↳ real-world: Wedding Budget PlanningEvent planning, capital budgeting, portfolio allocation
  ↳ real-world: Mars Colony PlanningInfrastructure sizing, supply chain planning, disaster preparedness
  ↳ real-world: Recipe ScalingManufacturing scaling, formulation optimization, process engineering
ExampleEditionDescriptionLanguages
ollamaCommunityUsing Ollama for local inferenceRust, Go, Python
lmstudioCommunityUsing LM Studio for local inferenceRust, Go
alert-triageCommunityAlert triage with LLM-powered analysisRust, Go, CLI/Bash
cli-assistantCommunityInteractive CLI assistant with LLM backendRust, Go
clips-basicsCommunityCLIPS rule engine basics via nxusKit SDKRust, Go, CLI/Bash
clips-llm-hybridCommunityHybrid CLIPS rules + LLM reasoningRust, Go, Python, CLI/Bash
common-sense-guardrailsCommunity
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 feedbackPython, CLI/Bash
  ↳ car-washCatch the classic car-wash walk-vs-drive failure with CLIPS rules and optional Solver/Z3 feasibility
  ↳ coupon-stackReject promotion stacking that violates eligibility and margin policy, with optional ZEN validation and BN risk scoring
  ↳ pallet-doorBlock unsafe warehouse advice that ignores dimensional clearance, with optional Solver/Z3 feasibility
  ↳ cold-chainPrevent cheaper logistics recommendations that violate handling requirements, with optional ZEN validation and BN review-risk scoring
  ↳ real-world: LLM answer validationCatch plausible recommendations that fail physical, operational, or policy preconditions before they reach users
  ↳ real-world: Policy enforcementTurn free-form answers into facts, apply deterministic rules, and produce auditable repair context
  ↳ real-world: Operational decision supportPreserve fast LLM drafting while requiring concrete feasibility evidence for workflow-critical recommendations
model-research-harnessCommunity
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 recommendationsPython, CLI/Bash
  ↳ basic-ticket-routingRun a credentials-free support ticket classification research smoke
  ↳ promptfoo-importImport a Promptfoo config and run the converted nxusKit harness matrix
  ↳ software-devEvaluate code analysis, bug finding, patching, generation, refactoring, and review outputs
  ↳ real-world: Model evaluationScore model candidates against task-specific outputs and report confidence instead of relying on ad hoc impressions
  ↳ real-world: Provider comparisonCompare local and cloud providers through one provider-neutral workflow while keeping capability claims honest
  ↳ real-world: Lifecycle policyGenerate dry-run pull, pin, keep, or retest recommendations bounded by deterministic policy
  ↳ real-world: Software development workflow researchExercise code analysis, bug finding, bugfixing, generation, refactoring, and review scenarios with public-safe fixtures
bn-solver-clips-pipelineProThree-stage BN prediction → Solver optimization → CLIPS safety pipelineRust, Go, CLI/Bash
  ↳ festivalMusic festival staging — crowd predictions drive band scheduling and safety
  ↳ rescueSearch and rescue — survivor probability drives team assignment and safety checks
  ↳ bakeryBakery scheduling — demand forecasts drive oven allocation and allergen separation
  ↳ real-world: Event planningPredict attendance, optimize resource allocation, enforce safety codes
  ↳ real-world: Emergency responseEstimate survival windows, deploy rescue assets, enforce operational protocols
  ↳ real-world: ManufacturingForecast demand, schedule production, enforce quality and safety standards
  ↳ real-world: LogisticsPredict delivery volumes, optimize fleet routing, enforce regulatory compliance
  ↳ real-world: HealthcarePredict patient load, optimize staff scheduling, enforce clinical safety protocols
llm-solver-hybridProHybrid LLM + Z3 solver problem solvingRust, Go, Python, CLI/Bash
  ↳ seatingWedding dinner seating — 12 guests across 3 tables with constraints
  ↳ dungeonDungeon layout — 5 rooms with boss and treasure placement rules
  ↳ road-tripRoad trip planning — 14 days across 5 national parks with preferences
bn-structure-learningCommunityBayesian network structure learning from dataRust, Go, Python
  ↳ golfGolf course conditions — weather, soil, and maintenance factor learning
  ↳ bmxBMX performance — skill level, technique, and jump factor learning
  ↳ sourdoughSourdough baking — feeding schedule, flour type, and temperature factor learning
  ↳ real-world: EpidemiologyDiscover disease risk factor relationships from patient records
  ↳ real-world: ManufacturingIdentify root causes of defects from production data
  ↳ real-world: FinanceMap causal relationships between economic indicators
  ↳ real-world: GenomicsLearn gene regulatory networks from expression data
  ↳ real-world: Quality controlFind which process parameters affect product quality
zen-decisionsProZEN decision table evaluation via nxusKit SDKRust, Go, Python, CLI/Bash
  ↳ maze-ratFirst Hit Policy — route a maze runner through personality-driven decisions
  ↳ potionCollect Hit Policy — match ingredient lists against brewing recipes
  ↳ food-truckExpression Nodes — compute dynamic pricing with conditional logic
ExampleEditionDescriptionLanguages
puzzlerProMulti-approach puzzle solver comparing CLIPS, LLM, and hybrid strategiesRust, Go
  ↳ sudokuSolve Sudoku puzzles using CLIPS constraint propagation
  ↳ set-gameFind valid SET card combinations using CLIPS pattern matching
  ↳ compareSide-by-side comparison of CLIPS, LLM, and hybrid solvers
racerProCLIPS vs LLM head-to-head benchmarking toolRust, Go
  ↳ raceHead-to-head CLIPS vs LLM race on a single problem
  ↳ benchmarkStatistical benchmarking with multiple runs and timing
  ↳ listList all available problems with difficulty ratings
  ↳ describeShow detailed description of a specific problem
rifferProMusic sequence analysis and transformation tool (still learning to shred)Rust, Go
  ↳ analyzeAnalyze a music sequence for key, intervals, and rhythm patterns
  ↳ scoreScore a sequence on six musical dimensions
  ↳ transformTransform a sequence — transpose, invert, or retrograde
  ↳ convertConvert between MIDI and MusicXML formats
rulerProLLM-powered CLIPS rule generator with automatic validationRust, Go, CLI/Bash
  ↳ generateGenerate CLIPS rules from natural language descriptions
  ↳ validateValidate CLIPS rule syntax and semantic correctness
  ↳ saveSave generated rules to a file for later use
  ↳ loadLoad previously saved rules from a file
  ↳ examplesRun progressive complexity examples demonstrating rule generation
arbiterProCLIPS-validated LLM retry app with rule-based answer verificationRust, Go, CLI/Bash
  ↳ classificationCategorize input text into specified categories
  ↳ extractionExtract structured information from unstructured text
  ↳ reasoningPerform logical inference and multi-step reasoning
BadgeMeaning
CommunityRuns with the free OSS SDK
ProRequires 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.

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 definitions
scripts/ Build and test helpers

All examples require the nxusKit SDK. Run these once after cloning:

Terminal window
# Set up Go workspace, env vars, and native library paths
source ~/.nxuskit/sdk/current/scripts/setup-sdk.sh
# Set up Rust Cargo paths override (generates .cargo/config.toml)
./scripts/setup-sdk-symlink.sh

The 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).

Terminal window
cargo run --manifest-path examples/<category>/<name>/rust/Cargo.toml
Terminal window
go run -tags nxuskit ./examples/<category>/<name>/go/cmd
Terminal window
python examples/<category>/<name>/python/main.py
Terminal window
cd examples/<category>/<name>/bash
make run

Built with gratitude for the open-source projects that make nxusKit possible. See ACKNOWLEDGEMENTS.md for a curated list of key projects.


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.