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#

ToolWhat it does
heimdall_check_transactionSimulate a transaction and get ALLOW, WARN or DENY with reasons and token moves.
heimdall_check_signatureJudge an EIP-712 or personal_sign request: Permit, Permit2, Seaport and hidden approvals.
heimdall_wallet_checkEvery risky approval a wallet has given, with the USD each spender could take.
heimdall_agent_reputationHow another agent has behaved under Shield: checks allowed, warned and denied.
heimdall_passportHeimdall Score (0-100), tier and ERC-8004 identity of another agent, before you pay or hire it.
heimdall_riskRisk level of any address from Heimdall's list and the onchain Risk Oracle.
heimdall_threatsKnown drainers, the most denied contracts and the community blocklist.
heimdall_pay_jobRead a Heimdall Pay escrow job. Needs a public client and the Pay address.
heimdall_pay_recordA provider's track record: jobs completed, disputed and USDG earned.
heimdall_safe_sendSend from the agent's wallet only when Shield allows it. Needs a wallet; asks for approval in the AI SDK by default.

Options#

OptionMeaning
apiKey, baseUrlShield API key and URL. Without a key you get the free tier.
policyPolicy applied to every check: spend caps, allowed targets, trusted spenders.
walletThe agent's viem wallet. Adds heimdall_safe_send.
allowWarnLet heimdall_safe_send go ahead on WARN. Off by default.
approveSendsAI SDK only: pause for human approval before heimdall_safe_send. On by default.
publicClient, payAddressTurns on the Heimdall Pay tools.
onlyPick 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.