runtime

package module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

README

openbotstack-runtime

Execution plane for OpenBotStack - Wasm skill execution, Host API, and runtime services.

Quick Start

# Run all tests (125 tests)
make test

# Build
make build

# Build for all platforms (Linux x64/arm64, macOS arm64)
make build-all

# Run with embedded UI
make run

Features

Feature Status
Wasm Execution ✅ Working (wazero)
Host API (LLM/KV/Log) ✅ Implemented
Skill Lifecycle ✅ Load/Execute/Unload
Module Caching ✅ LRU cache
Audit Logging ✅ Structured logs
Rate Limiting ✅ Tenant/User level

Architecture

┌──────────────────────────────────────────────────┐
│                  HTTP API                         │
│           /api/v1/skills/execute                 │
└────────────────────▲─────────────────────────────┘
                     │
┌────────────────────┴─────────────────────────────┐
│                 Executor                          │
│   LoadSkill → CanExecute → Execute → Unload      │
└────────────────────▲─────────────────────────────┘
                     │
┌────────────────────┴─────────────────────────────┐
│              Wasm Runtime (wazero)               │
│   ┌─────────────────────────────────────────┐   │
│   │           Host API Exports              │   │
│   │  get_input, set_output, llm_generate    │   │
│   │  kv_get, kv_set, log                    │   │
│   └─────────────────────────────────────────┘   │
└──────────────────────────────────────────────────┘

Testing

make test          # All tests
make test-wasm     # Wasm runtime only
make test-executor # Executor only  
make test-skills   # Skill examples
make test-count    # Count all tests

See docs/TESTING.md for details.

Skill Examples

Skill Type Location
hello-world Deterministic examples/skills/hello-world
sentiment LLM-Assisted examples/skills/sentiment
tax-calculator Deterministic examples/skills/tax-calculator
summarize Declarative examples/skills/summarize

License

Apache 2.0

Documentation

Overview

Package runtime is the execution plane for OpenBotStack.

This module implements the runtime components that execute skills, manage tool adapters, and handle audit logging. It depends on openbotstack-core for interface definitions.

Key components:

  • SkillExecutor: Executes skills with timeout and sandboxing
  • ToolAdapter: HTTP/DB/API tool wrappers
  • AuditLogger: Structured audit to PostgreSQL
  • RateLimiter: Redis-backed token bucket implementation

This module is stateless by design - all state is externalized to:

  • Redis: Session, rate limits
  • PostgreSQL: Audit logs
  • Milvus: Long-term memory

Directories

Path Synopsis
api
Package api provides the REST API for OpenBotStack runtime.
Package api provides the REST API for OpenBotStack runtime.
cmd
openbotstack command
Package main provides the OpenBotStack runtime entrypoint.
Package main provides the OpenBotStack runtime entrypoint.
examples
skills/hello-world command
Package main implements a production-like hello-world skill for OpenBotStack.
Package main implements a production-like hello-world skill for OpenBotStack.
skills/math-add command
Package main implements a deterministic math.add skills.
Package main implements a deterministic math.add skills.
skills/meeting-summarize command
Package main implements an LLM-orchestrated meeting summarization skills.
Package main implements an LLM-orchestrated meeting summarization skills.
skills/sentiment command
Package main implements an LLM-assisted skill for sentiment analysis.
Package main implements an LLM-assisted skill for sentiment analysis.
skills/tax-calculator command
Package main implements a deterministic tax calculator skills.
Package main implements a deterministic tax calculator skills.
skills/wordcount command
Package main implements a word count skill as TinyGo Wasm.
Package main implements a word count skill as TinyGo Wasm.
executor
skill_executor
Package executor implements skill execution with sandboxing.
Package executor implements skill execution with sandboxing.
workflow_executor
Package worker implements async job queue for skill execution.
Package worker implements async job queue for skill execution.
Package ratelimit implements rate limiting.
Package ratelimit implements rate limiting.
api
llm
sandbox
wasm
Package wasm provides HTTP sandboxing for Wasm skills.
Package wasm provides HTTP sandboxing for Wasm skills.
web
webui
Package webui provides embedded frontend assets.
Package webui provides embedded frontend assets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL