API Reference — Vega SDK

Vega Capability SDK: Python API Reference

Public Python API implemented by vega-capability-sdk, organized by responsibility. Import stable application-facing symbols from vega_capability_sdk unless a page explicitly uses a public submodule such as vega_capability_sdk.manifests or vega_capability_sdk.testing.

Reference conventions

Each API page distinguishes:

  • Recommended import path;
  • Exact public signature or dataclass fields;
  • Defaults and immutability behavior;
  • Return values and exceptions;
  • Validation and lifecycle constraints;
  • A minimal example where the API benefits from one.

Signatures show semantic defaults such as {} for a dataclass mapping created with default_factory; they do not imply that instances share a mutable default. Types use Python 3.12 syntax because the package requires Python 3.12 or later.

API groups

AreaReference
Provider lifecycle and optional Provider protocolsProvider API
Execution requests, contexts, cancellation, results, and progressExecution API
Standard errors and health reportsErrors and Health API
Configuration, secrets, and robot identityConfiguration and Identity API
Artifacts, clocks, logging, resource leases, and tracingServices API
Restart-time Provider recovery contractRecovery API
Action self-descriptionsAction Contracts API
Capability manifest models, package validation, and version helpersManifest and Validation API
Test doubles and Provider conformance harnessTesting API
`vega-capability` command line interfaceCLI Reference

Versioning and compatibility

vega_capability_sdk.__version__ is the installed SDK version. Capability packages declare a compatible SDK range in capability.yaml; validate it with the manifest APIs rather than comparing version strings manually.

python
from vega_capability_sdk import __version__
print(__version__) # str

__version__ describes the installed SDK distribution. It is not the Capability package version or an Action version. Use vega_capability_sdk.manifests.is_sdk_compatible() or package validation for range checks.

Public import boundaries

  • vega_capability_sdk is the preferred import surface for Provider-facing contracts and services.
  • vega_capability_sdk.manifests is the public manifest and package-validation surface.
  • vega_capability_sdk.testing is the public testing surface.
  • Compatibility modules such as execution, errors, health, identity, context, recovery, and action_contract re-export their named contracts.
  • Modules and symbols beginning with _, including _immutability, remain private compatibility or implementation surfaces even when importable.

The SDK exposes no Runtime client, Task or Session abstraction, network transport, event bus, or robot-driver API.