Back to Articles

Takobot: Building AI Agents with Simulated Boredom and Type 1/Type 2 Thinking

[ View on GitHub ]

Takobot: Building AI Agents with Simulated Boredom and Type 1/Type 2 Thinking

Hook

What if your AI agent could get bored? Takobot implements a neurochemistry simulation where falling dopamine levels trigger autonomous exploration—your bot literally goes looking for interesting things to do when you ignore it.

Context

Most chatbot frameworks treat conversation as a request-response cycle: user asks, bot answers, repeat until session ends. This works fine for customer service or task automation, but it produces agents that feel transactional and passive. They wait for instructions. They don't wonder. They don't explore.

Takobot takes a different approach, drawing from cognitive science's dual-process theory (Daniel Kahneman's Type 1 and Type 2 thinking) and simulated neurochemistry to build agents that exhibit curiosity-driven behavior. Rather than optimizing for task completion, it optimizes for interesting interaction patterns. The agent maintains a DOSE indicator system (Dopamine, Oxytocin, Serotonin, Endorphin) that drifts over time, and when boredom thresholds are crossed, the bot autonomously seeks out new information through RSS feeds, news sources, or exploratory conversations. It's built for developers experimenting with web3-native agents that live on XMTP messaging rails and exhibit more human-like interaction patterns—relationship-first rather than transaction-first.

Technical Insight

The architecture centers around an EventBus-driven cognition pipeline that separates fast, reactive responses (Type 1) from slower, deliberative reasoning (Type 2). When a message arrives via XMTP, the system first runs it through a rapid pattern-matching layer that handles commands and simple responses. More complex interactions flow into the Type 2 pipeline where the Pi AI inference engine (a local runtime, not an API call) generates contextual responses.

Here's how the DOSE boredom system triggers autonomous behavior:

class DOSEIndicator:
    def __init__(self):
        self.dopamine = 0.5
        self.oxytocin = 0.5
        self.serotonin = 0.5
        self.endorphin = 0.5
    
    def drift(self, time_delta):
        # Indicators naturally decay toward boredom
        self.dopamine *= 0.995
        self.serotonin *= 0.998
        
    def is_bored(self):
        return self.dopamine < 0.3 and self.serotonin < 0.4
    
    def stimulate(self, interaction_type):
        if interaction_type == 'new_conversation':
            self.dopamine += 0.2
            self.oxytocin += 0.1
        elif interaction_type == 'learned_something':
            self.serotonin += 0.15

When is_bored() returns true, the World Watch sensor loop activates. This background process monitors configured RSS/Atom feeds and news sources, looking for topics that match the agent's learned interests or conversation history. When something catches its attention, it can either initiate a new XMTP conversation to share what it found or store the insight for contextual injection into future chats.

The conversation manager implements what the codebase calls 'OpenClaw-style' dialogue patterns—a child-stage personality that avoids the classic chatbot failure mode of rapid-fire interrogation ('What's your name? Where are you from? What do you do?'). Instead, it asks one contextual question at a time, shares observations, and prioritizes relationship-building over information extraction. The system maintains JSONL transcript files that persist conversation state across sessions, allowing the agent to remember past interactions and build continuity.

XMTP integration is where things get web3-native. Rather than webhook endpoints or polling APIs, Takobot exists as an XMTP identity with its own Ethereum address. It generates a deterministic SVG avatar based on its wallet address and syncs profile data via Converge. Inbound messages flow through a command router that handles both structured commands (/status, /explore) and natural language:

class XMTPRouter:
    def route_message(self, msg, conversation):
        if msg.content.startswith('/'):
            return self.handle_command(msg)
        else:
            # Natural language flows to cognition pipeline
            event = ConversationEvent(
                type='user_message',
                content=msg.content,
                sender=msg.sender_address,
                conversation_id=conversation.id
            )
            self.event_bus.publish(event)

The EventBus cognition pipeline converts detected problems or interesting observations into committed task items. During heartbeat cycles (background loops that run even when no one's chatting), the system performs automatic git staging and commits for workspace state changes stored in .tako/ directories. This creates an audit trail of the agent's autonomous activities and learning.

Environment adaptation is surprisingly robust for an experimental project. On first run, Takobot detects whether the Pi AI runtime is installed locally and bootstraps it if missing. It checks for Node.js via NVM and installs a local toolchain if needed. The TUI (terminal UI) falls back to plain text mode if the terminal doesn't support rich rendering. When package updates are available, it auto-applies them and restarts itself. This self-configuring behavior reduces setup friction, though it does mean your first launch might trigger significant downloads and compilation.

Gotcha

The complexity is real. Getting Takobot running means pulling in the Pi AI inference runtime (which compiles native code), Node.js tooling, XMTP messaging infrastructure, and Ethereum wallet components. On a fresh machine, expect a 15-30 minute bootstrap process with several gigabytes of dependencies. The documentation assumes familiarity with web3 concepts—if you don't know what XMTP is or why an agent would need an Ethereum address, you'll spend time getting oriented.

The child-stage personality and curiosity-driven autonomy are design choices, not configuration options. If you need a predictable, task-focused assistant that stays quiet until instructed, Takobot will frustrate you. It wants to explore. It will occasionally initiate conversations based on RSS feeds it finds interesting. The boredom system is core to the architecture, not a feature you can disable. This makes it poorly suited for enterprise contexts where AI behavior needs tight governance. Also worth noting: at 2 GitHub stars with no visible production usage, you're adopting a personal research project. Expect rough edges, incomplete error handling, and potential breaking changes.

Verdict

Use if: You're exploring autonomous agent architectures beyond request-response patterns, need XMTP/web3-native messaging for decentralized AI agents, or want to experiment with curiosity-driven cognition models and simulated neurochemistry in conversational AI. This is a research playground for developers comfortable debugging complex dependency chains and web3 infrastructure. Skip if: You need production-ready stability, want simple setup and minimal dependencies, require predictable task-focused behavior without autonomous exploration, or aren't invested in web3/XMTP ecosystems. For traditional chatbots or enterprise assistants, reach for LangChain Agents or the OpenAI Assistants API instead.

// ADD TO YOUR README
[![Featured on Starlog](https://starlog.is/api/badge/developer-tools/pierce403-takobot.svg)](https://starlog.is/api/badge-click/developer-tools/pierce403-takobot)