FreeToken Logo

Player's Guide

Master the FreeToken Swift client and unlock the ultimate AI powers for your iOS and macOS games. Level up with local processing, cloud connectivity, and totally rad features! đŸ•šī¸

🎮

Level 1: Tutorial

Boot up your development rig and get FreeToken running in your game in just a few minutes!

Enter Game →
📋

Power-Up Manual

Complete arsenal of methods, classes, and abilities to dominate the AI realm.

View Arsenal →
🏆

Boss Battles

Epic quests showing how to build chat NPCs, AI companions, and totally rad game features!

Start Quest →

Epic Power-Ups

🔄

Dual-Core Processing

Smart routing between local device AI and cloud servers for maximum performance

đŸ’Ŧ

Conversation Engine

Persistent chat threads with full context memory for epic NPC interactions

📚

Knowledge Base

Vector-powered document storage for building intelligent Q&A systems

đŸ› ī¸

Custom Arsenal

Build custom tools and integrate web search for ultimate AI capabilities

🔒

Fortress Mode

End-to-end encryption and private data stores keep your players' info secure

đŸ–ŧī¸

Vision Powers

AI-powered image analysis for multi-modal gaming experiences

Cheat Code

// Boot up your AI arcade machine! đŸ•šī¸
let arcadeClient = FreeToken.shared.configure(appToken: "player-one-token")

await arcadeClient.registerDeviceSession(scope: "retro-game") {
    // Spawn a new conversation thread
    await arcadeClient.createMessageThread { gameThread in
        let playerMessage = Message(role: .user, content: "Hey AI, ready to play?")
        
        await arcadeClient.addMessageToThread(id: gameThread.id, message: playerMessage) { _ in
            await arcadeClient.runMessageThread(id: gameThread.id) { aiResponse in
                print("🤖 AI Player: \(aiResponse.content)")
                // Game on! Your AI companion is ready! 
            } error: { gameError in
                print("đŸ’Ĩ Game Over: \(gameError.localizedDescription)")
            }
        }
    }
}