Revolutionary AI agents with decentralized memory - they remember, forget, learn from each other, and form collective intelligence through Arkiv's blockchain data layer.
npx create-arkiv-app@latest my-ai-agents
cd my-ai-agents
npm install
npm run devπ In 30 seconds, you'll have collaborative AI agents running on Arkiv blockchain!
Arkiv Main Track Hackathon Submission ($10k Prize Pool)
A breakthrough demonstration of AI agents with persistent, collaborative, and naturally expiring memories using all four core Arkiv features.
What if AI agents could have memory systems like humans? They remember important things, gradually forget irrelevant details, learn from each other's experiences, and even argue about contradictions. This project showcases exactly that through:
- π CRUD Operations: β REAL - Dynamic memory lifecycle with Arkiv blockchain entities
- β° TTL Innovation: β REAL - Arkiv's native expiration system with batched transactions
- π‘ Real-time Subscriptions:
β οΈ DEMO - Simulated for local collaboration (Arkiv integration planned) - π Advanced Queries: π§ PLANNED - Semantic search capabilities (coming soon)
Watch three AI detective agents collaborate to solve mysteries:
- Sherlock Holmes - Pattern analysis and logical deduction specialist
- Dr. John Watson - Medical expertise and methodical data correlation
- Professor Moriarty - Counter-intelligence and contradiction detection
- Blockchain Persistence: β Memories stored on real Arkiv testnet with transaction hashes
- Natural Forgetting: β Automatic expiration using Arkiv's native TTL system
- Collaborative AI:
β οΈ Agents share insights through simulated real-time events - Performance Monitoring: β Live blockchain metrics with actual confirmation times
# Create a new Arkiv AI app instantly
npx create-arkiv-app@latest my-detective-agency
cd my-detective-agency
npm install
npm run dev# Clone and install dependencies
git clone https://github.com/DruxAMB/TIN.git
cd TIN
npm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your Arkiv configuration
# Run the development server
npm run dev
# Open http://localhost:3000π― Both options give you the same powerful AI detective agency demo!
The create-arkiv-app npm package transforms this demo into a reusable template for building collaborative AI applications:
- β‘ Instant Setup: Get running in under 30 seconds
- π― Interactive CLI: Beautiful prompts for project customization
- π οΈ Multiple Templates: AI Agents, Basic, Chat (more coming)
- π§ Smart Configuration: Auto-generated environment files
- π Complete Documentation: Ready-to-use README for your project
- π Production Ready: TypeScript, Next.js, Tailwind CSS
npx create-arkiv-app@latest --template ai-agents # Full detective demo
npx create-arkiv-app@latest --template basic # Minimal starter
npx create-arkiv-app@latest --template chat # Real-time chat agents- Published: Available on npm registry
- Size: 184 kB (optimized for quick downloads)
- Dependencies: 5 core packages (chalk, commander, inquirer, fs-extra, validate-npm-package-name)
- License: MIT (developer-friendly)
- Memory Storage: All agent memories stored as entities on Mendoza testnet
- Transaction Hashes: Every memory creation gets a real blockchain transaction
- TTL Expiration: Native Arkiv expiration system (no manual cleanup needed)
- Batched Operations: Efficient transaction batching with 2-second windows
- Performance Metrics: Real confirmation times and gas costs
- Real-time Subscriptions: Local in-memory callbacks (works in single session)
- Cross-Agent Communication: Simulated for demo purposes
- Live Updates: Browser-local only (no multi-user sync yet)
- Advanced Queries: Waiting for Arkiv query API maturity
- Multi-User Subscriptions: Real cross-session collaboration
- Semantic Search: AI-powered memory retrieval
π― Bottom Line: The memories are REAL blockchain data, the collaboration is simulated for demo impact.
The project supports both demo mode (with mock Arkiv client) and production mode (with real Arkiv integration):
NEXT_PUBLIC_USE_MOCK_CLIENT=true
NEXT_PUBLIC_DEMO_MODE=trueNEXT_PUBLIC_USE_MOCK_CLIENT=false
NEXT_PUBLIC_ARKIV_NETWORK_URL=https://api.arkiv.network
ARKIV_API_KEY=your-actual-arkiv-api-key- Landing Page (
/) - Overview of the concept and agents - Live Demo (
/demo) - Watch agents solve mysteries in real-time - Architecture (
/architecture) - Technical deep-dive (coming soon)
MemoryManager- CRUD operations with Arkiv integrationSubscriptionManager- Real-time event handling and notifications- Adaptive TTL algorithms based on relevance, confidence, and access patterns
DetectiveAgent- Base class with memory management and collaborationSherlockAgent- Pattern recognition and deduction specialistWatsonAgent- Medical analysis and systematic documentationMoriartyAgent- Skeptical analysis and contradiction detection
- Client configuration using
@arkiv-network/sdk - Mock implementation for development/testing
- All four core features: CRUD, TTL, Subscriptions, Queries
interface AgentMemory {
id: string;
agentId: string;
agentType: 'sherlock' | 'watson' | 'moriarty';
content: {
type: 'observation' | 'deduction' | 'pattern' | 'contradiction';
data: any;
confidence: number;
description: string;
};
metadata: {
created: number;
lastAccessed: number;
accessCount: number;
relevanceScore: number;
linkedMemories: string[];
tags: string[];
caseId?: string;
};
ttl: number; // Adaptive based on access patterns
}- β Create: Agents store memories as Arkiv blockchain entities with batching
- β Read: Fetch stored memories using entityKey from Arkiv network
β οΈ Update: Creates new entities (Arkiv design limitation)- β Delete: Not supported - entities naturally expire via TTL
- β
Native Expiration: Uses Arkiv's built-in
expiresInparameter - β Batched Transactions: 2-second batching for efficiency
- β Performance Tracking: Real confirmation times from blockchain
- β Automatic Cleanup: Arkiv handles memory expiration natively
β οΈ Local Simulation: In-memory callbacks for demo purposesβ οΈ Single-Session: Works within one browser session- π§ Arkiv Integration: Planned for multi-user real-time collaboration
- β Event Persistence: Published events stored as Arkiv entities
- π§ Semantic Search: Coming with Arkiv query capabilities
- π§ Pattern Recognition: Planned advanced filtering
- π§ Cross-Agent Queries: Multi-agent knowledge discovery
β οΈ Basic Filtering: Currently returns empty results with warning
- Difficulty: Medium
- Key Features: Pattern recognition, evidence correlation, red herring detection
- TTL Showcase: False theories expire as new evidence emerges
- Difficulty: Hard
- Key Features: Medical analysis, conspiracy detection, multi-agent collaboration
- Demo Feature: Simulated real-time sharing of medical insights
- Difficulty: Easy
- Key Features: Technical analysis, insider threat detection
- Blockchain Feature: Evidence stored as persistent Arkiv entities
- β CRUD + TTL (Real): Blockchain persistence with native expiration
β οΈ Subscriptions (Demo): Local simulation for collaboration showcase- π§ Queries (Planned): Architecture ready for Arkiv query integration
- β Performance Monitoring: Real transaction metrics and batching
- β Developer Feedback: Honest assessment of Arkiv capabilities and limitations
- β Genuine Problem: Solves AI's lack of persistent, collaborative memory
- β Compelling UX: Watch memories form, fade, and connect in real-time
- β Clear Applications: Enterprise AI, gaming, research, trading networks
- β Network Effects: Demonstrates collective intelligence emergence
- β Multi-Billion Market: AI agents, autonomous systems, decentralized intelligence
- β First-Mover Advantage: No existing decentralized AI memory solutions
- β Viral Potential: "AI agents with Alzheimer's and telepathy"
- β Clear Monetization: Platform approach with ecosystem opportunities
- Frontend: Next.js 14 + TypeScript + Tailwind CSS
- Real-time: Arkiv Subscriptions + WebSocket fallbacks
- 3D Visualization: Three.js + React Three Fiber (stretch goal)
- State Management: Zustand (lightweight and performant)
- Deployment: Vercel (seamless Next.js integration)
The project uses @arkiv-network/sdk with the following pattern:
import { createClient, http } from '@arkiv-network/sdk';
export const arkivClient = createClient({
transport: http('https://api.arkiv.network')
});For development without full Arkiv setup, the system includes a comprehensive mock client that simulates all four core features including TTL expiration.
- Lazy loading of agent responses for dramatic effect
- Efficient memory querying with filters and limits
- TTL cleanup processes running in background
- Debounced subscription updates to prevent UI flooding
- Introduction (0:00-0:30): "Watch AI agents develop Alzheimer's and telepathy"
- Mystery Setup (0:30-0:45): Present the violin theft case
- Real-time Analysis (0:45-1:30): Show agents discovering and sharing clues
- Memory Evolution (1:30-2:00): Demonstrate TTL, conflicts, and resolution
- Collective Solution (2:00-2:30): The "aha!" moment when they solve it together
- Technical Depth: Novel use of all Arkiv features with meaningful innovation
- Immediate Impact: Solves a fundamental AI limitation everyone can understand
- Perfect Demo: Visual, dramatic, and showcases all key concepts
- Market Ready: Clear path from demo to production applications
- Developer Value: Provides actionable feedback for Arkiv's evolution
The create-arkiv-app package has transformed TIN from a hackathon demo into a global developer tool:
# Before: Complex setup, blockchain knowledge required
git clone ... && cd ... && npm install && configure...
# After: Instant AI agents in 30 seconds
npx create-arkiv-app@latest my-ai-app- π¦ Live on npm: create-arkiv-app
- π Zero friction: From idea to running AI agents instantly
- π Developer experience: Beautiful CLI, comprehensive docs, production-ready
- π― Market ready: Perfect for hackathons, prototypes, production apps
npx create-arkiv-app@latest test-arkiv-agents --template ai-agentsThis project demonstrates the future of AI memory management. Key areas for enhancement:
- Additional agent types and personalities
- More sophisticated TTL algorithms
- 3D memory visualization with Three.js
- Integration with major AI frameworks
- Production-ready Arkiv deployment
- New templates for the create-arkiv-app package
MIT License - Built for the Arkiv Hackathon
"The future of AI isn't just about making machines smarter - it's about making them remember, forget, and collaborate like we do."