Skip to main content

Bridge/glue layer that composes Agently (LLM/TriggerFlow) with skills-runtime-sdk (skills/tools/WAL/events).

Project description

capability-runtime

capability-runtime is a production-oriented runtime/adapter layer that exposes a stable Runtime API while composing two upstream systems:

  • skills-runtime-sdk for skills, tools, approvals, WAL, and event evidence
  • Agently for OpenAI-compatible transport and TriggerFlow-based orchestration internals

The public contract of this repository is intentionally narrow:

  • capability primitives: AgentSpec and WorkflowSpec
  • execution entrypoint: Runtime
  • evidence surface: NodeReport, host snapshots, and service-facade helpers

What You Get

  • A single execution surface: Runtime.run() and Runtime.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 wait/resume, approval tickets, continuity, and service streaming

Architecture At A Glance

                           +-----------------------------+
                           | Host Application            |
                           | - register capabilities     |
                           | - run / stream / continue   |
                           +--------------+--------------+
                                          |
                                          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.

3. Workflow orchestration

python examples/02_workflow/run.py

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,
    AgentSpec,
    AgentIOSchema,
    WorkflowSpec,
    Step,
    LoopStep,
    ParallelStep,
    ConditionalStep,
    InputMapping,
    CapabilitySpec,
    CapabilityKind,
    CapabilityResult,
    CapabilityStatus,
    NodeReport,
    HostRunSnapshot,
    ApprovalTicket,
    ResumeIntent,
    RuntimeServiceFacade,
    RuntimeServiceRequest,
    RuntimeServiceHandle,
    RuntimeSession,
)

The runtime currently supports three execution modes through RuntimeConfig.mode:

  • mock: deterministic local testing without a real LLM backend
  • bridge: Agently transport + skills-runtime-sdk execution semantics
  • sdk_native: native skills-runtime-sdk backend without Agently transport

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

Recommended reading order for new users:

  1. help/00-overview.md
  2. help/01-quickstart.md
  3. help/03-python-api.md
  4. examples/README.md

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-sdk remains the source of truth for skills, approvals, tools, WAL, and event evidence.
  • Agently remains the transport/orchestration substrate where this repository chooses to bridge instead of forking or reimplementing.
  • capability-runtime is the contract-convergence layer: it narrows those upstream capabilities into a smaller host-facing runtime surface.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

capability_runtime-0.1.3.post1.tar.gz (189.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

capability_runtime-0.1.3.post1-py3-none-any.whl (129.3 kB view details)

Uploaded Python 3

File details

Details for the file capability_runtime-0.1.3.post1.tar.gz.

File metadata

  • Download URL: capability_runtime-0.1.3.post1.tar.gz
  • Upload date:
  • Size: 189.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for capability_runtime-0.1.3.post1.tar.gz
Algorithm Hash digest
SHA256 20c6d9051a564e26d97cad8905e03008327a0c1af09be9aaffef7928e8db4b98
MD5 6b0f451f9648e9add42ba259268acd79
BLAKE2b-256 fee676e9363d50a356c80a00308580776bff5366288d8d0576b186272c9d9b9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for capability_runtime-0.1.3.post1.tar.gz:

Publisher: publish-pypi.yml on okwinds/capability-runtime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file capability_runtime-0.1.3.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for capability_runtime-0.1.3.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 03b3690f68dde8d589a44b12089780a77233275560889286ca931a5a0f905e41
MD5 9e899a969c0bd599733870e6e5279f36
BLAKE2b-256 704c4711e241d2129d9abeb33c0878a7757c02ea3bd7444235c5ff49c58d3a75

See more details on using hashes here.

Provenance

The following attestation bundles were made for capability_runtime-0.1.3.post1-py3-none-any.whl:

Publisher: publish-pypi.yml on okwinds/capability-runtime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page