@fidesbuild/sdk
v0.2.4
Published
FIDES TypeScript SDK: create and verify FIDES, build, simulate and execute agent workflows.
Maintainers
Readme
@fidesbuild/sdk
FIDES is a Transaction Builder for autonomous agents. It builds complete agent transaction flows across MCP, x402 and onchain actions, with authorization built into the execution path.
Get started
npm install @fidesbuild/sdk viem
npx @fidesbuild/sdk initinit sets up an agent in the current folder: the agent key (saved to .env, holding no funds), a starter with one short example for each use, an npm script for each, and the link where the owner signs the agent's limits. Then fund the FIDES Account the app shows, and:
| Command | What it shows |
| --- | --- |
| npm start | A guided tour: signing, funding, then every example below, asking before anything is sent |
| npm run transfer | Payments, with one over the budget blocked |
| npm run call | A contract call the FIDES allows, and one it does not |
| npm run paid-api | Buying from a paid API, paid from the budget |
| npm run mcp | MCP tool calls checked against the FIDES |
| npm run net | Charges and refunds netted and settled once (FIDES NET) |
| npm run receipts | Everything executed, and the budget left |
Each plans and simulates first and sends nothing; add -- --send to execute. Gas is paid by the hosted relayer.
In your own code
import { createFidesClient, Fides } from "@fidesbuild/sdk"
const client = createFidesClient({ chainId: 4663, rpc }) // Robinhood Chain mainnet; contract addresses are built in
const fides = Fides.load(signedFides, { client, agent })
const plan = await fides.build(actions)
await plan.simulate()
await plan.execute()The owner signs one FIDES: agent key, spend limits, allowed contracts and functions, allowed services, a maximum number of actions and an expiry. The agent's actions are built into one execution plan, every action is checked against the FIDES, compatible calls are grouped, and only the required transactions are sent.
Links
- Docs: https://fidesbuilder.xyz/docs
- Contract addresses: https://fidesbuilder.xyz/docs#/deployments
- App: https://fidesbuilder.xyz/app
MIT licensed.
