Python API¶
Archetype has one compatibility surface with several levels of abstraction. Most applications only need the runtime, world-handle, and building-block pages.
| Surface | Use it for |
|---|---|
| Runtime | Start here for scripts, notebooks, and applications. A runtime owns process-level services and creates world handles. |
| World handle | Create entities, run simulations, query history, and manage one world. |
| Runtime models | Configuration, result, receipt, and introspection records returned by world operations. |
| Building blocks | Use these types to define component data, processors, and processor resources. |
| Hooks and identity | Bind an actor identity to a world handle and react to world lifecycle events. |
| Configuration | Runtime configuration is user-facing. WorldConfig is primarily for custom hosts and lower-level engine construction. |
| AutoResearch and evaluation | Configure optimization loops and persist evaluation evidence with explicit identities. |
| Service integration | Use the service layer when a host needs explicit authorization, command routing, or custom process wiring. Most scripts should use the runtime instead. |
| Core engine | Supported engine primitives for custom execution and world lifecycle extensions. |
| Storage backends | Supported asynchronous storage implementations for custom engine wiring. |
| Compatibility API | The synchronous educational engine and legacy aliases remain available for compatibility. New application code should use ArchetypeRuntime. |
Public API rule¶
Names exported from archetype are supported compatibility contracts. Types exposed by their public signatures are part of that contract as well. Recommended APIs receive examples and prominent placement; advanced and compatibility APIs remain documented without being presented as the default.
See API stability and docstrings for the full policy.
Compatibility aliases¶
Processoris an alias forSyncProcessor.Worldis an alias forSyncWorld.Systemis an alias forSyncSystem.Storeis an alias forSyncStore.Querieris an alias forQueryManager.Updateris an alias forUpdateManager.