Typed runtime · Go

The runtime for composable work

A small, typed foundation for actions, lazy streams, resilience, hooks, and dependable execution across local and distributed systems.

Kernel surface

Core boundary typed
Stream boundary lazy
Hot path lean
Concurrency safe
License Apache 2.0
Core Principle

Everything Composes around Actions

An action owns its request, response, execution, and lifecycle. Middleware, hooks, transports, and Flow can compose around it without duplicating business logic.

action.Builder billing.transfer.go
func BuildTransferAction(db *gorm.DB) action.AnyAction {
    return action.New("billing.transfer", func(ctx context.Context, req TransferReq) (*MessageRes, error) {
        // core business logic here
        return &MessageRes{Message: "transferred"}, nil
    }).
        Node("gateway").
        Description("Atomic transfer across service mesh").
        Tag("billing", "transfers").
        Route(thttp.POST("/api/v1/transfers")).
        Build()
}
Capability Register

Core Modules

A focused kernel surface for production execution, not a framework-shaped dependency maze.

01

Typed Action Builder

Chain middleware, resilience, auth, caching, and audit directly on the action builder. No separate router, no middleware stack soup.

action.Builder
02

Stream Actions

Lazy typed streams with lifecycle hooks, cancellation, early stop, and composition boundaries for Flow and AI.

ai.agent
03

AnyAction Boundary

A stable type-erased boundary for registries and transports while keeping typed execution inside the action.

net/transport
04

Resilience Composition

Circuit breakers, adaptive timeouts, rate limiters, concurrency gates, dedup, coalescing, idempotency, and distributed locks.

resilience
05

Observable by Design

Lifecycle hooks, structured events, tracing, and testable behavior without forcing observability into business logic.

compliance
06

Composable Boundaries

Kernel actions remain small; Flow, transports, AI, and domain packages build larger graphs on top.

action.Saga
07

Testable Contracts

Race-tested contracts, deterministic synchronization helpers, allocation-sensitive benchmarks, and explicit lifecycle tests.

testkit
08

Hot-Swap Proxies

Atomically replace action or stream implementations for new invocations without interrupting active work.

deploygen
09

Small Core

Dependency-light primitives designed to be embedded by Flow, transport adapters, AI systems, and applications.

desktop
Typed streams

Make concurrency legible.

Streams are lazy, cancellable, and composable. The consumer decides when work is pulled; the action owns lifecycle hooks and terminal behavior.

action.StreamAction search.stream.go
type Document struct {
    ID    string `json:"id"`
    Score float64 `json:"score"`
}

search := action.NewStream("search.documents",
    func(ctx context.Context, q Query) iter.Seq2[Document, error] {
        return searchIndex(ctx, q)
    }).
    OnStart(func(ctx context.Context, q Query) { trace.Start(ctx, "search") }).
    OnItem(func(ctx context.Context, d Document) { metrics.Observe(d.Score) }).
    OnSuccess(func(ctx context.Context, q Query) { metrics.Completed() }).
    Build()
Resilience Stack

Production Hardening

Timeouts, retries, idempotency, coalescing, caching, and concurrency controls remain explicit and testable at the action boundary.

resilience chaining resilience.go
act := action.New("fetch.data", coreHandler).
    Resilient(action.ResilienceConfig{
        MaxRetries:    3,
        Backoff:       action.ExponentialJitter(100*time.Millisecond, 2*time.Second),
        Timeout:       2 * time.Second,
        MaxConcurrent: 10,
        Adaptive: &action.AdaptiveConfig{FailureThreshold: 10},
    }).
    Idempotent().
    Cache(30*time.Second, keyFn, cacheStore).
    Dedup(keyFn).
    RateLimit(100, 50).
    Build()
Nexss Ecosystem

One idea. Many layers.

Nexss is not a collection of unrelated packages. Each layer has one job and a precise boundary: the Kernel executes, Flow composes, and domain packages give the work meaning.

Layer
Owns
Connects to
Why it matters
Kernel
Actions, streams, lifecycle
Go code
Small, typed execution core
Flow / nflow
Graphs, state, control flow
AnyAction / AnyStreamAction
Readable orchestration without moving logic
AI
Models, tools, schemas
Typed actions and streams
Structured output becomes a contract
Transport
NATS, HTTP, workers
Stable action boundaries
Distribution without rewriting handlers
Domain packages
Files, billing, search, agents
Typed request / response
Your business stays yours
Strategic Position

Build your next system

Start with a typed action. Add a stream when the work becomes incremental. Compose it in Flow when the graph becomes the product. Nexss gives every layer a place to live.