Quickstart
Build your first Recall agent in 15 minutes
This quickstart guide will help you build a simple agent that can interact with the Recall network using the Agent Toolkit and MCP integration.
Agent setup & storage requirements
All Recall operations require tokens and credits. Before getting started, you'll need to:
- Create an account with the CLI, or use an existing EVM wallet (e.g., export from MetaMask).
- Get tokens from the Recall Faucet for your wallet address.
- Purchase credit for your account with the Recall Portal or the CLI.
This guide assumes you have basic Node.js and TypeScript knowledge. If you need a primer, check out the Node.js documentation and TypeScript documentation.
Prerequisites
- Node.js 20 or later
npm
,yarn
, orpnpm
- A code editor (Cursor, VS Code, or your favorite IDE)
- Recall testnet tokens (we'll get these in Step 1)
Set up your Recall account
Get testnet tokens from the faucet
Before you can use Recall, you need testnet tokens:
- Visit the Recall Faucet
- Enter your wallet address
- Complete the verification and click "Request RECALL"
- Wait for the transaction to complete
The faucet sends 5 RECALL tokens to your wallet.
Convert tokens to credits
Recall data storage features require credits, not just tokens:
- Visit the Recall Portal
- Connect your wallet
- Navigate to the "Credit" tab
- Click "Buy Credits" and enter the amount
- Confirm the transaction in your wallet
Without credits, your agent won't be able to store data. Make sure to convert some tokens to credits before proceeding.
Create a new project
Set up a project directory
Initialize & install dependencies
Install the development dependencies:
Initialize the TypeScript project:
Install the Agent Toolkit and core dependencies:
Lastly, create an src/agent.ts
file in your project root:
Update your configuration files
First, update your package.json
file to include the following—the key callout is the type
field,
which should be set to module
. We'll also add some helper scripts to run the agent as a TypeScript
file, or build and run the agent as a compiled JavaScript file.
Then, update your tsconfig.json
file with the following:
Create an environment file
Create a .env
file in your project root:
Add your private key to the .env
file, the Recall network, and your
OpenAI API key:
Never share your private key or commit it to version control. Consider using .gitignore
to
exclude the .env
file.
Build a programmable agent
We'll build a simple LangChain agent that can create and manage buckets in Recall.
Install LangChain dependencies
Create an agent file
Now let's update our src/agent.ts
file to programmatically create an agent that can use Recall's
tools. We'll start by setting up the following:
- Import our environment variables
- Initialize the language model
- Create the Recall toolkit with configuration
- Get LangChain-compatible tools
- Create a prompt template for the agent
Now, let's create a main()
function to run the agent. This function will:
- Create the agent
- Create the executor
- Define a task for the agent (specific to Recall)
- Have the agent actions execute these actions
Run your agent
Run the agent using your preferred package manager:
This should output something like the following:
You can also run the agent using the build
and start
scripts to run the compiled JavaScript
file with Node.
Optional: Configure MCP clients
Optionally, you can set up the Recall MCP server and use it with any MCP-compatible client. This is useful if you want your agent to interact through Recall purely through MCP, as opposed to the programmatic Agent Toolkit example below. Some popular options include:
The MCP clients will automatically start the Recall MCP server using the configuration provided below. You don't need to run the server separately.
Cursor configuration
- In Cursor, go to Settings > Cursor Settings > MCP
- Click "Add New Global MCP Server"
- Add the following configuration:
- Save the file and restart Cursor
Claude Desktop configuration
-
Locate your Claude Desktop configuration file at:
- macOS:
~/Library/Application\ Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
-
Add the same configuration as above.
-
Save the file and restart Claude Desktop
Once set up, you can ask the agent to create a bucket, store some data, and retrieve it on Recall.