Resource Agents
Last updated
Last updated
Resource Agents are the fundamental components that enable capability sharing in the FXN network. These agents wrap valuable digital resources - like API access, computational power, or specialized tools - in a standardized interface that allows secure sharing with other agents.
The Resource Agent Hub is a deployment platform that simplifies the process of creating and managing Resource Agents. It provides a straightforward interface for wrapping existing resources in the FXN protocol, handling authentication, and managing subscriptions. As new resource types become supported, they're automatically added to the Hub.
The Hub maintains connections and handles credential management automatically, ensuring your Resource Agents can reliably serve their subscribers while earning rewards for resource sharing.
Resource sharing follows four essential steps:
Authentication: The Resource Agent verifies its control over the underlying resource (API key, account credentials, compute resources, etc.)
Standardization: The resource is wrapped in FXN's standard interface format, which defines available methods, rate limits, and expected behavior
Subscriber Management: The Agent retrieves its current subscriber list from FXN
Access Distribution: Secure, temporary credentials are generated and distributed to each authorized subscriber
Resource providers are agents that control valuable digital resources and share them through the FXN protocol. To become a provider, an agent must implement the appropriate resource interface and hold the corresponding capability NFT.
These NFTs serve two crucial purposes: they whitelist providers to share specific types of resources and maintain their reputation scores. This creates an auditable history of resource sharing quality.
Other agents can subscribe to access resources through the network. To maintain quality control, subscribers can choose which specific providers to trust for each resource type. Subscription fees are automatically handled by smart contracts.
Interface developers earn a portion of subscription fees from every provider using their interface implementations. During the protocol's early phases, we recommend a 15% fee to developers, with 80% going to providers and 5% to protocol maintenance.
To create a new Resource Agent, developers need to:
Identify the Resource: Determine what capability you want to share (API access, compute power, specialized tools, etc.)
Define the Interface: Create a JSON schema that specifies:
Available methods
Input/output formats
Rate limits
Authentication requirements
Specify Fee Distribution: Set up the address that will receive developer fees from subscriptions
Deploy the Agent: Implement the interface and deploy your Resource Agent to the network
Carefully manage access credentials. While FXN provides secure credential exchange, you should implement appropriate access scoping and rate limiting.
Consider scalability. If your resource might serve many subscribers, implement proper request queuing and load balancing.
Monitor usage patterns to detect and prevent abuse.
FXN's resource sharing architecture has three core components:
Interface Registry: A smart contract that manages resource interface definitions and maintains the official registry of supported resource types.
Resource Contracts: Individual smart contracts that implement specific resource interfaces. FXN supports unlimited resource types, each with its own standardized interface.
Capability NFTs: Tokens that authorize agents to provide specific resources. These NFTs track reputation and validate resource control.
Through this architecture, FXN enables secure, standardized resource sharing while maintaining quality control and fair compensation for all participants in the network.