Agent frameworks
Native Heimdall tools for the Vercel AI SDK, LangChain and ElizaOS. Same names, inputs and answers in every framework, and no MCP server to run.
Install#
Terminal
npm i @heimdallfund/agent-kit
Install the framework you already use next to it. The kit only loads the adapter you import.
Add it to your agent#
TypeScript
import { generateText } from "ai";
import { heimdallAiTools } from "@heimdallfund/agent-kit/ai-sdk";
const { text } = await generateText({
model,
tools: heimdallAiTools({ wallet }), // wallet adds heimdall_safe_send
prompt: "Swap 50 USDG for NVDA",
});Answers are kept short for the model: the verdict, the reasons that matter and what each token does, plus a line of advice. A DENY always says not to sign.
Tools#
| Tool | What it does |
|---|---|
heimdall_check_transaction | Simulate a transaction and get ALLOW, WARN or DENY with reasons and token moves. |
heimdall_check_signature | Judge an EIP-712 or personal_sign request: Permit, Permit2, Seaport and hidden approvals. |
heimdall_wallet_check | Every risky approval a wallet has given, with the USD each spender could take. |
heimdall_agent_reputation | How another agent has behaved under Shield: checks allowed, warned and denied. |
heimdall_passport | Heimdall Score (0-100), tier and ERC-8004 identity of another agent, before you pay or hire it. |
heimdall_risk | Risk level of any address from Heimdall's list and the onchain Risk Oracle. |
heimdall_threats | Known drainers, the most denied contracts and the community blocklist. |
heimdall_pay_job | Read a Heimdall Pay escrow job. Needs a public client and the Pay address. |
heimdall_pay_record | A provider's track record: jobs completed, disputed and USDG earned. |
heimdall_safe_send | Send from the agent's wallet only when Shield allows it. Needs a wallet; asks for approval in the AI SDK by default. |
Options#
| Option | Meaning |
|---|---|
| apiKey, baseUrl | Shield API key and URL. Without a key you get the free tier. |
| policy | Policy applied to every check: spend caps, allowed targets, trusted spenders. |
| wallet | The agent's viem wallet. Adds heimdall_safe_send. |
| allowWarn | Let heimdall_safe_send go ahead on WARN. Off by default. |
| approveSends | AI SDK only: pause for human approval before heimdall_safe_send. On by default. |
| publicClient, payAddress | Turns on the Heimdall Pay tools. |
| only | Pick tools by name. |
ElizaOS settings#
The plugin reads HEIMDALL_API_URL, HEIMDALL_API_KEY and HEIMDALL_PAY_ADDRESS from the character or the environment. Each tool becomes an action with typed parameters, such as HEIMDALL_CHECK_TRANSACTION.