Skip to main content
sec0-sdk/instrumentation is the decorator-first SDK for in-device tracing, agent state propagation, and hop-aware policy enforcement. Most integrations should start with sec0.config.yaml plus initializeSec0App(...), then decorate the methods that represent agent, orchestrator, gateway, server, middleware, tool, or skill boundaries.
Boot it with:

StandardAppConfig

app

app.client

auth

controlPlane

Programmatic bootstrap: initSec0

Use initSec0(...) when you are not loading sec0.config.yaml:

app.hops

Each hop entry is keyed by Class.method or a custom string and must match the decorator used on that method.

HopConfig base fields

Agent hop

Orchestrator hop

Gateway hop

Server hop

Middleware hop

Tool hop

Skill hop

HopAutomationOptions

HopEnforcementOptions

When omitted, decorators fetch policy automatically from the control plane: gateway policy level for gateway hops and middleware policy level for all other hop types.

AgentStatePayload

Supported variable scopes: AGENT, GATEWAY, SERVER, TOOL, ORCHESTRATOR.

Main exported functions

loadStandardConfig

initializeSec0App

initSec0

getSec0AppConfig

For the decorator-to-hop mapping and a paste-ready class example, see Decorated Hops Reference.