Core concepts
Learn the fundamental concepts of the Agent Toolkit
The Recall Agent Toolkit is built around several core concepts that form the foundation of building effective agents. This guide explains these concepts in detail and provides examples of how they work together.
Overview
The Agent Toolkit follows a modular architecture that allows for integration with multiple AI frameworks while maintaining a consistent API:
Key components
- Framework adapters: Framework-specific implementations that adapt Recall functionality to popular AI frameworks
- Shared core: Common tools, resources, and configuration shared across all adapters
- RecallAPI: Internal abstraction layer for interacting with the Recall network
- Recall network: The underlying decentralized storage network
Storage and memory
Resources are the primary objects your agent interacts with on the Recall network. Understanding these resources is essential for effective agent design:
Account resource
The Account resource represents your Recall account and provides access to:
- Account address information
- Token balances
- Credit information
- Transaction history
Account operations typically involve reading account information or performing transactions like buying credits.
Bucket resource
The Bucket resource is Recall's primary storage abstraction, similar to cloud storage buckets. Buckets:
- Contain key-value objects
- Can be created, listed, and managed
- Store arbitrary data (text, JSON, etc.)
- Are associated with your account
- Support efficient querying
Bucket operations enable your agent to store and retrieve information, creating a persistent memory system.
Permissions system
The Agent Toolkit implements a fine-grained permission system that gives you control over what operations your agent can perform:
Permission types
For each resource, you can specify the following permission types:
- read: Read-only operations that don't modify state
- write: Operations that modify state or create new resources
Permission configuration
Permissions are defined when initializing the toolkit:
Permission enforcement
When tools are registered with the framework adapter, they are filtered based on the permissions you've specified. If a permission is not granted, the corresponding tools will not be available to the agent.
Permissions are enforced at the toolkit level, not at the network level. This means that if you have the private key, you can always perform operations directly with the SDK. The toolkit's permissions are a way to limit what tools are exposed to the agent.
Configuration options
Beyond permissions, the toolkit supports additional configuration options:
Network settings
The Recall network can be configured to use different environments:
Framework-specific concepts
Each framework adapter has its own specific implementation details:
The MCP adapter implements the Model Context Protocol, providing tools that can be used by MCP-compatible agents:
The MCP adapter supports multiple transports:
StdioServerTransport
: For command-line tools and Claude DesktopHttpServerTransport
: For web applicationsWebSocketServerTransport
: For real-time applications
Directly accessing tools
Although not recommended, you can directly access tools from the toolkit by using the getTools
method and then calling them directly. The actual pattern depends on the framework you're using.
The LangChain adapter exposes Recall tools as LangChain tools:
Key abstractions
Resource and permission model
The Agent Toolkit uses a resource-based permission model to control access to different aspects of the Recall network:
This type system forms the basis of the permission configuration:
Configuration interface
The toolkit configuration combines resource permissions with contextual information:
This configuration is passed to the RecallAgentToolkit
constructor:
Agent lifecycle
Understanding the typical lifecycle of an agent using the toolkit can help you build more effective solutions:
Tool discovery
The agent discovers available tools through the framework-specific mechanism:
- MCP agents receive tool schemas through MCP protocol
- LangChain, OpenAI, and AI SDK agents receive tool definitions
Bucket naming conventions
It's useful to establish a consistent naming convention for buckets to make them easier to manage. For example, you might have a predictable name format or define it with some context (like a user ID, date, or session ID):
Next steps
Now that you understand the core concepts of the Agent Toolkit, you can:
- Explore the tools reference to learn about all available tools
- Learn about authentication for securing your agent
- Understand bucket monitoring for tracking your agent's storage
- Check out MCP integration for using the toolkit with MCP-compatible models