Install Extras
Edictum has zero required dependencies. Install only what you need with pip extras.
Right page if: you need to decide which pip install edictum[...] extras to use, or want to understand what each extra installs. Wrong page if: you need framework-specific adapter setup -- see https://docs.edictum.ai/docs/adapters/overview. For getting started quickly, see https://docs.edictum.ai/docs/quickstart. Gotcha: the base install has zero dependencies and only supports Python contracts. Most users want edictum[yaml] at minimum. The Claude SDK and Nanobot adapters need no framework-specific extra -- edictum[yaml] is sufficient.
Edictum has zero required dependencies. The base install gives you the core pipeline and Python contract support. Everything else is opt-in through pip extras.
Quick Start
Most users want YAML contracts:
pip install edictum[yaml]Need observability too? Combine extras with commas:
pip install edictum[yaml,otel]Want everything:
pip install edictum[all]All Extras
| Extra | What It Installs | What It Enables |
|---|---|---|
| (base) | Nothing | Core pipeline, Python contracts, Principal, Edictum class |
yaml | PyYAML, jsonschema | YAML contract files (Edictum.from_yaml()) |
otel | opentelemetry-api, opentelemetry-sdk, opentelemetry-exporter-otlp | OTel traces and metrics for every tool call |
cli | Click, Rich, plus edictum[yaml] | The edictum command-line interface |
server | httpx, httpx-sse | Server SDK for connecting agents to Edictum Console |
langchain | langchain-core | LangChain adapter |
crewai | crewai | CrewAI adapter |
agno | agno | Agno adapter |
semantic-kernel | semantic-kernel | Semantic Kernel adapter |
openai-agents | openai-agents | OpenAI Agents SDK adapter |
all | Everything above | Full install |
Choosing Your Extras
Base Install (zero dependencies)
pip install edictumUse this when you write contracts as Python functions and do not need YAML files. The core Edictum class, Principal, pipeline, and all contract types work without any dependencies.
from edictum import Edictum, Principal
guard = Edictum()
@guard.pre(tools=["read_file"])
def block_dotenv(tool_name, args, principal):
if args.get("path", "").endswith(".env"):
return "Sensitive file denied."YAML Contracts
pip install edictum[yaml]This is the most common install. Adds PyYAML for parsing contract files and jsonschema for validating them against the Edictum schema. Required for Edictum.from_yaml(), Edictum.from_yaml_string(), and the contract generator.
Observability
pip install edictum[yaml,otel]Adds the OpenTelemetry SDK and OTLP exporter. Every tool call evaluation emits an edictum.evaluate span with attributes like edictum.tool, edictum.verdict, edictum.contract_id, and edictum.environment. See the telemetry reference for the full attribute list.
CLI
pip install edictum[cli]Installs the edictum command with validate, check, test, diff, and replay subcommands. The cli extra automatically pulls in yaml (the CLI needs to parse YAML files). See the CLI reference for usage.
Server SDK (Console)
pip install edictum[server]Adds httpx and httpx-sse for connecting agents to a running Edictum Console instance. This enables remote contract management, human-in-the-loop approvals, fleet monitoring, and centralized audit feeds.
Framework Adapters
Install the extra matching your AI framework:
pip install edictum[langchain] # LangChain
pip install edictum[crewai] # CrewAI
pip install edictum[agno] # Agno
pip install edictum[semantic-kernel] # Semantic Kernel
pip install edictum[openai-agents] # OpenAI Agents SDKEach extra installs only the framework's core library as a dependency. You still need the framework itself installed in your project. The extras ensure version compatibility.
Claude SDK and Nanobot
The Claude SDK and Nanobot adapters do not require framework-specific extras. They work with the base install (or edictum[yaml] if using YAML contracts).
Common Combinations
| Scenario | Install Command |
|---|---|
| YAML contracts, no framework | pip install edictum[yaml] |
| LangChain agent with YAML contracts | pip install edictum[yaml,langchain] |
| CrewAI agent with observability | pip install edictum[yaml,crewai,otel] |
| CI/CD contract validation | pip install edictum[cli] |
| Agent connected to Console | pip install edictum[yaml,server] |
| Full development setup | pip install edictum[all] |
| Python-only contracts, minimal footprint | pip install edictum |
Version Constraints
Each extra specifies minimum compatible versions:
| Extra | Minimum Version |
|---|---|
yaml | PyYAML >= 6.0, jsonschema >= 4.20 |
otel | opentelemetry-api/sdk/exporter >= 1.20.0 |
langchain | langchain-core >= 0.3 |
crewai | crewai >= 0.80 |
agno | agno >= 1.0 |
semantic-kernel | semantic-kernel >= 1.0 |
openai-agents | openai-agents >= 0.1 |
server | httpx >= 0.27, httpx-sse >= 0.4 |
cli | Click >= 8.0, Rich >= 13.0 |
Next Steps
- Quickstart -- get running with YAML contracts in 5 minutes
- Adapter overview -- choosing the right adapter for your framework
- CLI reference -- command-line tools for contract validation and testing
- Telemetry -- configuring OpenTelemetry export
- Connecting agents to Console -- the server SDK
Last updated on