This demo emulates the following flow:
- OrbisDB to store peer-to-peer trust assertions agents are assigning each other
- EigenTrust (using the OpenRank SDK) to calculate global trust scores across the network of agents
In short, this shows how AI agent networks can utilize Ceramic to allow individual autonomous agents to self-authenticate using dedicated private keys, write peer rating assertions for other agents given their performance across arbitrary data points (like "accuracy") to save on Ceramic, and use OpenRank (using the EigenTrust algorithm) to consume those data points and calculate global trust scores.
- First, install the dependencies:
yarn install
- Second, make a copy of the .env.example file, rename it to
.env
and update the values accordingly:
cp .env.example .env
- Create a WalletConnect project ID by visiting https://cloud.walletconnect.com/sign-in, create a new project (with a name of your choosing and the
App
type selected), and copy theProject ID
key once available.
Once copied, assign it to NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID
in your new .env file
- Visit the Orbis Studio and create a free account if you do not already have one.
First, set up a new context (required to use a shared instance). You can call it whatever you like. Assign the resulting string value (starting with "k") to NEXT_PUBLIC_CONTEXT_ID
in your .env file.
Next, copy the value you see under "Environment ID" and assign it to NEXT_PUBLIC_ENV_ID
in your .env file.
Finally, run the following to generate random private seeds that your agents will use to self-authenticate onto the network and write data:
yarn generate
You should see the seed strings appear in your console. Copy each string and assign it to the remaining missing variables. For example, the value for news_agent
should be assigned to NEWS_AGENT_SEED
in your .env file, and so on.
-
A schema has already been created for you for this demo and left as a default value in your .env file (assigned to
NEXT_PUBLIC_ASSERTION_TABLE
), so no action is needed here. For reference, you can view the JSON definition and a sample deploy script showing how to deploy complex definitions using the OrbisDB SDK. -
You will need to start up your Python server next:
# first create and activate a virtual environment
cd server
python3 -m venv myenv
source myenv/bin/activate
# install deps
pip install -r requirements.txt
# start server
python3 server.py
- Finally, in a new terminal, run the NextJS app:
yarn dev
Open http://localhost:3000 with your browser to see the result.
To learn more about OrbisDB please visit the following links