smooai-smooth-operator 1.4.0

Reference core for smooth-operator: domain model + StorageAdapter seam over smooth-operator.
Documentation

What is this?

smooai-smooth-operator (crate name smooth_operator) is the service-layer reference core of smooth-operator — the layer that sits on top of smooth-operator-core (the Rust agent engine) and turns it into a knowledge-chat service. It is what the WebSocket server, the storage adapters, and the ingestion pipeline all build against.

It owns three things:

  • domain — storage-agnostic domain structs (Conversation, Participant, Message, Session, Checkpoint, Citation) that mirror the language-neutral spec/domain/*.json.
  • adapter — the single StorageAdapter seam every backend implements (in-memory, Postgres + pgvector, DynamoDB + S3 Vectors). Its checkpoint/knowledge accessors return the engine's own traits, so the engine plugs straight in. See docs/STORAGE.md.
  • runtime — a KnowledgeChatRuntime that constructs a real smooth-operator Agent + Workflow and drives a turn end to end (knowledge retrieval → tool-calling → streaming).

It also owns two shared retrieval seams both adapters and ingestion depend on: embedding (the text→vector Embedder + the network-free DeterministicEmbedder) and rerank (the optional post-retrieval Reranker stage).

This is the operator engine/service crate, not a protocol client. If you want to connect to a running service, reach for one of the five clients — TypeScript, Python, Go, .NET, or the Rust client.


Install

[dependencies]
smooai-smooth-operator = "1"

Embed it

Build a KnowledgeChatRuntime over any StorageAdapter + an LlmConfig (the gateway seam) and drive a turn. The in-memory adapter is the conformance baseline; swap in Postgres or DynamoDB unchanged.

use std::sync::Arc;
use smooth_operator::{KnowledgeChatRuntime, StorageAdapter};
use smooth_operator_adapter_memory::InMemoryStorageAdapter;

// 1. Pick a storage backend (the seam every adapter implements).
let storage: Arc<dyn StorageAdapter> = Arc::new(InMemoryStorageAdapter::default());

// 2. Build the knowledge-chat runtime over that storage + an LLM gateway config.
//    It constructs a real smooth-operator Agent + Workflow on `smooth-operator-core`.
let runtime = KnowledgeChatRuntime::new(storage, llm_config);

// The reference server in `smooth-operator-server` does exactly this behind the
// WebSocket protocol: a turn runs knowledge retrieval → tool-calling → streamed tokens.

The runtime also exposes builder-style seams — with_curation, with_retrieval_filter, with_access_control, with_llm_provider, with_max_iterations. Exact signatures (and how LlmConfig is wired to a gateway) are on docs.rs. For the full ingest → chat path, see the smooth-operator-server crate and the rust/examples/dev-support example.


Where it sits

smooth-operator-core      the agent engine (Agent · Workflow · Tool · LlmProvider · Memory)
        ▲
        │  consumed by
        │
smooai-smooth-operator    ← THIS CRATE — domain model + StorageAdapter seam + KnowledgeChatRuntime
        ▲
        │  built against by
        │
  adapters (memory · postgres · dynamodb) · ingestion · smooth-operator-server · the 5 clients

🧩 Part of Smoo AI

smooai-smooth-operator is built and open-sourced by Smoo AI — the AI-powered business platform with AI built into every product. It is the heart of the smooth-operator service, which exposes one schema-driven WebSocket protocol implemented by five native clients (TypeScript · Python · Go · .NET · Rust).

📄 License

MIT © 2026 Smoo AI. See LICENSE.