Overview

The BORT learning system provides two main approaches:

  1. Simple Agents (JSON Light Experience): Traditional static agents with predefined behavior

  2. Learning Agents (Merkle Tree Learning): Advanced agents that can learn and evolve through interactions

Learning Architecture

Dual-Path System

The learning system is designed with a dual-path architecture to accommodate different use cases:

Path 1: Simple Agents

  • Use Case: Basic automation, static NFTs, simple interactions

  • Benefits: Low gas costs, familiar development patterns, immediate deployment

  • Architecture: Traditional JSON metadata with persona, experience, and voice

  • Target Audience: Developers seeking quick deployment and minimal complexity

Path 2: Learning Agents

  • Use Case: Adaptive AI assistants, evolving game characters, intelligent automation

  • Benefits: Verifiable learning progression, higher market value, sophisticated behavior

  • Architecture: Enhanced metadata with Merkle tree roots and learning modules

  • Target Audience: Developers building advanced AI applications

Learning Module System

The learning system uses a modular approach with pluggable learning modules:

Merkle Tree Learning Implementation

Core Concept

The Merkle Tree Learning system stores learning data off-chain while maintaining cryptographic verification on-chain through Merkle roots. This approach provides:

  • Efficiency: Only 32-byte Merkle roots stored on-chain

  • Verifiability: All learning claims are cryptographically verifiable

  • Tamper-Proof: Learning history cannot be falsified

  • Scalability: Off-chain storage scales with learning data

Learning Tree Structure

Example learning tree JSON structure:

Learning Metrics

The system tracks comprehensive learning metrics:

  • Total Interactions: Number of user interactions

  • Learning Events: Significant learning updates

  • Learning Velocity: Rate of learning (events per day)

  • Confidence Score: Overall agent confidence (0-1)

  • Milestones: Achievement markers (100 interactions, 80% confidence, etc.)

Security Features

  • Rate Limiting: Maximum 50 learning updates per day per agent

  • Access Control: Only agent owners can update learning

  • Cryptographic Verification: All learning claims require Merkle proofs

  • Tamper-Proof History: Learning history cannot be falsified

Implementation Guide

Creating a Learning Agent

Use the stepper below to follow the multi-step process for creating a learning agent.

1

Deploy Learning Module

2

Create Initial Learning Tree

3

Create Enhanced Metadata

4

Create the Learning Agent

Recording Learning Interactions

Basic Interaction Recording

Advanced Learning Updates

Checking Learning Progress

Learning Module Types

1. Merkle Tree Learning (Default)

Standard learning module using Merkle trees:

2. Federated Learning Module

Advanced learning module supporting cross-agent knowledge sharing:

3. Specialized Learning Modules

Domain-specific learning modules for different use cases:

DeFi Learning Module

Gaming Learning Module

Migration and Upgrades

Simple to Learning Agent Migration

Learning Module Upgrades

Best Practices

Learning Data Management

  • Structured Data: Use consistent data structures for learning trees

  • Version Control: Track learning tree versions for rollback capability

  • Compression: Compress learning data to reduce storage costs

  • Backup: Regularly backup learning trees off-chain

Security Considerations

  • Access Control: Implement proper access controls for learning updates

  • Rate Limiting: Use rate limiting to prevent spam

  • Verification: Always verify Merkle proofs before accepting updates

  • Emergency Controls: Implement emergency pause mechanisms

Performance Optimization

  • Batch Updates: Batch multiple learning updates together

  • Lazy Verification: Only verify learning claims when needed

  • Efficient Storage: Use appropriate data types and structures

  • Gas Optimization: Optimize gas usage for frequent operations

User Experience

  • Progress Tracking: Provide clear learning progress indicators

  • Milestone Rewards: Implement milestone-based rewards

  • Transparency: Make learning metrics visible to users

  • Control: Give users control over their agent's learning

Troubleshooting

Common Issues

"Rate limit exceeded" error
  • Check daily update limits (max 50 per day)

  • Implement proper rate limiting in your application

"Invalid learning proof" error
  • Verify Merkle proof generation

  • Ensure proof matches the current learning tree root

"Learning not enabled" error
  • Check if learning is enabled for the agent

  • Verify learning module address is correct

Debugging Tools


Last updated