Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

conduit

One AI integration layer for Cognisn products.

conduit gives a Python product model providers, a model catalogue with residency policy, streaming, prompt caching, normalised usage, an agent runner with budgets and hand-off, compaction, skills, an MCP client, embeddings, product-supplied storage, and audit and monitoring events. It supplies the mechanisms; each product keeps its own policy (its prompts, guardrails, approvals and billing).

Status

Release candidate. conduit 0.1.0rc4 is on PyPI as a pre-release, built from the release/v0.1.0 branch. Every layer described here is built and tested; the public API may still change before 0.1.0 if testing of the release candidate finds a problem.

Design in brief

  • Async first. Every interface is async, and every provider streams. A supported sync facade runs calls on an event loop conduit owns.
  • Layered, with optional extras. The core is always installed and depends on pydantic alone. Every provider SDK and every layer's own dependencies are optional extras, and dependencies point one way: upper layers depend on the core, never the reverse.
  • Checked at start-up. The product declares its task classes with capability floors, assigns a provider and model to each, and states its residency policy. An undeclared model, a model below a floor, an assignment that would breach residency, or a credential written in plain text is refused at start-up, before any client exists, never part-way through a task.
  • One funnel for every model call. Every call passes through the provider registry, which holds it to its assignment and emits exactly one finished event with its usage, however the call ends.
  • Usage you can bill. Every usage figure carries input, output, cache-read and cache-write tokens separately.
  • Content stays out of events by default. Events carry identifiers, hashes, sizes and outcomes; prompt and tool content is recorded only when the product opts in.
  • Storage-agnostic. Products supply their own transcript store, event sink, skill source, secret resolver, approval handler and MCP token store, with a conformance test suite for each store and source. In-memory, local JSON file and SQL reference backends are provided.

Requirements

Python 3.12 or later.

Installation

The PyPI package is cognisn-conduit and the import name is conduit. Until 0.1.0 is final, ask for the pre-release explicitly, with pip install --pre or a pinned version such as cognisn-conduit==0.1.0rc4:

pip install "cognisn-conduit[bedrock]"
uv add "cognisn-conduit[anthropic,mcp]"

The core install and the stub provider need no extra. Setting up providers has install lines for each installer, including CPU-only torch for local embeddings.

Extras

Extra Adds
bedrock Amazon Bedrock provider (Converse; AWS credential chain, access keys as secrets, and Bedrock API keys) and Titan embeddings
bedrock-mantle Single-Region Claude through Amazon Bedrock's mantle endpoint, with Bedrock API keys
anthropic Anthropic provider (direct, and Claude in Microsoft Foundry with an API key or Microsoft Entra ID)
openai OpenAI-compatible provider (OpenAI, X.AI and Microsoft Foundry with an API key or Microsoft Entra ID) and embeddings
gemini Gemini API provider and embeddings
ollama Ollama provider and embeddings
all-providers Every provider above but bedrock-mantle (its two libraries are already in all-providers)
local-embeddings Local embeddings with sentence-transformers on CPU-only torch
mcp MCP client over the official SDK (stdio, streamable HTTP and SSE), with static credentials and an OAuth 2.1 client
sql SQL transcript and token stores (SQLAlchemy; Postgres and SQLite) with their own schema and migrations
konfig konfig settings loader and secret resolver
warden Records conduit events in warden's audit trail (metadata only). The extra installs 33 runtime packages on Linux and Windows beyond the core's 5 (38 in all, as python scripts/licence_audit.py --extra warden counts them; a few fewer on macOS), including psycopg (LGPL-3.0) under its named licence exception and fido2 (BSD-2-Clause with Apache-2.0 and MPL-2.0 files) under its own, in the licence audit
otel OpenTelemetry spans and metrics (the OpenTelemetry API; the product supplies the SDK and exporters)
testing pytest, for the conformance suites' pytest plugin (conduit.testing.conformance)
cli The conduit terminal interface demonstrating the public API (uvx --from "cognisn-conduit[cli]" conduit); installs rich and the mcp extra

