API Reference
Quick reference for SMRT framework APIs. See documentation for detailed usage.
Core Classes
SmrtObject Base class for persistent entities with AI methodsSmrtCollection Collection manager for querying and batch operationsObjectRegistry Runtime registry for object metadataDispatchBus Inter-agent asynchronous messagingMigrationTracker Database migration managementDecorators & Helpers
@smrt() Register a class with the framework@field() Configure field constraints and validation@meta() Mark field for STI meta storageforeignKey() Define many-to-one relationshiponeToMany() Define one-to-many relationshipmanyToMany() Define many-to-many relationshipAI Methods
Available on all SmrtObject instances.
is() Evaluate criteria against object, returns booleando() Perform action based on instructions, returns stringdescribe() Generate description of objectCollection Methods
create() Static factory to create collection instanceget() Retrieve single object by ID, slug, or filterlist() Query objects with filtering, sorting, paginationcount() Count objects matching criterialistByIds() Batch fetch multiple objects by IDquery() Execute raw SQL querygetOrUpsert() Get existing or create new objectDispatchBus Methods
emit() Emit an event to the dispatch queuesubscribe() Create persistent subscriptionprocess() Process pending dispatches for subscriberretry() Reset failed dispatches for retrycleanup() Delete old dispatchesInternal Tables
_smrt_migrations Framework schema version tracking_smrt_schema_migrations User schema migration tracking_smrt_registry Object metadata persistence_smrt_contexts Remembered context and learned patterns_smrt_embeddings Vector embeddings for semantic search_smrt_dispatch Inter-agent dispatch queue_smrt_dispatch_subscriptions Persistent dispatch subscriptions_smrt_signals Signal history audit logTypeDoc Reference
Full API documentation is generated from source with TypeDoc.