GOAT SDK Allora Plugin
GOAT (opens in a new tab) (Great On-chain Agent Toolkit) is an
open-source library that lets AI agents interact with blockchain protocols and
smart contracts through their own wallets. The Allora plugin,
@goat-sdk/plugin-allora (opens in a new tab),
gives GOAT-powered agents a tool for fetching future price predictions from the
Allora Network.
Goal
Register the Allora plugin in a GOAT agent so the agent can fetch BTC and ETH price predictions from Allora.
Prerequisites
- A TypeScript agent project built on the GOAT SDK (opens in a new tab)
(
@goat-sdk/core). - An Allora API key — get one for free at developer.allora.network (opens in a new tab).
Steps
1. Install the plugin
npm install @goat-sdk/plugin-allorayarn add and pnpm add work equally.
2. Register the plugin
import { allora } from '@goat-sdk/plugin-allora'
const plugin = allora({
apiKey: process.env.ALLORA_API_KEY,
})Pass the resulting plugin to your GOAT agent's plugin list the same way as any other GOAT plugin — see the GOAT examples (opens in a new tab) for complete agent setups.
The plugin accepts two options:
| Option | Required | Description |
|---|---|---|
apiKey | No, but recommended | Your Allora API key from developer.allora.network (opens in a new tab). |
apiRoot | No | Override the Allora API root URL. Defaults to the public Allora API. |
3. Use the price-prediction tool
The plugin exposes a single tool, getPricePrediction, which fetches a future
price prediction for a crypto asset from the Allora Network. It takes:
| Parameter | Allowed values | Description |
|---|---|---|
ticker | BTC, ETH | The asset to fetch a price prediction for. |
timeframe | 5m, 8h | How far into the future: 5 minutes or 8 hours. |
Once the plugin is registered, your agent can call the tool in response to prompts such as "What will the ETH price be 5 minutes from now?".
Verify
Ask your agent for an ETH price prediction 5 minutes out. The agent should
invoke the getPricePrediction tool and reply with a numeric network
inference from Allora.
Troubleshoot
- Unsupported asset or timeframe — the plugin currently supports only the
BTCandETHtickers and the5mand8htimeframes. - Authentication errors — check that
ALLORA_API_KEYis set in your environment and passed toallora(). Free keys are available at developer.allora.network (opens in a new tab).
Next
- Browse other ecosystem integrations.
- Query inferences directly through the Allora API or the SDKs.
- GOAT resources: Docs (opens in a new tab) · Examples (opens in a new tab) · Discord (opens in a new tab)