AI companion guide

AI Desktop Pets

Last updated

OpenPets can be used alongside external AI coding tools through documented Claude Code, OpenCode, Cursor, MCP, and CLI integrations. This guide uses four named pet states: waiting, running, review, and failed.

White editorial pixel-art scene of an OpenPets companion connected to external coding tools
Four Claude Code terminal panes running with OpenPets companions greeting visitors in speech bubbles

AI Companion Architecture

Lightweight Local Status Client for AI Agents

OpenPets is a local desktop companion app designed to display real-time visual reactions while you work with external AI coding assistants. OpenPets does not contain embedded LLMs or heavy AI runtimes. Instead, external AI tools (Claude Code, Cursor, OpenCode) send lightweight status signals to OpenPets via standard Model Context Protocol (MCP) or local CLI commands.

100% Local & Private

IPC and stdio communication stay strictly on loopback (127.0.0.1). Zero remote telemetry or cloud calls.

Zero LLM Overhead

No GPU/CPU waste for embedded AI models. OpenPets consumes under 35 MB RAM while listening for tool signals.

MCP Protocol Standard

Uses Anthropic's open Model Context Protocol over stdio for instant compatibility with modern coding agents.

Connected Developer Environment

By linking OpenPets to your terminal or editor, your desktop companion transforms into an ambient progress monitor. Whether your agent is running long test suites or generating multi-file refactors, your pet reflects the current task state at a glance.

White pixel-art editorial illustration of Claude, OpenCode, Cursor, MCP, and CLI connections to OpenPets
Figure 1: Connected integration ecosystem: OpenPets links external AI assistants (Claude, OpenCode, Cursor, MCP, CLI) to desktop companion states.

Live Agent Demo Video

Watch how OpenPets reacts in real time as an AI coding agent processes context, executes terminal commands, and handles errors:

Live AI Agent Integration Demo OPENPETS DEMO

Step-by-Step AI Setup & Execution Workflow

Connecting an external AI assistant to OpenPets takes just a few steps:

1

Launch OpenPets Desktop Daemon

Open OpenPets on Windows, Mac, or Linux. The desktop process runs locally and exposes stdio/IPC channels.

2

Add OpenPets MCP Tool Config

Register OpenPets as an MCP server in Claude Desktop, Cursor, or OpenCode configuration files.

3

Agent Emits State Changes

During tool execution, your AI assistant automatically invokes `openpets_set_state` to change companion postures.

4

Visual Reactions on Desktop

Pets switch seamlessly between waiting, running, review, and failed states as your coding task progresses.

Claude Code Terminal Integration

When working with Claude Code in your terminal, OpenPets receives stdio tool invocations whenever Claude initiates actions, inspects files, or encounters build errors.

Claude Code CLI terminal session on a desktop with an OpenPets pixel companion reacting below
Figure 2: Claude Code CLI terminal session emitting real-time pet state changes via stdio MCP tool calls.

How Claude Communicates with OpenPets

  1. 1. MCP Server Discovery: Claude reads your MCP configuration file and connects to openpets mcp serve over stdio.
  2. 2. Tool Registration: OpenPets registers openpets_set_state, openpets_say, and openpets_list_pets tools.
  3. 3. Lifecycle Events: As Claude executes bash commands or reads files, it calls openpets_set_state(state="running") or review.
  4. 4. Desktop Animation: The OpenPets desktop app instantly switches sprite animation states and displays optional speech bubbles.

Visual Vocabulary

Core Named Pet States (waiting, running, review, failed)

OpenPets defines four official named states. AI agents invoke these states during their execution loop to communicate visual progress:

waitingPatient idle posture or resting bounce
Agent Event: Turn completed / awaiting user input

Signals to the developer that the agent has finished its previous turn and is waiting for your next instruction or approval.

Trigger Condition:

Agent completes task, pauses for user prompt, or sits idle awaiting next instruction.