The agent runner, compaction, skills and the in-memory and JSON stores are part of the core install.

A first call

This runs as it stands, against the stub provider:

import asyncio

from conduit import ConduitSettings, LiteralSecretResolver, Message, TaskClass, start
from conduit.providers import builtin_factories

settings = ConduitSettings.model_validate(
    {
        "providers": {"local": {"kind": "stub", "not_for_production": True}},
        "assignments": {"triage": {"provider": "local", "model": "stub-echo"}},
    }
)


async def main() -> str:
    runtime = await start(
        settings,
        task_classes=[TaskClass(name="triage")],
        factories=builtin_factories(),
        secrets=LiteralSecretResolver({}),
    )
    try:
        binding = runtime.for_task("triage")
        response = await binding.provider.complete(
            binding.request(messages=[Message.user("Hello from example.com")])
        )
        return response.text
    finally:
        await runtime.aclose()


assert asyncio.run(main()) == "Hello from example.com"

To call a real model, configure its provider (for example {"kind": "bedrock", "region": "eu-west-2"}), assign one of its models, and use an EnvironmentSecretResolver or your own resolver for its credentials.

Import the core's names (types, settings, events, errors, tools, transcript entries and backend models) from conduit itself, and each layer's names from its package: conduit.agent, conduit.stores, conduit.mcp, conduit.providers.bedrock and so on. Importing conduit loads the core alone.

Guides

The full design is in docs/design/architecture.md.

Development

pip install -e ".[dev,all-providers,bedrock-mantle,cli,konfig,local-embeddings,mcp,otel,sql,testing,warden]"
ruff format --check .
ruff check .
mypy --strict
pytest
python scripts/licence_audit.py
python scripts/licence_audit.py --all-extras

The default test run never calls a live model or service. Tests marked integration need live providers and are skipped by default. Every Python example in this README and in the guides is executed by tests/docs/test_guides.py; a guide whose examples need an extra you have not installed is skipped, naming the extra. With every extra installed, set CONDUIT_ALL_EXTRAS=require, as CI does: a missing extra then fails these tests and the event-content tripwire instead of skipping them, and any other value of the variable is refused. The MCP tests' loopback servers take ports the operating system assigns, unless CONDUIT_MCP_TEST_PORT_BASE is set to a slot's base port.

Licence

MIT. Copyright (c) 2026 Cognisn Pty Ltd. See LICENSE.

Metadata

Release files for cognisn-conduit 0.1.0rc4

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

Source distribution (sdist)

Source distribution for cognisn-conduit 0.1.0rc4
File Size Uploaded Provenance Actions
cognisn_conduit-0.1.0rc4.tar.gz 815.7 kB With provenance Details for cognisn_conduit-0.1.0rc4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cognisn-conduit 0.1.0rc4
File Interpreter ABI Platform Actions
cognisn_conduit-0.1.0rc4-py3-none-any.whl Python 3 none any Details for cognisn_conduit-0.1.0rc4-py3-none-any.whl

Total release size: 1.2 MB

Release files / cognisn_conduit-0.1.0rc4.tar.gz

Download URL cognisn_conduit-0.1.0rc4.tar.gz
Size 815.7 kB
Tags Source
SHA-256 checksum
How to use checksums
55077b1fd742d823c9c29ea70b5d67a0a658c977a565ce3bcfba953278403e10
BLAKE2b-256 checksum
How to use checksums
62b38dc4f5c463e91461ba3398320a47f965a09f304e09ef333c28b5cec191fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Release files / cognisn_conduit-0.1.0rc4-py3-none-any.whl

Download URL cognisn_conduit-0.1.0rc4-py3-none-any.whl
Size 368.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf690b5d2b6e00baca98ebc24d7d273aa567d40924ba2a6bbf4e9ae067847338
BLAKE2b-256 checksum
How to use checksums
4b03b4928f7ae21238d414e0067d6c6a9f0839c818c88c37c0c72ae418f566a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Security for cognisn-conduit 0.1.0rc4

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cognisn_conduit-0.1.0rc4.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 Nov 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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