Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

agent-topology-spec

Validate, canonicalize, and hash agent-topology JSON documents in Python 3.11–3.14. This package has no framework dependency and does not install a CLI.

python -m pip install "agent-topology-spec==0.1.0b4"
import json
from pathlib import Path

from agent_topology.spec import compute_structure_hash, validate_document

document = json.loads(Path("topology.json").read_text(encoding="utf-8"))
errors = validate_document(document)
if errors:
    raise ValueError("\n".join(errors))
print(compute_structure_hash(document))
print(document["completeness"])
print(document["producerLimitations"])

Validation checks schema, references, and completeness; it does not verify the recorded hash. canonical_json serializes canonical JSON; finalize_document recomputes the hash and returns a canonical copy. These utilities do not mutate their input or validate it automatically.

To derive documents from compiled Python LangGraph graphs, install agent-topology-langgraph instead. Its specification dependency is installed automatically.

The 0.1 format is provisional. Package versions, document format versions, and hash algorithm versions are independent.

Documentation · Consumer guide · Source and issues

Licensed under the MIT License; see the included LICENSE file.

Join connections (beta.3)

The published beta.3 release exports derived_join_edges(structure); coordinated beta.2 does not. The repository's live installation guides select beta.3.

from agent_topology.spec import derived_join_edges

# After validate_document(document) succeeds:
links = derived_join_edges(document["graphs"][0]["structure"])

The helper returns one fresh {joinId, source, target} record per join source, sorted first by joinId, then by source, using lexicographic Unicode code point order (shorter prefixes first, without normalization or locale collation). Empty joins produce an empty list. Input objects and arrays are not mutated.

Consumers must read both structure.edges and structure.joins. Derived links retain their join identity even when endpoints coincide with another join or a direct edge. They describe the original join's AND convergence: all its sources are required. They do not imply independent edge execution. Keep them separate from ordinary edges; no ordinary edge id or kind is assigned. Validate the containing document at the input boundary; the helper does not validate again.

Metadata

Release files for agent-topology-spec 0.1.0b4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-topology-spec 0.1.0b4
File Size Uploaded Provenance
agent_topology_spec-0.1.0b4.tar.gz 13.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for agent-topology-spec 0.1.0b4
File Interpreter ABI Platform
agent_topology_spec-0.1.0b4-py3-none-any.whl Python 3 none any Details

Total release size: 23.9 kB

Release files / agent_topology_spec-0.1.0b4.tar.gz

Download URL agent_topology_spec-0.1.0b4.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1119bd518165e28a56d6bf006b10b6607dbb792594542552ddf740557ab61050
BLAKE2b-256 checksum
How to use checksums
21c985092a983814e37b7aeeebaee280321966ac1cb42328e431c0adae3dcb5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 15, 2026.

Transparency log

Release files / agent_topology_spec-0.1.0b4-py3-none-any.whl

Download URL agent_topology_spec-0.1.0b4-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8873164617d06baad5914e9a359d039a8b67677a0d6e3a128201d13f47f8c190
BLAKE2b-256 checksum
How to use checksums
24b0d55f753b6e18469192a4b96f6f08d16c5f97bab50489ce1608da5b3833bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 15, 2026.

Transparency log

Security for agent-topology-spec 0.1.0b4

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agent_topology_spec-0.1.0b4.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 Sep 15, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page