This page documents the hosted Megan SDK — the metered HTTP client for
milestone sessions, disturbance anticipators, and the progress-scalar governor.For megan’s relation chain running in your own process — an instruction
parsed into
aligned → near → grasped → lifted → over → placed, grounded
entities, and per-step guidance — see
Relational megan. It is a different surface with a
different vocabulary, not a newer version of this one, and the hosted API has
no relational routes.MeganTK
The client, bound to one account’s token. Construct once and reuse.
Raises
AuthRequired at construction if no key can be resolved.
Methods
session(...)
anticipator(...)
governor(...)
MeganSession
A live token session. Returned by MeganTK.session(). A context manager —
close() runs on __exit__.
Attributes: session_id: str, objective: str, milestones: list[str],
perception: bool.
Anticipator
A live disturbance anticipator. Returned by MeganTK.anticipator(). A context
manager.
Attributes: anticipator_id: str, actions: list[str].
Governor
A live progress-guided governor. Returned by MeganTK.governor(). A context
manager. The bandit + gating run server-side; you send scalar progress and apply
the returned phi (radians) to your action’s (x, y).
Attributes: governor_id: str.
Decision
Frozen value object returned by step / perceive.
ProtectResult
Frozen value object returned by protect.