Authentication
Learn how to authenticate with the Agent Toolkit
This guide explains authentication methods for the Recall Agent Toolkit, best practices for securing your credentials, and advanced techniques for managing authentication in different environments. The Recall Agent Toolkit authenticates with the Recall network using a private key, which is used to sign transactions. Properly securing this key is essential for the security of your application.
Authentication methods
Private key authentication
The most common way to authenticate is by providing your private key directly when initializing the toolkit:
Never hardcode your private key directly in your source code, especially in public repositories. Use environment variables or secure credential management systems.
Environment variables
The recommended approach for most applications is to use environment variables:
This approach keeps your private key out of your source code and allows for different keys in different environments.
Create & configure a private key
To get started with the Recall Agent Toolkit, you'll need a private key. There are two ways to do this:
- Use the Recall CLI's
recall account create
command. - Use your browser wallet (e.g,. MetaMask), add an account, and then export the private key.
Copy the generated private key and store it securely. This is the only time you will see the full key value. Then, set the key in your environment variables:
Security best practices
Environment-specific keys
Use different private keys for different environments:
Restricted permissions
Limit the permissions of your key to only what's necessary:
Secure storage
Ensure your environment variables are securely stored:
Keys & client-side code
Never include keys in client-side code! Keep all authentication on the server side:
Authentication for different frameworks
Next steps
- Learn about bucket monitoring to track your agent's storage
- Explore the tools reference for detailed documentation on available tools
- Check out MCP integration for using the toolkit with MCP-compatible models
- See framework integration guides for integrating with different AI frameworks