Quickstart
Before you begin
Python 3.11 or later must be installed on your machine
Giza CLI must be installed on your machine. You can install it by running
pip install giza-cli
Actions-SDK should be installed with the extra
agents
. You can install it by runningpip install giza-actions[agents]
You must have an active Giza account. If you don't have one, you can create one here.
You must have a model version deployed on Giza as an endpoint. You can follow the tutorial Build a Verifiable Neural Network with Giza Actions to deploy an MNIST model on Giza.
During the tutorial, you will need to interact with the Giza CLI, Ape's framework, and provide multiple inputs, like
model-id
,version-id
,account name
, etc.You have to be logged in to the Giza CLI or have an API KEY.
Setup
Get up and running with Agents! In this quickstart you will learn the basics to get up and running with Agents and Giza Platform. As Agents are an extension of Actions it is encouraged that you are familiarised with it first before jumping right into Agents, for more information here is the Actions documentation.
Before you begin, make sure you have all the necessary libraries installed:
From your terminal, create a Giza user through our CLI in order to access the Giza Platform:
After creating your user, log into Giza:
Optional: you can create an API Key for your user in order to not regenerate your access token every few hours.
To create Actions Runs you will need a Giza Workspace, create it executing the following command in your terminal:
Create your first Agent
To create a new agent an endpoint should have been deployed prior. If you don't have one, please follow this tutorial Build a Verifiable Neural Network with Giza Actions.
Create an Account
The first step will be to create an account (wallet) using Ape's framework this will be the account that we will use to sign the transactions of the smart contract. We can do this by running the following command and providing the required data. It will ask you for a passphrase, make sure to save it in a safe place as it will be used to unlock the account when signing:
We encourage the creation of a new account for each agent, as it will allow you to manage the agent's permissions and access control more effectively, but importing accounts is also possible.
Fund the account
Before we can create an AI Agent, we need to fund the account with some ETH. You can do this by sending some ETH to the account address generated in the previous step.
If you are using Sepolia testnet, you can get some testnet ETH from a faucet like Alchemy Sepolia Faucet or LearnWeb3 Faucet. If you are on mainnet you will need to transfer funds to it.
Create an Agent using the CLI
With a funded account we can create an AI Agent. We can do this by running the following command
The information needed is:
model-id: the id of the model used in the endpoint
version-id: the id of the version used in the endpoint
name: name for the agent
description: an optional description of the agent
This command will prompt you to use an ape account, specify the one that you want to use and it will create the agent.
Now you are set to use an Agent through code and interact with smart contracts
Whatβs next?
Congrats! π Now that youβve completed the Agents quickstart, check out our guides and learn how to do more specific things in our how-to-guides and tutorials. If youβre interested in learning more about Actions core concepts, grab a cup of coffee and take a look at our Conceptual Guides!
Last updated