STATEK
API Reference
Overview

STATEK API Reference

This reference covers the STATEK APIs used by the public docs and the high-level implementation surface in /src/statek/statek. It is organized by category so application code can start with agents, jobs, tools, and settings, then move into advanced runner and provider APIs when needed.

⚠️

Prefer the high-level patterns in the guide pages before depending on lower-level runner, queue, provider, or temporal APIs. STATEK restricted mode limits model-written Python, but production code execution still requires permissioning, secrets discipline, process and resource limits, and operational controls in the hosting application.

Install and import

Install STATEK with a dbzero extra:

pip install "statek[dbzero]"

Most reference pages show direct implementation imports because several high-level classes are not re-exported from the package root:

import statek
 
from statek.agents.agent import Agent
from statek.executors.job import Job, JobDef, JobStatus
from statek.executors.utils import run_job_step

statek.init(settings=None) initializes process-level STATEK setup. In the current implementation it loads model pricing metadata when StatekSettings.statek_model_info_dir is configured.

ItemImport pathStabilityPage
Agents and agent templatesstatek.agents.*Stable core and specialized helpersAgents
Job definitions and execution statestatek.executors.jobStable coreJobs
Tool decorators and system toolsstatek.systemStable core, some advanced helpersTools
Delegated child jobsstatek.taskStable coreSubtasks
Future and temporal primitivesstatek.futureAdvancedFutures
Model provider abstractionstatek.llm_apiAdvanced extension APIProviders
Settings and loggingstatek.settingsStable configuration APISettings
Prompt definitionsstatek.prompt_configStable prompt-file APIPrompts
Worker startup, loops, and queue helpersstatek.runner, statek.executors.utilsOperational, some provisional helpersRunners
External job submissionstatek.statek_client_apiProvisional external APIClient API
Examples and documentsstatek.executors.example, statek.document, statek.agents.*Stable helper APIsExamples and Documents
Current execution contextstatek.utils, statek.shared_contextStable and provisional helpersContext

Stability notes

Core application APIs are Agent, JobDef, Job, JobStatus, @tool, @subtask, SubTaskHandler, StatekSettings, LLM_API_Settings, prompt definitions, start_statek, start_statek_async, and the documented example/document helpers. Advanced APIs are useful but closer to STATEK internals: temporal futures, queue processing, provider subclassing, shared context, and runner internals.

This reference intentionally excludes parser internals, low-level chat log item classes, dbzero plumbing, test helpers, and private helpers unless another public docs page already relies on them.