Skip to main content
Scyvera

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.

License Stars Issues PRs Welcome


๐Ÿงฉ 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

scyvera-1.1.1.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

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

scyvera-1.1.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

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

Hashes for scyvera-1.1.1.tar.gz
Algorithm Hash digest
SHA256 78157df9b691e496bb37340c8901839925d87905960dbc813ca87c56149ca24f
MD5 d97f00d419ce4b4fe59a0f95c035d750
BLAKE2b-256 114f19747adcb2c056d1b498c8bd9981722c75e5969f05f0b4e00dad8907de42

See more details on using hashes here.

Provenance

The following attestation bundles were made for scyvera-1.1.1.tar.gz:

Publisher: publish-pypi.yml on Skull-boy/agent-contracts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for scyvera-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 50e836676789704aebb81452d3e38c3f76d8422fd1600b07b2ae1b314ac149bf
MD5 309b9fcf1b2cbe5933966d9a28f4503c
BLAKE2b-256 5090270c739daefa705febe965df2f457ae3ab538d8a1ae87fa027e4dc5a9b39

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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