Skip to main content

AXM Logo

AXM — Shared SDK and unified command launcher

CI axm-audit axm-init Coverage PyPI Python 3.12+ Docs


AXM provides the shared Python contracts for AXM tools and the axm command launcher. Install provider packages to add commands; the SDK itself does not ship domain tools or run an MCP server.

Features

  • Shared SDK — AXMTool, ToolResult, discovery metadata, witness contracts, and the tool_node adapter.
  • Lazy CLI discovery — list installed entry points without importing every provider; load the requested command when dispatched.
  • One tool declaration — axm.tools connects a provider to the generic CLI, MCP discovery and tool-node resolution.
  • Small runtime — only Cyclopts is required; ecosystem providers are optional.

Installation

Requires Python 3.12 or newer. In a Python project managed by uv:

uv add axm                  # SDK and launcher; no domain tools
uv add 'axm[init]'           # scaffolding and project checks
uv add 'axm[audit]'          # code quality
uv add 'axm[bib]'            # bibliography provider
uv add 'axm[mcp]'            # MCP server package
uv add 'axm[all]'            # the four optional providers above

With an activated virtual environment, pip install 'axm[init]' is an alternative. Quote extras in shells such as zsh. all does not install every package in the AXM ecosystem.

Quick Start

After uv add axm, create a structured result without installing a provider:

uv run python - <<'PY'
from axm import ToolResult

result = ToolResult(success=True, data={"count": 3}, text="3 items")
print(result.text)
print(result.data["count"])
PY

This prints 3 items followed by 3. Tools return the same contract to expose structured data alongside readable output.

Usage

Unified CLI

With the init extra installed, run from the project environment:

uv run axm --help
uv run axm --version
uv run axm init_check --help
uv run axm init_check --path . --json-output

The catalog depends on installed providers. Use a command's help for its actual options. Generated commands normally print ToolResult.text or fall back to data; the shared --json-output emits the data mapping. Failures remain nonzero. A provider with its own json_output parameter owns that flag's behavior. See the CLI reference.

Shared Python contracts

from axm import AXMTool, ToolResult, tool_node

result = ToolResult(success=True, data={"count": 3}, text="3 items")
assert result.data["count"] == 3

The root also exports ToolMetadata, tool_metadata, ToolNodeError, WitnessRule, WitnessResult, ValidationFeedback and __version__. See the SDK reference and witnesses for their contracts.

How It Works

A provider registers an implementation in its pyproject.toml:

[project.entry-points."axm.tools"]
demo_count = "demo_tools.count:CountTool"

This is an illustrative provider, implemented in the write-a-tool guide. The CLI derives arguments from its execute signature. Only axm.tools extends the unified launcher.

Documentation

The MkDocs home page is docs/index.md; it is separate from this README. The package has a standalone MkDocs configuration and also participates in the workspace site.

Development

This package belongs to the axm-forge workspace.

git clone https://github.com/axm-protocols/axm-forge.git
cd axm-forge
uv sync --all-packages --all-groups
uv run --package axm --directory packages/axm pytest

From packages/axm, build the package documentation with mkdocs build --strict in an environment containing the package's docs dependencies.

Package Structure

src/axm/
  __init__.py          # root SDK exports and version
  cli.py               # command discovery and rendering
  tools/base.py        # tool protocol, result and metadata
  tools/node.py        # tool-node adapter and scoped substitutes
  tools/write_scope.py # internal write-scope decisions
  witnesses.py         # validation contracts
tests_axm/             # package tests
docs/                  # tutorials, guides, reference and explanations

License

Licensed under Apache-2.0. See LICENSE.

Metadata

Release files for axm 0.9.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 axm 0.9.0
File Size Uploaded
axm-0.9.0.tar.gz 55.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for axm 0.9.0
File Interpreter ABI Platform
axm-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 83.4 kB

Release files / axm-0.9.0.tar.gz

Download URL axm-0.9.0.tar.gz
Size 55.7 kB
Tags Source
SHA-256 checksum
How to use checksums
24c63d2562f820e5d20c60cb0aced3dd86bfe7ee0750f4ddde073715919126e6
BLAKE2b-256 checksum
How to use checksums
b2f295065cbfd3fe002b6de2e4586b1f8865f08c63141a0095937e182bc093d8
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 17, 2026.

Transparency log

Release files / axm-0.9.0-py3-none-any.whl

Download URL axm-0.9.0-py3-none-any.whl
Size 27.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47cc16f0abc5560dd1de062da7e86f3c49670745c79541a7d8dfea46eb72e2e2
BLAKE2b-256 checksum
How to use checksums
9f2bf2aea7e4bd37ac603838706a555b58c1f14a7ea13d53758965ed808ad609
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 17, 2026.

Transparency log

Release history Release notifications | RSS feed

0.10.0

2 release files

This release

0.9.0 This release

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

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