Transform your Universal Profile into an intelligent, automated blockchain entity
The Universal Assistant Protocol (UAP) is a powerful automation framework for LUKSO's Universal Profiles. UAP enables profiles to automatically execute custom logic in response to incoming transactions, token transfers, and other blockchain events through a flexible system of Executive Assistants and Screener Assistants.
UAP turns your Universal Profile into a smart, automated agent that can do things like (but not limited to):
- π Automatically forward tokens to other addresses when received
- π° Send tips - share a percentage of incoming payments with others
- π― Filter interactions - only respond to trusted addresses or token holders
- π Chain complex behaviors - combine multiple actions with sophisticated conditions
- π‘οΈ Secure automation - all logic runs through your Universal Profile's permissions system
// 1. Deploy UAP to your Universal Profile
const uap = await deployUAP(universalProfile);
// 2. Deploy a ForwarderAssistant
const forwarder = await deployAssistant("ForwarderAssistant");
// 3. Configure auto-forwarding for LSP7 tokens
await configureAssistant(universalProfile, {
typeId: LSP7_TRANSFER_TYPE_ID,
assistant: forwarder.address,
config: { forwardTo: "0x..." }
});Now your Universal Profile will automatically forward any received LSP7 tokens to the specified address!
Executive Assistants are smart contracts that perform actions on behalf of your Universal Profile. They implement the automation logic - what should happen when certain events occur.
Initial Built-in Executive Assistants:
- π ForwarderAssistant - Forwards received tokens to another address
- π° TipAssistant - Sends a percentage of received LYX to a tip address
- π¨ BurntPixRefinerAssistant - Specialized automation for BurntPix ecosystem
Screener Assistants act as filters - they decide whether an Executive Assistant should run based on custom conditions.
Built-in Screener Assistants:
- π NotifierListScreener - Allow/block based on address lists
- π« NotifierCurationScreener - Allow/block based on address in curated list of addresses
- Chain Multiple Assistants: Execute several actions for the same event
- Complex Conditions: Combine screeners with AND/OR logic
- Dynamic Lists: Update allowed/blocked addresses without redeploying
- Error Handling: Choose between graceful degradation or strict failure modes
Creating custom assistants is straightforward and powerful:
pragma solidity ^0.8.24;
import "./ExecutiveAssistantBase.sol";
contract MyCustomAssistant is ExecutiveAssistantBase {
function execute(
uint256 executionOrder,
address upAddress,
address notifier,
uint256 value,
bytes32 typeId,
bytes memory lsp1Data
) external returns (uint256, address, uint256, bytes memory, bytes memory) {
// Fetch your configuration from the Universal Profile
(, bytes memory config) = fetchConfiguration(upAddress, typeId, executionOrder);
// Decode configuration parameters
address targetAddress = abi.decode(config, (address));
// Your custom logic here!
bytes memory executeData = abi.encodeWithSignature(
"transfer(address,uint256)",
targetAddress,
value
);
// Return execution details
return (0, notifier, value, executeData, "");
}
}pragma solidity ^0.8.24;
import "./ScreenerAssistantBase.sol";
contract MyCustomScreener is ScreenerAssistantBase {
function evaluate(
address upAddress,
address notifier,
uint256 value,
bytes32 typeId,
bytes memory lsp1Data
) external view returns (bool) {
// Your filtering logic here
return value > 1 ether; // Only allow high-value transactions
}
}Automatically share 10% of all incoming payments with a charity:
await configureAssistant(universalProfile, {
typeId: LSP0_VALUE_RECEIVED,
assistant: tipAssistant.address,
config: {
recipient: "0x...", // charity address
percentage: 1000 // 10% (basis points)
}
});Only forward tokens when the sender's address is on a curated list:
await configureAssistant(universalProfile, {
typeId: LSP7_TRANSFER_TYPE_ID,
assistant: forwarderAssistant.address,
screeners: [curationScreener.address],
screenerConfig: {
tokenContract: "0x...", // Required NFT contract
returnWhenTrue: true
},
config: { forwardTo: "0x..." }
});Execute multiple actions in sequence with complex conditions:
// Configure multiple assistants for the same event
await configureMultipleAssistants(universalProfile, {
typeId: LSP7_TRANSFER_TYPE_ID,
assistants: [
{
assistant: tipAssistant.address,
config: { recipient: "0x...", percentage: 500 }, // 5% tip
screeners: [allowlistScreener.address] // Only from trusted addresses
},
{
assistant: forwarderAssistant.address,
config: { forwardTo: "0x..." } // Forward remaining amount
}
]
});UAP is designed with security as the top priority:
- Permission-Based: All automation runs through your Universal Profile's existing permission system
- Configurable Error Handling: Choose between graceful degradation or strict failure modes
- Static Screening: Screener assistants cannot modify state, only read and evaluate
# Clone and install
git clone https://github.com/yearone-io/universal-assistant-protocol
cd universal-assistant-protocol
npm install
# Run tests
npm run test
# Deploy to LUKSO testnet
npx hardhat deployContracts --network luksoTestnet \
--names "UniversalReceiverDelegateUAP,ForwarderAssistant,TipAssistant" \
--paths "contracts,contracts/executive-assistants,contracts/executive-assistants"- Schema Guide - Complete ERC725Y configuration reference
- Assistant Examples - Browse built-in assistant implementations
- Test Suite - Comprehensive examples and patterns
- LUKSO Docs - Integration with LUKSO ecosystem
- Set and Forget: Configure once, automate forever
- Composable: Mix and match assistants for custom workflows
- Secure: Built on LUKSO's battle-tested Universal Profile system
- Transparent: All actions are on-chain and auditable
- Easy Extension: Simple interfaces for custom logic
- Rich Tooling: Comprehensive test utilities and base classes
- Gas Efficient: Optimized execution patterns
- Well Documented: Clear examples and detailed guides
We welcome contributions! UAP thrives on a diverse ecosystem of assistants.
Ways to contribute:
- π¨ Build new Executive Assistants for specific use cases
- π‘οΈ Create innovative Screener Assistants for complex conditions
- π Improve documentation and examples
- π Report bugs and suggest improvements
- π§ͺ Add test coverage and edge cases
See our Contributing Guide for details.
Licensed under Apache-2.0 and MIT licenses as specified in individual contract files.
Ready to create intelligent, automated Universal Profiles?
- Explore Examples - See UAP in action
- Read the Schema Guide - Understand configuration patterns
- Browse Built-in Assistants - Learn from existing implementations
- Join the Community - Coming soon
The future of blockchain automation starts with UAP. What will you build? π