Skip to main content

Computational Theseus Toolkit — Identity Continuity Guardrails for Agentic Systems

Project description

Computational Theseus Toolkit (CT Toolkit)

Identity Continuity Guardrails for Agentic Systems

Python 3.11+ License: Apache 2.0 PyPI version Documentation

CT Toolkit is an open-source security layer designed to preserve the identity continuity of AI agents over time. It implements the Nested Agency Architecture (NAA) framework to prevent Sequential Self-Compression (SSC) in multi-agent hierarchies.


📖 Official Documentation

For full API reference, architecture details, examples, and integration guides, visit our documentation site: 👉 https://hakandamar.github.io/ct-toolkit/


Why CT Toolkit?

In complex agentic workflows, LLMs tend to "drift" from their original instructions. CT Toolkit provides the mathematical and cryptographic guardrails to ensure your agents remain aligned with their core constitution, even across deep hierarchies.

  • Constitutional Kernels: Axiomatic identity anchors.
  • Divergence Engine: Multi-tiered drift analysis (L1/L2/L3).
  • Hierarchical Propagation: Mother-to-child constraint inheritance.
  • Provenance Log: Immutable HMAC-signed interaction history.

Quick Start

pip install ct-toolkit
from ct_toolkit import TheseusWrapper

# One-line injection for any LLM provider
client = TheseusWrapper(provider="openai")

# Guardrails and drift analysis applied automatically
response = client.chat("What are your core security axioms?")

print(response.content)
print(f"Divergence Score: {response.divergence_score}")

🚦 Project Health & Status

Metric Status
Tests ✅ 218/218 passing (93% coverage)
Last Phase ✅ Phase 4: OS Support, Deep Agents & Alerts (Complete)
Current Goal 🔶 Phase 5: Vault and Security Infrastructure

For a detailed breakdown of the 8-phase roadmap, see PROJECT_STATUS.md.

Framework & Model Support

Seamlessly integrate with your favorite frameworks and local models:

  • Local Models: Support for LM Studio, Ollama, and local Qwen/Llama endpoints.
  • LangChain & Deep Agents: wrap_deep_agent_factory.
  • CrewAI: TheseusCrewMiddleware.apply_to_crew.
  • AutoGen: register_reply hooks.

Theoretical Foundation

Translating the framework proposed in The Computational Theseus (2025) into engineering practice.


License

Apache License 2.0.

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

ct_toolkit-0.3.0.tar.gz (54.9 kB view details)

Uploaded Source

Built Distribution

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

ct_toolkit-0.3.0-py3-none-any.whl (62.4 kB view details)

Uploaded Python 3

File details

Details for the file ct_toolkit-0.3.0.tar.gz.

File metadata

  • Download URL: ct_toolkit-0.3.0.tar.gz
  • Upload date:
  • Size: 54.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ct_toolkit-0.3.0.tar.gz
Algorithm Hash digest
SHA256 91ea1b11b2c075f71e9e3e843ae7dc02073ce3894c0a64b0741c56465ebf381f
MD5 a05090b46391d069a85b4ea640298910
BLAKE2b-256 c2de1d1cfcc5bf888983255cfea52e189b7cee78ea409f0e280df30fb9f99a5f

See more details on using hashes here.

File details

Details for the file ct_toolkit-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: ct_toolkit-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 62.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ct_toolkit-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6cc37a5d61dcbd1d11df4da9c31e556fe1a05730f88164de581c9b02cb1bd58
MD5 ab8ea930da5bad6a6b7ced18278d6e4e
BLAKE2b-256 2ce981b65904b08ce2e010de39ad33815d2e10e0085bc988f1cf754479bb6edc

See more details on using hashes here.

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