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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

archmage_ai-2.0.0.tar.gz (67.0 kB view details)

Uploaded Source

Built Distribution

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

archmage_ai-2.0.0-py3-none-any.whl (53.1 kB view details)

Uploaded Python 3

File details

Details for the file archmage_ai-2.0.0.tar.gz.

File metadata

  • Download URL: archmage_ai-2.0.0.tar.gz
  • Upload date:
  • Size: 67.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for archmage_ai-2.0.0.tar.gz
Algorithm Hash digest
SHA256 ebf96877651511403daf963653e3a23394923993efc56d636bc7f7ebff69a3c6
MD5 1cd8927552a76a87a420996646fed12a
BLAKE2b-256 45649ecbe898dba933de67cb84d814effc7d3bda5d52837b1904f2fe7e7cbd0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for archmage_ai-2.0.0.tar.gz:

Publisher: release.yml on YXZYSME/archmage

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

File details

Details for the file archmage_ai-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: archmage_ai-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 53.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for archmage_ai-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f65998a624f0fd982627ca700ef536a0c2ef051714c7bd87901e6ee100747cc
MD5 6ffa0abf88c66d2fa3d81488aac4d948
BLAKE2b-256 5a846b2c2ef11f649f0f42e059e4f5347199560b870cd76c0ef39c379c965d35

See more details on using hashes here.

Provenance

The following attestation bundles were made for archmage_ai-2.0.0-py3-none-any.whl:

Publisher: release.yml on YXZYSME/archmage

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

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page