MCP Payload Examplejs
await mcp.callTool("openpets_set_state", {
  state: "waiting",
  message: "Ready for next prompt",
});
runningActive walking, typing, or action loop
Agent Event: Executing tool / running shell command

Indicates active work in progress. The pet companion walks along active editor borders while terminal commands or tests run.

Trigger Condition:

Agent starts tool execution, file editing, terminal command execution, or code generation.

MCP Payload Examplejs
await mcp.callTool("openpets_set_state", {
  state: "running",
  message: "Executing bun test...",
});
reviewFocused inspecting or analytical pose
Agent Event: Reading context / analyzing codebase

Shows that the agent is evaluating code structure or reading documentation before applying changes.

Trigger Condition:

Agent is inspecting diffs, reading AST nodes, analyzing file contents, or running codegraph queries.

MCP Payload Examplejs
await mcp.callTool("openpets_set_state", {
  state: "review",
  message: "Analyzing codegraph callers...",
});
failedAlert reaction or error state pose
Agent Event: Command exit non-zero / error caught

Instantly alerts you that an automated command or test suite failed, giving visual feedback even if your terminal is minimized.

Trigger Condition:

Build failure, non-zero command exit code, test failure, or syntax validation error.

MCP Payload Examplejs
await mcp.callTool("openpets_set_state", {
  state: "failed",
  message: "Tests failed with exit code 1",
});

Quick Setup: Standard MCP Configuration

Add the following entry to your AI client's MCP configuration file (e.g. claude_desktop_config.json, .mcp.json, or Cursor settings):

claude_desktop_config.json / .mcp.jsonjson
{
  "mcpServers": {
    "openpets": {
      "command": "openpets",
      "args": ["mcp", "serve"]
    }
  }
}

Actionable Tool Integration Guides

Select your development environment below for dedicated step-by-step integration guides:

Claude Code & Desktop

Connect Claude via official OpenPets MCP stdio tools.

Claude invokes stdio tool commands like `openpets_set_state` to show active status while writing code or running tests.

OpenCode

Use the OpenPets plugin for OpenCode for live agent reactions.

Subscribes to session events and triggers companion animations as files are saved and commands execute.

Cursor

Configure project-level MCP tools in Cursor for companion reactions.

Allows Cursor AI assistant to trigger pet states directly during code generation and review.

MCP Standard Server

Connect any MCP-compatible AI client using standard stdio JSON-RPC.

Exposes `openpets_set_state`, `openpets_say`, and `openpets_list_pets` tools over standard stdin/stdout channels.

OpenPets CLI

Send pet reactions from shell scripts, git hooks, and terminal commands.

Run simple shell commands like `openpets set-state running` from build scripts, CI pipelines, or git hooks.

Actionable Setup Links & Documentation

AI desktop pets FAQ

Does OpenPets contain an embedded AI model?

Use the documented integration guides to see how OpenPets works alongside external coding tools.

What named pet states are shown in this guide?

The guide shows waiting (patient idle variant), running (generic in-place run loop), review (focused inspecting or thinking loop), and failed (readable error or sad reaction).

Which AI coding assistants work with OpenPets?

OpenPets has documented setup guides for Claude Code, OpenCode, Cursor, MCP-compatible clients, and the OpenPets CLI.

Where can I find AI integration setup instructions?

Use the Claude Code, OpenCode, Cursor, MCP, or CLI setup links on this page for the current instructions.

Keep exploring

Uma plataforma de código aberto com pets animados de desktop e plugins.

Guias

Compare o OpenPets

Legal

© 2026 OpenPets. Código aberto no GitHub.

Um projeto de Boring Dystopia Development· KVK 42114878

Alguns pets podem ser conteúdo não oficial feito por fãs. O OpenPets não é afiliado ou endossado por terceiros. Proprietários de direitos podem solicitar a remoção enviando um e-mail para admin@openpets.dev.