Chainlink for Agents
Uses CRE Connect Data Streams View on GitHub

Set up guardrails for your agent

In this guide you will:

  1. Learn about Chainlink for Agents' guardrails.
  2. Sign up on the Chainlink platform UI.
  3. Link your agent to your organization.
  4. Set up guardrails for your agent on the Chainlink platform.
  5. Create a fresh chain wallet that your agent will use to interact with Chainlink onchain, bound by the guardrails you set up.

Guardrails for your agent must be set up by you (the human) in the Chainlink platform, which separates them from the agent's control. See below for instructions on creating an account and linking your agent.

The platform offers a suite of guardrails to help you control and limit your agent's actions.

  • Agent Restriction: Toggling this on restricts your agent's maximal permission set to just the specific onchain actions that are available to it from Chainlink for Agents. We highly recommend enabling at least Agent Restriction, although best practices would include configuring all guardrails relevant to your operations. With this turned off, your agent won't be restricted by any guardrails at all.
  • Send Limit: Cap the amounts your agent can send/bridge. The platform allows you to configure two types of send limits, in USD:
    • Per Transaction Value Limit
    • 24 Hour Transaction Value Limit
  • Operations: Define the operational boundaries for your agent, such as allowing to only interact with Aave and not Uniswap, or the other way around. We offer the following constraints:
    • Aave - deposits and withdrawals
    • Uniswap - token swaps
    • Token Transfers
    • Bridge using CCIP
  • Transfer and Bridge Allowlist: Limit the addresses your agent can send or bridge tokens to. Your agent's own chain wallets are always allowed, and you can add other addresses to the allowlist.
  1. Go to the Chainlink platform and sign up for an account if you haven't already.

  2. Make sure you have access to the Agents dashboard. Your screen should look something like this. Don't do anything more, you're not quite ready to link your agent to the platform yet.

    Screenshot of the Chainlink platform UI showing the Agents dashboard.

Generate and fund a wallet address for your agent

  1. Just point your agent to the skills repo, and it will set up a new address for you.

  2. Fund the newly created address with some USDC on Base mainnet, to get started.

    Screenshot showing the agent creating its own key and address, and asking you to send a little USDC on Base to that address.
  3. Once your address is funded, simply ask your agent to finish signing up with Chainlink for Agents, and the skills repo should guide your agent as needed.

    Screenshot showing the agent confirming that it's registered with Chainlink for Agents.

Generate a unique token

  1. Now, go to the Agents dashboard of the Chainlink platform, and click on + Link Agent.

  2. Paste your agent's address and click on Generate token.

    Screenshot of the Link Agent form in the Chainlink platform, with fields for your agent's address and a display name, and the Generate token button.
  3. Copy the generated token, and give it back to your agent, simply telling it to continue signing up using the token and the instructions provided by the skills repo.

Complete the linking process

  1. After providing the token to your agent, it will give you back a unique signature payload

    Screenshot showing the agent returning the signature for you to paste into the Chainlink platform.
  2. Take this payload back to the Chainlink platform's UI, and click on Link Agent. This one-time back and forth handshake uniquely links your agent's address to your organization. Any actions your agent does on your behalf, using the skills we provide, will now be configurable using the platform's UI via guardrails.

Set up guardrails

  1. Go to the Chainlink platform's Agents dashboard, and click on Add Guardrails.

  2. Set up minimal guardrails that allow you to follow the tutorial below, without exposing a wider than needed permission set.

    Screenshot of the Chainlink platform's guardrails panel for the agent. Agent Restriction is on. Send Limit is on, with a per-transaction limit of 10 USD and a 24-hour limit of 15 USD. Under Operations, only Uniswap token swaps is on; Aave deposits and withdrawals, Token Transfers, and Bridge using CCIP are off. The Transfer and Bridge Allowlist is off.
  3. Click on Apply Settings and make sure your guardrails are set up.

Create and fund your agent's chain wallet

Give this prompt to your agent to create a fresh, separate chain wallet that it will use to carry out swaps and other onchain operations, bound by the guardrails set up by you in the UI:

Create a chain wallet for yourself on Base and give me its address.

Behind the scenes, Chainlink for Agents deploys the wallet contract on Base, and the agent pays a one-time fee for that deployment. It's the biggest fee-paying operation in this guide.

The chain wallet is a contract, so it has no private key. Each chain gets its own chain wallet, so a chain wallet on another chain has a different address.

Screenshot showing the agent creating a new chain wallet on Base.
  • Send 6 USDC to the freshly created chain wallet on Base Mainnet. You can use BaseScan to track balances.

What's next

Get the latest Chainlink content straight to your inbox.