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.0rc1 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.0rc1:
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 32 runtime packages on Linux and Windows beyond the core's 5 (37 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 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
- Integrating conduit: settings, start-up, task classes, catalogue overlays, residency, events and capture, the agent runner and the sync facade.
- Setting up providers and embeddings.
- Writing backends, their conformance suites, and evaluating agent tasks.
- Skills, MCP servers, compaction, audit and telemetry and the terminal interface.
- Adoption notes for products moving onto conduit.
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.0rc1
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 |
|---|---|---|---|---|
| cognisn_conduit-0.1.0rc1.tar.gz | 761.0 kB | With provenance | Details for cognisn_conduit-0.1.0rc1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cognisn_conduit-0.1.0rc1-py3-none-any.whl | Python 3 | none | any | Details for cognisn_conduit-0.1.0rc1-py3-none-any.whl |
Total release size: 1.1 MB
Release files / cognisn_conduit-0.1.0rc1.tar.gz
| Download URL | cognisn_conduit-0.1.0rc1.tar.gz |
|---|---|
| Size | 761.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f333e1a361d895b9f7af2b2cd6d992a0d4b650bfc1ce293a9ea70b43e1dc53f0
|
|
BLAKE2b-256 checksum How to use checksums |
7f745bb364a6c3a778bf71a86a0d1d89348688c04307a2a5b1e6b85570c5f6a8
|
| 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 7, 2026.
Transparency logRelease files / cognisn_conduit-0.1.0rc1-py3-none-any.whl
| Download URL | cognisn_conduit-0.1.0rc1-py3-none-any.whl |
|---|---|
| Size | 347.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b2cd1a7e6ad173b84533960c0a670d4c34a210fb431cfa697959e006fa2a0299
|
|
BLAKE2b-256 checksum How to use checksums |
4889b4e7fd0ab45760d8921a4ae2728158c585fe09369f9142f9166a254adbd4
|
| 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 7, 2026.
Transparency logSecurity for cognisn-conduit 0.1.0rc1
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.
Attestation for cognisn_conduit-0.1.0rc1.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 7, 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.