Skip to main content

charter-integration-sdk

Protocol and integration contract package for Charter. Install this when you are building an integration and want the shared message models and WorkflowIntegration interface without pulling in the runtime or CLI.

pip install charter-integration-sdk

Use This Package When

  • You are authoring a Charter integration in Python.
  • You need the JSON-RPC message models used by subprocess integrations.
  • You want to validate integration inputs and outputs against the same contract the runtime uses.

For workflow authoring, project config, and end-to-end run examples, see the main Charter README.

What charter-integration-sdk Provides

  • WorkflowIntegration, ResolvedStep, and StepContext
  • WorkflowIntegration plus typed config-model discovery for Python integrations
  • JSON-RPC request/response models for setup, execute, and teardown
  • shared output-type definitions used by integrations and the runtime

What It Does Not Do

  • It does not run workflows; that belongs to charter-core.
  • It does not manage projects, install requirements, or resolve capabilities; that belongs to charter-cli.

Python Provider Skeleton

from pydantic import BaseModel

from typing import Any

from charter_integration_sdk import ResolvedStep, StepContext, WorkflowIntegration


class MyConfig(BaseModel):
    api_token: str


class MyIntegration(WorkflowIntegration):
    config: MyConfig

    async def execute(self, step: ResolvedStep, context: StepContext) -> Any:
        instruction = step.with_config["prompt"]
        inputs = context.inputs

        result = do_work(instruction, inputs, api_token=self.config.api_token)
        return result

step contains the runner-normalized step definition. The integration receives the merged config at execute time; it is responsible for deciding which fields apply at setup vs invocation. context.inputs is the resolved input map your integration should actually use at execution time.

context.outputs and context.named_outputs are convenience views over prior step outputs, but artifact-backed values are only guaranteed to be hydrated when the current step declares them in inputs:. For undeclared artifact dependencies, those views may still contain artifact refs rather than full payloads.

Subprocess Protocol

Subprocess-backed integrations speak newline-delimited JSON-RPC 2.0 over stdin / stdout:

→ {"jsonrpc":"2.0","id":"1","method":"setup","params":{"run_id":"abc123"}}
← {"jsonrpc":"2.0","id":"1","result":{"ok":true}}

→ {"jsonrpc":"2.0","id":"2","method":"execute","params":{"step":{...},"context":{...}}}
← {"jsonrpc":"2.0","id":"2","result":{"value":"some value"}}

→ {"jsonrpc":"2.0","id":"3","method":"teardown","params":{}}
← {"jsonrpc":"2.0","id":"3","result":{"ok":true}}

The matching models are available from charter_integration_sdk.messages:

from charter_integration_sdk.messages import (
    ExecuteParams,
    ExecuteResult,
    JsonRpcRequest,
    JsonRpcResponse,
    SetupParams,
    SetupResult,
    TeardownParams,
    TeardownResult,
)

Entry Point Registration

If you package a Python integration for uses: resolution, register it under the charter.integrations entry-point group:

[project.entry-points."charter.integrations"]
my_llm = "my_package.integrations:MyIntegration"
stripe_api = "my_package.integrations:StripeIntegration"

Charter discovers uses: integrations from installed package metadata at runtime, so the integration package must be installed in the active environment.

Public API Highlights

from charter_integration_sdk import (
    ExecuteParams,
    ExecuteResult,
    JsonRpcRequest,
    JsonRpcResponse,
    ResolvedStep,
    SetupParams,
    SetupResult,
    StepContext,
    TeardownParams,
    TeardownResult,
    WorkflowIntegration,
    integration_config_model,
)

Metadata

Release files for charter-integration-sdk 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for charter-integration-sdk 0.0.1
File Size Uploaded Provenance
charter_integration_sdk-0.0.1.tar.gz 4.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for charter-integration-sdk 0.0.1
File Interpreter ABI Platform
charter_integration_sdk-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 kB

Release files / charter_integration_sdk-0.0.1.tar.gz

Download URL charter_integration_sdk-0.0.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7919cce4f1c70df40d6b164996ab51707a9a9190dbbc7e2d720e56fc9d16ec5d
BLAKE2b-256 checksum
How to use checksums
3b72dd7a5f252bfab9400e5b60767889c0f9824d62d0eb75230742c16872cf7a
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 May 18, 2026.

Transparency log

Release files / charter_integration_sdk-0.0.1-py3-none-any.whl

Download URL charter_integration_sdk-0.0.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b8426da34daec1ccabe5b87ba38b8e3bdf10a0909fb3be9c649affa0562fbaa
BLAKE2b-256 checksum
How to use checksums
bfb8de639f6a49ba441b87d985c784299d28a9b380ff5048360108a547f5ea2c
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 May 18, 2026.

Transparency log

Security for charter-integration-sdk 0.0.1

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.

Select from 2 files

Attestation for charter_integration_sdk-0.0.1.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 May 18, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page