Introducing Actions SDK
Today we present Actions SDK, a Python-based toolkit designed to facilitate the integration of ML into web3 workflows.
Feb 7, 2024
Fran Algaba
Co-founder & CEO
Introducing Actions SDK
We have recently shared our AI Actions vision, geared towards evolving web3 capabilities by establishing a bridge to the machine learning ecosystem, practically allowing ML engineers to work with web3 data in order to provide high-performance solutions for web3 use-cases.
Today we present: Actions SDK, a Python-based toolkit designed to facilitate the integration of machine learning into web3 workflows, constituting the core of the AI Actions framework. It enables developers to create and manage Actions, which are the primary units of functionality for embedding ML behaviors into web3 processes.
The Driving Force Behind AI Actions
Actions SDK is at the heart of AI Actions, designed to facilitate the creation and management of ZKML workflows. The SDK is built in pure Python, simplifying the development of Actions, the fundamental units within the AI Actions framework, crucial for building trust-minimized and scalable ML solutions for web3, a task that has traditionally posed significant challenges for web3 protocols.
Actions are the primary units of functionality within the AI Actions framework, serving as the orchestrators, coordinating the various tasks and model interactions in a streamlined manner. Actions represent the high-level logic of the workflow, dictating how different components interact to achieve the desired outcome.
Tasks: Modular Building Blocks
Tasks within the Actions SDK are discrete units of work that are orchestrated by Actions. These modular components allow developers to break down complex operations into smaller, manageable segments. Tasks handle specific functionalities or processing steps within the broader Action, providing clarity and structure to the workflow process. Structuring Tasks as workflows inside an Action is a simple process as seen in the definition below:
Simply import the Actions SDK Python library and you can start creating ZKML workflows using Python primitives. Actions and tasks are both defined as Python functions where we add decorators to juice additional functionalities for Actions without adding complexities for users. In the Action's decorated function you will need to specify which execution order your tasks will follow.
Models: Making ZKML Accessible
A Model within the Actions SDK is a sophisticated entity designed to serve trained machine learning (ML) models as an integral part of an Action. The primary function of a Model is to facilitate the deployment and execution of verifiable ML models, making them an accessible and efficient tool for a wide range of applications, particularly for users who want to integrate verifiable ML capabilities into their workflows easily.
To use Models you need to first create a Deployment for a ML model that is transpiled and tracked in Giza. A Deployment creates a real-time ZKML endpoint for verifiable ML inferences. Doing verifiable ML inferences for your model is as simple as just setting the parameter verifiable=True when executing the predict function of your model. You can follow our how-to-guide to get started using Models.
Workspaces: Unified Management and Monitoring
The Workspace UI is a vital addition to the Actions SDK, providing a unified platform for managing and monitoring Actions, Tasks, and Deployments. It offers a user-friendly interface for developers to oversee their workflows, enhancing the overall development experience with intuitive navigation and real-time insights.
Democratizing ML in web3
As we have discussed previously, the development of meaningful machine learning applications requires highly specialized talent. Actions SDK within the AI Actions framework is an effort to democratize ML in the web3 space by lowering the barriers for such specialized talent to interact with web3. It provides a comprehensive and accessible toolkit, opening new avenues for innovation in web3 ML development. The SDK serves as a bridge, reducing the skill gap by making ZKML accessible to AI developers.
Conclusion
Adoption of machine learning in decentralized applications is not a singularly technical challenge which can be solved only by optimizing proof overhead. It requires a holistic approach which is sentient of particularities around building production-grade ML systems. With this mission, Giza will keep building core components to establish the foundations of a web3 AI ecosystem and streamline the provision of useful ML applications. Along with Datasets, Actions SDK is part of the vision of tackling the adoption challenges in a systematic fashion.
To start building the future of ML in web3 using Actions SDK go to our documentation and join the community in our Discord.