capability-runtime
capability-runtime is a production-oriented runtime/adapter layer that exposes a
stable Runtime API while composing two upstream systems:
skills-runtime-sdkfor skills, tools, approvals, WAL, and event evidenceAgentlyfor OpenAI-compatible transport and TriggerFlow-based orchestration internals
The public contract of this repository is intentionally narrow:
- capability primitives:
AgentSpecandWorkflowSpec - execution entrypoint:
Runtime - evidence surface:
NodeReport, host snapshots, and service-facade helpers
What You Get
- A single execution surface:
Runtime.run()andRuntime.run_stream() - Public capability registration and manifest descriptors
- Workflow orchestration on top of the runtime without exposing TriggerFlow as a public API
- Evidence-first results through
NodeReport, tool-call reports, approval summaries, and WAL locators - Host-facing helpers for waiting summaries, approval tickets, resume-intent preview, continuity, and service streaming
- Runtime capability previews behind the same runtime contract: Responses requester opt-in, Dynamic DAG preview, workflow lifecycle summaries, Workspace/Recall context packs, and Action artifact evidence summaries
Architecture At A Glance
+-----------------------------+
| Host Application |
| - register capabilities |
| - run / stream / summarize |
+--------------+--------------+
|
v
+------------------------------------------------------------------------+
| capability-runtime |
| |
| Public contract |
| - AgentSpec / WorkflowSpec |
| - Runtime |
| - NodeReport / HostRunSnapshot / RuntimeServiceFacade |
| |
| Internal adapters |
| - AgentAdapter |
| - TriggerFlowWorkflowEngine |
| - service/session continuity bridge |
+------------------------------+-----------------------------------------+
|
v
+-------------------------------+
| skills-runtime-sdk |
| - skills + tools |
| - approvals + exec sessions |
| - WAL / AgentEvent evidence |
+---------------+---------------+
|
v
+-------------------------------+
| Agently / TriggerFlow |
| - OpenAI-compatible transport |
| - workflow execution internals|
+-------------------------------+
Install
From source:
python -m pip install -e .
With development dependencies:
python -m pip install -e ".[dev]"
When the package is published, the install form is:
python -m pip install capability-runtime
Import name:
import capability_runtime
Quickstart
1. Offline runtime loop
python examples/01_quickstart/run_mock.py
This path is the smallest reproducible loop:
- register an
AgentSpec - validate the registry
- run in
mode="mock" - inspect the terminal
CapabilityResult
2. Bridge mode with a real model backend
cp examples/01_quickstart/.env.example examples/01_quickstart/.env
python examples/01_quickstart/run_bridge.py
Bridge mode reuses Agently's OpenAI-compatible transport but still delegates the
actual skills/tools/WAL semantics to skills-runtime-sdk. The default requester
strategy is chat_completions. Responses mode is an explicit opt-in with
RuntimeConfig.requester_strategy="responses"; it is not the default.
Real provider wiring order:
- Verify the provider model name with the gateway or
/modelssurface. - Build a provider requester factory from neutral transport settings with
build_openai_provider_requester_factory(...). - Keep chat/completions on the default
requester_strategy="chat_completions". - Opt in to the responses lane only if the provider supports
/responses. - Run the runtime chat path with
RuntimeConfig(mode="bridge", requester_strategy="chat_completions"). - Run the runtime responses path with
RuntimeConfig(mode="bridge", requester_strategy="responses").
Model routing has a separate priority chain: AgentSpec.llm_config["model"]
overrides the SDK ChatRequest.model, and that request model is the runtime
bridge source of truth when the provider usage payload omits model. Agently
settings configure transport details such as base URL, auth, and requester
plugin settings; they do not replace AgentSpec.llm_config.model.
3. Workflow orchestration
python examples/02_workflow/run.py
4. Runtime capability previews
python examples/05_dynamic_dag_preview/run.py
python examples/06_responses_bridge/run.py
These previews keep the public surface inside capability_runtime: use
DynamicWorkflowPlan / runtime methods for Dynamic DAGs and
RuntimeConfig.requester_strategy for Responses. Do not build downstream code on
upstream-native TaskDAG, DynamicTask, Workspace, Action, or requester
objects.
For a higher-level index, start with examples/README.md.
Public API At A Glance
The package root exposes the supported contract:
from capability_runtime import (
Runtime,
RuntimeConfig,
CustomTool,
ProviderRequester,
ProviderRequesterFactory,
ProviderRequesterStrategy,
build_openai_provider_requester_factory,
AgentSpec,
AgentIOSchema,
WorkflowSpec,
Step,
LoopStep,
ParallelStep,
ConditionalStep,
InputMapping,
CapabilitySpec,
CapabilityKind,
CapabilityResult,
CapabilityStatus,
DynamicWorkflowNode,
DynamicWorkflowPlan,
NodeReport,
StructuredStreamEvent,
HostRunSnapshot,
HostRunStatus,
ApprovalTicket,
ResumeIntent,
RuntimeContextRecordRef,
RuntimeRecallBackend,
RuntimeRecallContextPack,
build_recall_context_pack,
write_node_report_summary,
RuntimeServiceFacade,
RuntimeServiceRequest,
RuntimeServiceHandle,
RuntimeSession,
)
The runtime currently supports three execution modes through RuntimeConfig.mode:
mock: deterministic local testing without a real LLM backendbridge: provider transport adapter +skills-runtime-sdkexecution semanticssdk_native: nativeskills-runtime-sdkbackend without the provider transport adapter
Provider bridge strategy is separate from mode:
RuntimeConfig.requester_strategy="chat_completions": backward-compatible default bridge path.RuntimeConfig.requester_strategy="responses": opt-in Responses bridge path.sdk_backendinjection takes precedence over both strategies for offline regression and fake-backend tests.
Dynamic DAG preview is separate from WorkflowSpec.steps: compile a TaskDAG-like
mapping into the runtime-owned DynamicWorkflowPlan, keep max_dynamic_nodes
bounded, and execute nodes only through registered capabilities.
Provider audit evidence is expected in NodeReport.usage: preserve
model, request_id, provider, and token counts when the provider returns
them. If the provider omits model, the request model from ChatRequest.model
is the fallback; never treat an SDK placeholder such as gpt-4 as real provider
evidence when a more specific request/provider model is available.
Repository Layout
.
├── src/capability_runtime/ # package source
├── examples/ # human-facing runnable examples
├── docs_for_coding_agent/ # compact pack for coding agents
├── help/ # public help and operational guides
├── config/ # example config shapes
├── scripts/ # release / validation helpers
└── tests/ # offline regression guardrails
Documentation Map
- help/README.md: public help index
- examples/README.md: runnable examples by scenario
- docs_for_coding_agent/README.md: compact coding-agent pack
- config/README.md: config shape reference
Recommended reading order for new users:
Release And PyPI Publishing
This repository ships GitHub Actions workflows for:
- Tier-0 CI on push and pull request
- tag-driven and manual PyPI publishing
Release guardrails:
- the Git tag must match
pyproject.toml's[project].version - the Git tag must match
capability_runtime.__version__ - the publish job builds both sdist and wheel before uploading
The publish workflow is designed for PyPI Trusted Publishing. You still need to
configure the corresponding Trusted Publisher entry on pypi.org.
Relationship To The Upstreams
skills-runtime-sdkremains the source of truth for skills, approvals, tools, WAL, and event evidence.- Agently
SkillsExecutoris not acapability-runtimeskills driver. Its authoring patterns may informSKILL.mdbundle design, but skill injection, tool execution, approvals, WAL, events, andNodeReportaggregation remain owned byskills-runtime-sdk. Agentlyremains the transport/orchestration substrate where this repository chooses to bridge instead of forking or reimplementing.capability-runtimeis the contract-convergence layer: it narrows those upstream capabilities into a smaller host-facing runtime surface.- Default bridge mode is non-breaking: if you do not configure Responses, Dynamic DAG,
Workspace/Recall, or Action artifact evidence previews, existing
Runtime.run()/Runtime.run_stream()/WorkflowSpecconsumers can keep reading the existingNodeReportand UI event fields.
Metadata
Release files for capability-runtime 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| capability_runtime-0.1.5.tar.gz | 248.7 kB | With provenance | Details for capability_runtime-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| capability_runtime-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for capability_runtime-0.1.5-py3-none-any.whl |
Total release size: 407.1 kB
Release files / capability_runtime-0.1.5.tar.gz
| Download URL | capability_runtime-0.1.5.tar.gz |
|---|---|
| Size | 248.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
114307b0838c4d666fa6dd7561756b9109ba02b5f81b2342d28de1464f99ba22
|
|
BLAKE2b-256 checksum How to use checksums |
3c72a7c645cbf7167dd0bc7efd54c0fd2d9784efa515ff3aac3035ba32c438ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.
Transparency logRelease files / capability_runtime-0.1.5-py3-none-any.whl
| Download URL | capability_runtime-0.1.5-py3-none-any.whl |
|---|---|
| Size | 158.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aad2e8ca0252a084d1dc64e15d48cba654667fdb900039ed13c23332925233b4
|
|
BLAKE2b-256 checksum How to use checksums |
36e9feb1be827edd7a429c256c39eba3a422816db9db81e426dadf9f0c142d5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.
Transparency logSecurity for capability-runtime 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for capability_runtime-0.1.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.