Skip to Content
Agent Quickstart

Agent Quickstart

Set up your DeFi protocol on contract.dev using Claude Code, Codex, Cursor or another coding agent.

Our CLI and agent skill give your agent access to contract.dev, allowing it to discover your contracts, configure your workspace and investigate on-chain activity using natural language.

In this guide, you’ll:

  1. Create a contract.dev workspace.
  2. Install the CLI and agent skill.
  3. Set up your protocol with a single prompt.
  4. Review and approve your agent’s setup.

Once configured, you can ask your agent questions, create metrics and tables, and set up reports and alerts.

1. Create a workspace

Sign in to the contract.dev app and create a workspace for your protocol.

A workspace brings together your watched contracts and wallets, their on-chain data, metrics, tables and notifications.

2. Install the CLI and agent skill

Install the contract.dev CLI:

npm install -g @contract-dev/cli

Then log in:

contract-dev login

This shows a one-time code and opens the contract.dev app, where you approve the sign-in.

After signing in, you’ll be offered the option to install the contract.dev agent skill. Press Enter to install it.

The skill teaches your coding agent how to use contract.dev through the CLI.

If you skipped this step, you can install it separately:

contract-dev skills install

Requires Node.js 20 or later.

3. Set up your protocol

We recommend running your coding agent from your protocol’s repository.

Open a terminal and navigate to your project’s root directory:

cd /path/to/your/protocol

Launch your coding agent from this directory.

This gives it access to your protocol’s source code, deployment files, ABIs and configuration, helping it identify your contracts and understand how they work.

Then ask:

Set up our protocol on contract.dev using the deployments in this repository.

Your agent will inspect the repository, identify the deployed contracts and propose a setup for your workspace.

Don’t have a local repository?

You can still set up a protocol by providing its name and chain:

Set up contract.dev for Uniswap v3 on Ethereum.

Your agent can use publicly available deployment information and contract data to identify the protocol.

4. Review and approve the plan

Before making changes, your agent presents a proposed setup covering:

  • Watched contracts and wallets — The addresses to watch and how to organise them into groups.
  • Metrics — Important on-chain values and activity to track over time.
  • Tables — Structured views of your protocol’s data, such as pools, markets or positions.
  • Control-change alerts — Alerts on events such as Upgraded, OwnershipTransferred and Paused, recorded in the app until you add a destination.
  • Workspace brief — A description of your protocol, its contracts and how they work, used to give your agent context in future conversations.

Your agent may ask a few questions to clarify which contracts to include or what to track.

You can approve the plan or request changes in natural language.

Once approved, your agent creates the resources and summarises what it configured.

Historical on-chain data begins being collected in the background.

5. Explore your workspace

Open the contract.dev app to explore your protocol.

Inspect your watched contracts and wallets, view metric charts, explore tables and review notification history.

You can also continue using your agent to investigate your protocol and configure additional resources. Again, this is best done in your protocol’s repository.

For example:

Ask questions

Which pools had the highest trading volume this week?

Create metrics and tables

Create a table of our top wallets by trading volume.

Set up notifications

Send a daily report of swap volume and fees per pool to #analytics.

Reports and condition alerts are not created during the initial setup. Add them afterwards, and connect Slack, Telegram or email to receive them. See Notifications.

Last updated on