Skip to main content
ARCHMAGE

ARCHMAGE

saeng-il ai [ research | development | integration ]

Deterministic pre-execution control for coding-agent actions.

CI Python License

Current release: v2.0.0. Python distributions are published as archmage-ai; the portable Agent Plugin is attached separately to the GitHub release.

ARCHMAGE evaluates a proposed tool action before an adapter dispatches it. The runtime converts the proposal into a stable digest, runs deterministic policy evaluators, and emits one typed decision:

ALLOW · ALLOW_WITH_OBLIGATIONS · REPAIR · DENY · ESCALATE

It is designed for coding-agent file writes, command proposals, protected-policy changes, declared scope, artifact lineage, identity, and evidence obligations.

Two-minute example

from dataclasses import replace

from archmage import (
    ActionProposal,
    ActorIdentity,
    PolicyContext,
    create_default_policy_decision_point,
)

pdp = create_default_policy_decision_point()
context = PolicyContext(
    workspace="/workspace/project",
    environment="local",
    audit_logger_configured=True,
)
proposal = ActionProposal(
    task_id="task-42",
    actor=ActorIdentity(actor_id="coding-agent", actor_type="agent"),
    operation="write_file",
    tool="write_to_file",
    arguments={"TargetFile": "../outside.py"},
    target_paths=["../outside.py"],
    requested_side_effects=[],
    repository_revision="0123456789abcdef0123456789abcdef01234567",
    environment="local",
)

blocked = pdp.evaluate(proposal, context)
print(blocked.decision)  # VerdictDecision.DENY

narrowed = replace(
    proposal,
    arguments={"TargetFile": "src/feature.py"},
    target_paths=["src/feature.py"],
)
allowed = pdp.evaluate(narrowed, context)
print(allowed.decision)  # VerdictDecision.ALLOW

The adapter or executor must refuse dispatch unless the returned decision permits it. ARCHMAGE does not independently intercept arbitrary operating-system activity.

Install and verify

Install the signed package release:

python -m pip install archmage-ai

For development from a reviewed checkout:

python -m pip install --editable ".[dev]"
python -m pytest

Release wheels and source distributions are built in GitHub Actions, accompanied by SHA-256 checksums, an SPDX SBOM, and GitHub artifact attestations. Verification instructions are in the supply-chain guide.

Agent Plugin

ARCHMAGE also ships a separate, self-contained Agent Plugins 1.0.0 ZIP. The plugin is an interoperability and distribution adapter: its Agent Skill tells a compatible host when to invoke the bundled MCP tools, while those tools route every decision through the same Python PolicyEnforcementPoint used by native integrations.

The ZIP is deliberately separate from the wheel and source distribution. It is validated against vendored Agent Plugins schemas, smoke-tested directly from an extracted archive, and never submitted to PyPI or Python metadata validation. See the Agent Plugin guide for the trust boundary and installation sequence.

What is included

  • Eleven deterministic core evaluators with fail-closed aggregation.
  • A generic tool-call adapter with explicit identity, workspace, and immutable revision requirements and canonical JSON payload validation.
  • A reference Antigravity adapter.
  • Digest-bound, verifier-backed, single-use approval records for destructive and shell-command obligations.
  • Contract evaluators for interface depth and contract-first Python changes.
  • Reproducible gold-case, repair-loop, policy-drift, and latency benchmarks.
  • An Apache-2.0 licensed skill and doctrine bundle.
  • A portable Agent Plugins 1.0.0 edge adapter with durable JSONL audit records.

Validated release-candidate benchmarks

The latest hosted candidate evidence is produced by the revision-bound CI workflow. Every JSON artifact records the exact commit, case catalog, Python version, and runner platform. Signed release artifacts will supersede this release-candidate snapshot.

Suite Result Scope
Gold-case compliance 13/13 exact; 0 false positives; 0 false negatives Fixed catalog, 11 default evaluators
Repair loop 2/2 compliant after one retry Fixed machine-readable repairs
Indirect-instruction subset 2/2 dangerous proposals denied Tool proposals attributed to untrusted repository text
Full-PDP overhead 0.348455 ms p95; 3,132.472 evaluations/s 5,000 iterations on hosted Linux, CPython 3.13.14

These are deterministic proposal-level results from one recorded environment, not claims of universal agent safety or platform-wide performance. See the benchmark guide and security claims policy.

Security boundary

ARCHMAGE is a policy decision and enforcement library, not a sandbox, firewall, credential vault, malware scanner, or complete prompt-injection defense. Its guarantees depend on every relevant tool call passing through a correctly wired adapter, on the host preventing bypass around that adapter, and on the host authenticating any approval record before its verifier accepts it.

Read limitations before integrating it with privileged tools. Report suspected vulnerabilities through the private route documented in SECURITY.md once that release-gate policy is approved.

Documentation

Contributing

Contribution access is approval-only. Start with a proposal and read CONTRIBUTING.md and ARCHMAGE_RANKS.md. Security-sensitive changes require private disclosure and tests that demonstrate both the blocked path and the expected compliant path.

License

Apache License 2.0. See LICENSE.

Metadata

Release files for archmage-ai 2.0.0

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

Source distribution (sdist)

Source distribution for archmage-ai 2.0.0
File Size Uploaded Provenance
archmage_ai-2.0.0.tar.gz 67.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for archmage-ai 2.0.0
File Interpreter ABI Platform
archmage_ai-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 120.0 kB

Release files / archmage_ai-2.0.0.tar.gz

Download URL archmage_ai-2.0.0.tar.gz
Size 67.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ebf96877651511403daf963653e3a23394923993efc56d636bc7f7ebff69a3c6
BLAKE2b-256 checksum
How to use checksums
45649ecbe898dba933de67cb84d814effc7d3bda5d52837b1904f2fe7e7cbd0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Aug 25, 2026.

Transparency log

Release files / archmage_ai-2.0.0-py3-none-any.whl

Download URL archmage_ai-2.0.0-py3-none-any.whl
Size 53.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f65998a624f0fd982627ca700ef536a0c2ef051714c7bd87901e6ee100747cc
BLAKE2b-256 checksum
How to use checksums
5a846b2c2ef11f649f0f42e059e4f5347199560b870cd76c0ef39c379c965d35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Aug 25, 2026.

Transparency log

Security for archmage-ai 2.0.0

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 archmage_ai-2.0.0.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 Aug 25, 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.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files Full provenance

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