Scarb Agent simplifies the creation of Cairo programs that interact seamlessly with constrained and unconstrained oracles, enabling developers to prove only the necessary components of their agents.
Scarb Agent is all you need to build provable agents ready for deployment on the Giza platform.
- Provable Cairo Programs: Easily develop Cairo programs to prove the critical logic of your agent.
- Custom Oracles: Design and deploy both constrained and unconstrained oracles that operate concurrently with your Cairo programs.
- Data Preprocessing and Postprocessing: Manage data before and after the execution of Cairo programs.
- Cross-chain Smart Contract Execution: Enhance your Cairo programs with the capability to execute cross-chain smart contracts during its runtime.
- Install
protoc
from gRPC. - Download
scarb
from Software Mansion's repository.
To install Scarb Agent, use the following command:
cargo install --git https://github.com/gizatechxyz/scarb-agent/
Explore the documentation to learn how to get started with Scarb Agent.
Initialize a new project using:
scarb agent-new [PROJECT_NAME]
-
Start the agent server:
cd python python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt python src/main.py
-
In the root of your project, run the agent:
scarb agent-run --args [ARGS_CAIRO_FUNCTION]
To run preprocessing:
- Ensure the Python server is running.
- Use the
--preprocess
flag when running the Scarb agent:scarb agent-run --preprocess --args '{"n": 9}'
To run postprocessing:
- Ensure the Python server is running.
- Use the
--postprocess
flag when running the Scarb agent:scarb agent-run --postprocess --args '{"n": 9}'
This project builds upon the implementation of Cairo-Hints by Reilabs. Special thanks to Reilabs for their contributions to the Cairo ecosystem.