Install the Magistry CLI
The CLI ships the SDK, the dry-run sandbox, the migration runner, and the decision_log streamer. Python 3.11+ required; no native deps.
$ pip install magistry-sdk~ 90 seconds
// developer docs
The Magistry SDK is small on purpose. Six concepts cover 90% of integrations — the rest is composing actions on top of a decision_log you can already inspect. Start here, then go deep.
// quickstart
The CLI ships the SDK, the dry-run sandbox, the migration runner, and the decision_log streamer. Python 3.11+ required; no native deps.
$ pip install magistry-sdk~ 90 seconds
Run `magistry connect shopify` and paste a read-only Admin token. The CLI verifies scopes, samples 50 SKUs, and writes a connection row to your workspace.
$ magistry connect shopify --tier=A~ 3 minutes
`magistry cycle --dry-run` ships every phase end-to-end without touching Shopify. Output is a decision_log JSON file you can diff against today.
$ magistry cycle --dry-run --agent=catalog~ 6 minutes
Pick one row from the dry-run output, audit the evidence chain, and promote it. The CLI re-validates ALLOWED_TRANSITIONS and writes back to Shopify.
$ magistry promote --row=dec_01J9X2…~ 30 seconds
// core concepts
The immutable, append-only spine of Magistry. Every action — catalog mutation, ad-budget shift, refund issued, ticket replied — lands as a row with its evidence chain, reversal op, and judge score. Read it like a ledger.
The static state-transition map that gates every catalog write. Every SKU lives in exactly one lifecycle state; invalid moves become operator-review rows, not Shopify mutations. Inspect it before you write a custom executor.
Every action moves through three roles. Planner drafts the move. Judge scores it 0.0–1.0 against the evidence chain. Executor applies it — only if the judge score clears the threshold for that action type.
Tier A (verified cost), Tier B (inferred margin), Tier C (orphan). The tier on a SKU decides what the agent is allowed to do — price changes are A-only; copy edits open up at B; archive needs operator confirm at C.
The full move set the decision_engine can emit. KEEP, SCALE_WINNER, OPTIMIZE_LOSER, DISCOUNT_TEST, DRAFT, VAULT, REVIVE_SEASONAL, FLAG_ORPHAN — each one tied to a trigger, a set of valid from-states, and a pre-stored reversal op.
Kill switch (default-on), per-action rate limits, tier-of-evidence gates, trademark filter, uniqueness check, LLM budget caps, advisory locks. The seven primitives every agent inherits — and the four flags you can tune.
// snippet
# Stream the last 24h of catalog decisions for a store
from magistry import Magistry
client = Magistry(
api_key="sk_live_…", # workspace key
store_id="stk_2YHFZ3WkP6e3xL2", # store handle
)
# decision_log is append-only — pagination is by created_at
for row in client.decisions.stream(
agent="catalog",
since="2026-05-24T00:00:00Z",
limit=200,
):
print(row.action, row.subject, row.judge_score)// versioning + release cadence
Researcher gains Pinterest-trend lane, Catalog gains a per-collection ROAS floor override, and decision_log adds a `parent_id` field for cycle ancestry.
Patch: tightened HMAC-SHA256 webhook clock skew to ±5 minutes, fixed an off-by-one in dayparting windows across DST boundaries.
Disputes opens GA — full Ethoca + Verifi + Visa RDR integration, with replay-from-evidence on every chargeback row.
// developer docs
The SDK is the same one our worker uses in production. Same auth, same rate limits, same audit plane — no shadow surface.
Stable for a year · Versioned changelogs · No silent breaking changes