Modus AssemblyScript SDK
Learn how to use the Modus AssemblyScript SDK
The Modus SDK provides a set of APIs that allow you to interact with various databases and services in Modus apps written in . It’s designed to work seamlessly with the Modus platform, enabling you to build powerful applications with ease.
The Modus SDKs come in multiple languages, each following the conventions for that language, including its capabilities and limitations. While each SDK provides similar features, the APIs may differ slightly between languages. Be sure to refer to the documentation for the specific SDK you’re using.
Wherever possible, we’ve tried to keep the APIs consistent across languages. However, you may find differences in the APIs due to language-specific constraints.
If you have any questions or need help, please reach out to us via the #modus
channel on the Hypermode Discord server.
Importing the APIs
The Modus AssemblyScript SDK organizes its APIs into namespaces based on their purpose. In your AssemblyScript code, you can import each namespace you’d like to use like this:
Available APIs
We’re constantly introducing new APIs through ongoing development with early users. Please open an issue if you have ideas on what would make Modus even more powerful for your next app!
The following namespaces are available. They’re grouped into categories below for your convenience. Click on a namespace to view more information about its APIs.
Client APIs
Namespace | Purpose |
---|---|
http | Provides access to external HTTP endpoints, including REST APIs and other services |
graphql | Allows you to securely call and fetch data from any GraphQL endpoint |
Database APIs
Namespace | Purpose |
---|---|
dgraph | Access and modify data in a Dgraph database |
mysql | Access and modify data in a MySQL database |
neo4j | Access and modify data in a Neo4j database |
postgresql | Access and modify data in a PostgreSQL database |
Inference APIs
Namespace | Purpose |
---|---|
models | Invoke AI models, including large language models, embedding models, and classification models |
Storage APIs
Namespace | Purpose |
---|---|
collections | Provides integrated storage and vector search capabilities |
System APIs
Namespace | Purpose |
---|---|
console | Provides logging, assertion, and timing functions |
localtime | Allows you to access the user’s local time and time zone |
Was this page helpful?