Skip to content

Examples

License: MIT OR Apache-2.0 Rust Go Python

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.

Terminal window
# 1. Install the SDK (see nxusKit Getting Started guide)
# 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”
ExampleDescriptionLanguages
basic-chatBasic chat completion with a simple promptRust, Go, Python
streamingStreaming chat completion with real-time outputRust, Go, Python
multi-providerUsing multiple providers in one applicationRust, Go, Python, CLI/Bash
convenience-apiLiteLLM-style convenience API usageRust, Go
blocking-apiSynchronous blocking API for simpler use casesRust, Go
capability-detectionDetecting provider capabilities at runtimeRust, Go, CLI/Bash
cost-routingCost-aware provider routing and selectionRust, Go, Python, CLI/Bash
polymorphicPolymorphic provider patterns with trait objectsRust, Go
retry-fallbackRetry and fallback strategies across providersRust, Go, Python, CLI/Bash
structured-outputJSON mode and structured output generationRust, Go, Python, CLI/Bash
timeout-configTimeout configuration and connection managementRust, Go, Python
token-budgetToken budget management and cost estimationRust, Go, Python
visionVision and multimodal capabilities with imagesRust, Go, Python
auth-helperOAuth 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
solverZ3 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
bayesian-inferenceBayesian 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
solver-what-ifWhat-if scenario analysis with solver scopingRust, Go, Python
  ↳ 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
ExampleDescriptionLanguages
ollamaUsing Ollama for local inferenceRust, Go, Python
lmstudioUsing LM Studio for local inferenceRust, Go
alert-triageAlert triage with LLM-powered analysisRust, Go, CLI/Bash
cli-assistantInteractive CLI assistant with LLM backendRust, Go
clips-basicsCLIPS rule engine basics via nxusKit SDKRust, Go, CLI/Bash
clips-llm-hybridHybrid CLIPS rules + LLM reasoningRust, Go, Python, CLI/Bash
bn-solver-clips-pipelineThree-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
llm-solver-hybridHybrid 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-learningBayesian 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
zen-decisionsZEN 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
ExampleDescriptionLanguages
puzzlerMulti-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
racerCLIPS 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
rifferMusic 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
rulerLLM-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
arbiterCLIPS-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)

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 (Rust, Go, interactive utilities)
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

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 and Apache 2.0. See LICENSE-MIT and LICENSE-APACHE.

Copyright 2025-2026 nxus.SYSTEMS LLC.