Scyvera
Machine-readable, domain-independent, and framework-independent operational contracts for AI agents and automated systems.
MCP and A2A standardize how agents communicate with tools and each other. Scyvera defines the layer above: what an intelligent system can do, what resources it can access, what authority it requires, what constraints apply, what side effects it produces, and how it is governed.
๐งฉ What This Actually Is
Scyvera provides a machine-readable specification and Python tooling layer for defining the operational boundary of intelligent or automated systems.
It is NOT:
- another agent framework
- an LLM wrapper
- an orchestration library
- a coding-agent framework
- a security sandbox or malware scanner
It IS: A framework-independent and domain-independent specification layer describing system identity, capabilities, resources, inputs, outputs, permissions, constraints, side effects, approvals, dependencies, state persistence, failure recovery, replay semantics, observability, artifact trust declarations, and risk.
โก Quickstart
1. Installation
Install locally or in your project virtualenv:
pip install scyvera
# Or for local development:
pip install -e .
2. Command-Line Interface (CLI)
Create a starter Contract template (v1.1)
scyvera init contract.yaml --name "Research Assistant"
Interactive wizard mode:
scyvera init contract.yaml -i
Validate an Agent Contract
The CLI automatically detects the specification version (1 vs 1.1) and validates against the corresponding JSON Schema:
scyvera validate contract.yaml
Output:
PASS contract.yaml
Override with a custom JSON Schema file:
scyvera validate contract.yaml --schema path/to/custom.schema.json
๐ Python API & Programmatic Contract Builder
You can programmatically construct, inspect, serialize, and validate Agent Contracts in Python without manually writing YAML:
from scyvera import Contract, validate_contract
# Programmatically construct a v1.1 Contract
contract = (
Contract(name="Literature Research Assistant", purpose="Analyzes scientific papers")
.set_domain("research")
.add_capability("search_documents", description="Queries research repositories")
.add_resource("paper_db", type="pdf_repository", access="read")
.add_input("research_topic", type="string", required=True)
.add_output("summary", type="document")
.add_permission("paper_db", actions=["read", "search"])
.set_state("session")
.set_recovery("retry")
.set_replay("idempotent")
.set_observability("basic")
.set_risk("low", category="misinformation_risk")
)
# Validate directly in code
result = contract.validate()
if result.valid:
print("Contract is valid!")
# Save to file
contract.save("contract.yaml")
else:
for err in result.errors:
print(f"Error at {err.path}: {err.message}")
Validate an existing YAML file programmatically:
from scyvera import validate_contract
result = validate_contract("contract.yaml")
print(f"Valid: {result.valid}")
๐ Every Implementation Documents a Contract
Instead of prose documentation alone, systems in this repository specify:
- Identity & Purpose โ system identity, operational scope, and system version
- Capabilities โ semantic ability claims
- Resources โ data stores, APIs, entities, or systems accessed
- Inputs & Outputs โ data entering and produced by the system
- Permissions โ exact authorized
{resource, actions[]}combinations - Constraints โ quantitative limits (e.g. rate limits, transaction caps)
- Side Effects โ externally observable mutations
- Approvals โ explicit human or expert approval gates
- Dependencies โ required external services, models, APIs
- State, Recovery, Replay, Observability โ persistence, failure strategy, idempotency, and audit evidence
- Artifact Security & Risk โ model/data artifact trust requirements and risk level classification
๐ Repository Structure
agent-contracts/
โโโ README.md
โโโ WORKFLOW-CONTRACT-SPEC.md
โโโ CONTRIBUTING.md
โโโ CONTRIBUTORS.md
โโโ LICENSE
โโโ pyproject.toml
โโโ docs/
โ โโโ contract-model-v1.1.md # Normative v1.1 Specification
โ โโโ vision.md # Strategic Project Vision
โ โโโ design-principles.md # Normative Design Principles
โ โโโ terminology.md # Specification Terminology
โโโ schemas/
โ โโโ v1/ # Contract v1 JSON Schema
โ โ โโโ contract.schema.json
โ โโโ v1.1/ # Contract v1.1 JSON Schema
โ โโโ contract.schema.json
โโโ examples/
โ โโโ v1.1/ # Domain-Neutral Examples (v1.1)
โ โโโ education-tutor.yaml
โ โโโ research-assistant.yaml
โ โโโ financial-operations.yaml
โ โโโ clinical-information-assistant.yaml
โโโ src/
โ โโโ scyvera/ # Python Package
โ โโโ __init__.py
โ โโโ builder.py # Programmatic Contract Builder API
โ โโโ validator.py # Multi-Version Validator Engine
โ โโโ cli.py # CLI Application (validate, init)
โ โโโ schemas/ # Bundled Package Schemas
โโโ tests/
โ โโโ fixtures/ # Test Fixture Files
โ โโโ test_validator.py # v1 Validator Unit Tests
โ โโโ test_validator_v1_1.py # v1.1 Validator Unit Tests
โ โโโ test_builder.py # Programmatic Builder Unit Tests
โ โโโ test_cli.py # CLI Unit Tests
โโโ implementations/ # Multi-Framework Reference Implementations
โโโ n8n/
โโโ langgraph/
๐ Domain-Neutral Example Contracts (v1.1)
See examples/v1.1/ for runnable, validated v1.1 contracts across different domains:
| Domain | Contract File | Description |
|---|---|---|
| Education | education-tutor.yaml |
Guided study tutor, low risk, session state |
| Research | research-assistant.yaml |
Scientific literature analysis, arXiv API dependency |
| Finance | financial-operations.yaml |
Critical risk, payment caps ($5000 USD limit), controller approval gate |
| Healthcare | clinical-information-assistant.yaml |
High risk, EHR database access, physician approval gate, model integrity requirements |
๐ Security & Governance Boundary Notice
[!IMPORTANT] Contract Declaration โ Security Verification โ Runtime Enforcement. An Agent Contract describes declared operational boundaries. It is not a sandbox, anti-malware scanner, or runtime enforcement proxy. Contract declarations provide structured input upon which external policy engines, verification scanners, and runtime isolation systems operate.
๐บ๏ธ Where the Spec Is Headed (v1.1)
Contract v1 was designed and proven against coding/developer agents. That's now understood to be a starting substrate, not the ceiling โ v1.1 is a deliberate audit-and-redesign effort to make the spec:
- Domain-independent โ usable for research, education, finance, business-workflow, and healthcare-workflow agents, not just coding agents
- Framework-independent โ already true in principle (n8n + LangGraph prove it), being stress-tested further
- Accessible to non-technical authors โ YAML/JSON is a representation format, not meant to be the only way to create a contract
This is genuinely in the design/audit phase โ classifying existing Contract v1 fields, testing them against non-coding agent archetypes, and only then extending the schema. Nothing in this section describes a shipped feature. Follow progress in implementations/rfcs/ and open issues tagged v1.1.
๐ค Contributing
Contributions are welcome โ new domain profiles, framework reference implementations, specification RFCs, or Python API improvements. See CONTRIBUTING.md for details.
๐ License
Distributed under the MIT License โ see LICENSE for details.
Built and maintained by Shinjan Das and open-source contributors โ see CONTRIBUTORS.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scyvera-1.1.1.tar.gz.
File metadata
- Download URL: scyvera-1.1.1.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78157df9b691e496bb37340c8901839925d87905960dbc813ca87c56149ca24f
|
|
| MD5 |
d97f00d419ce4b4fe59a0f95c035d750
|
|
| BLAKE2b-256 |
114f19747adcb2c056d1b498c8bd9981722c75e5969f05f0b4e00dad8907de42
|
Provenance
The following attestation bundles were made for scyvera-1.1.1.tar.gz:
Publisher:
publish-pypi.yml on Skull-boy/agent-contracts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scyvera-1.1.1.tar.gz -
Subject digest:
78157df9b691e496bb37340c8901839925d87905960dbc813ca87c56149ca24f - Sigstore transparency entry: 2392012532
- Sigstore integration time:
-
Permalink:
Skull-boy/agent-contracts@d5f5e711b16095efcea70cd7f62ecca8b822af91 -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/Skull-boy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@d5f5e711b16095efcea70cd7f62ecca8b822af91 -
Trigger Event:
push
-
Statement type:
File details
Details for the file scyvera-1.1.1-py3-none-any.whl.
File metadata
- Download URL: scyvera-1.1.1-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50e836676789704aebb81452d3e38c3f76d8422fd1600b07b2ae1b314ac149bf
|
|
| MD5 |
309b9fcf1b2cbe5933966d9a28f4503c
|
|
| BLAKE2b-256 |
5090270c739daefa705febe965df2f457ae3ab538d8a1ae87fa027e4dc5a9b39
|
Provenance
The following attestation bundles were made for scyvera-1.1.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on Skull-boy/agent-contracts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scyvera-1.1.1-py3-none-any.whl -
Subject digest:
50e836676789704aebb81452d3e38c3f76d8422fd1600b07b2ae1b314ac149bf - Sigstore transparency entry: 2392012667
- Sigstore integration time:
-
Permalink:
Skull-boy/agent-contracts@d5f5e711b16095efcea70cd7f62ecca8b822af91 -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/Skull-boy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@d5f5e711b16095efcea70cd7f62ecca8b822af91 -
Trigger Event:
push
-
Statement type: