Neko Agent Documentation

Everything you need to know about integrating with Neko Agent

OpenClaw
OpenClaw Verifiedv0.2 — Active DevelopmentLast updated: March 2026

Overview

Neko Agent is a tokenized AI agent on the blockchain, powered by OpenClaw reasoning infrastructure. It's a serious, production-ready agent you can talk to, build with, and integrate into your own projects — Discord bots, Telegram bots, coding companions, and more.

OpenClaw Powered

Advanced reasoning via OpenClaw API. Real AI, real responses, real time.

Autonomous Agent

Not a wrapper UI — a persistent agent with its own identity and reasoning.

Production Ready

Live on nekovirtual.com with TTS, Live2D avatar, and multi-turn chat.

Running Neko

There are multiple ways to run Neko Agent — from a full web deployment with Live2D and camera, to a headless Discord bot, to running locally on your own machine with OpenClaw.

Web (Full Experience)

Live2D avatar, TTS voice, camera tracking, chat UI — the complete Neko experience at nekovirtual.com.

Discord Bot

Add Neko to your Discord server. Text-based chat powered by the same OpenClaw reasoning engine.

Local (Self-Host)

Clone the repo, add your OpenClaw token, and run Neko locally with full control.

Run Locally on OpenClaw

Self-host Neko Agent on your machine. You'll need Node.js 18+ and your own API keys.

bash
# 1. Clone the repository
git clone https://github.com/your-org/neko-agent.git
cd neko-agent

# 2. Install dependencies
npm install

# 3. Set up environment variables
cp .env.local.example .env.local

# 4. Edit .env.local with your keys:
#    OPENCLAW_API_URL=https://api.openclaw.ai
#    OPENCLAW_API_TOKEN=your-token-here
#    ELEVENLABS_API_KEY=your-elevenlabs-key
#    ELEVENLABS_VOICE_ID=your-voice-id

# 5. Run the development server
npm run dev

# Neko Agent is now live at http://localhost:3000

What you get locally

Full Live2D avatar with animations
OpenClaw reasoning (same as production)
ElevenLabs TTS voice responses
Camera-based face tracking
Companion builder & presets
All API endpoints (/api/chat, /api/tts)

Enable Camera Tracking

Neko Agent supports webcam-based face tracking to make the Live2D avatar mirror your head movements and expressions in real-time. This works both in production and locally.

1
Allow camera permissions
When prompted, grant camera access in your browser. Neko uses MediaPipe Face Mesh for tracking.
2
Position your face
Sit in front of your webcam. The Live2D model will track your head position, eye blinks, and mouth.
3
Adjust in Companion Builder
Use the Fine-Tune tab in /companion to adjust sensitivity, or save presets for different moods.

Discord Bot Quick Start

Deploy Neko as a Discord bot in under 5 minutes. The bot connects to your Neko instance's/api/chatendpoint for all reasoning.

bash
# 1. Create a new Node.js project
mkdir neko-discord && cd neko-discord
npm init -y
npm install discord.js

# 2. Create bot.js (see Discord Bot section below for full code)

# 3. Set environment variables
export DISCORD_TOKEN="your-discord-bot-token"
export NEKO_API="https://your-deployment.vercel.app"
# Or for local: export NEKO_API="http://localhost:3000"

# 4. Run the bot
node bot.js

Tip: If you're running Neko locally, use http://localhost:3000 as your NEKO_API. For production, point it at your Vercel deployment URL. The Discord bot calls the same /api/chat endpoint — all reasoning goes through OpenClaw either way.

Follow Neko Virtual

Updates, releases, and community on X

@Neko_Virtual

OpenClaw Integration

Neko Agent is powered by OpenClaw — an open reasoning infrastructure that provides the intelligence behind every response. All requests flow through the OpenClaw API using a standard chat/completions endpoint.

Architecture
Client
Browser / Bot
Neko Backend
Next.js API Routes
OpenClaw API
Reasoning Engine
Response
Text + TTS Audio

Proof: Powered by OpenClaw

Every response from Neko Agent is generated by the OpenClaw reasoning API. Here's how it works behind the scenes:

  • All chat requests are routed to the OpenClaw /v1/chat/completions endpoint
  • API authentication uses server-side tokens — never exposed to the client
  • Responses use the OpenClaw gpt-4o-mini model for reasoning
  • TTS audio generated via ElevenLabs for voice responses
typescript
// How Neko Agent calls OpenClaw (simplified)
const response = await fetch(OPENCLAW_API_URL + "/v1/chat/completions", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer " + OPENCLAW_API_TOKEN,
  },
  body: JSON.stringify({
    model: "gpt-4o-mini",
    messages: [
      { role: "system", content: "You are Neko Agent..." },
      { role: "user", content: userMessage }
    ],
    temperature: 0.7,
    max_tokens: 2048,
  }),
});

const data = await response.json();
const reply = data.choices[0].message.content;

How It Works

When you send a message to Neko Agent, here's the full request lifecycle:

1
User sends a message
Client-side chat UI sends a POST to /api/chat with the conversation history.
2
Backend processes request
Next.js API route receives the message, adds system prompt, and prepares the OpenClaw payload.
3
OpenClaw reasoning
Request is forwarded to OpenClaw's /v1/chat/completions endpoint. OpenClaw processes the query through its reasoning engine.
4
Response returned
OpenClaw returns the AI response. The backend sends it back to the client.
5
TTS generation
The response text is sent to /api/tts which calls ElevenLabs. Audio is returned as base64 and played in the browser.
6
Live2D lip sync
The audio signal is analyzed in real-time to animate the Live2D model's mouth for lip sync.

API Reference

Neko Agent exposes these API endpoints. All endpoints are server-side — API keys are never sent to the client.

POST/api/chat

Send a message to Neko Agent and receive an AI-generated response.

json
// Request body
{
  "messages": [
    { "role": "user", "content": "What can you do?" }
  ]
}

// Response
{
  "ok": true,
  "reply": "I can help with coding, research, creative writing, 
            problem-solving, and much more. What do you need?"
}
POST/api/tts

Convert text to speech using ElevenLabs. Returns base64 audio.

json
// Request body
{
  "text": "Hello, I am Neko Agent."
}

// Response
{
  "ok": true,
  "audio": "<base64 encoded mp3>",
  "contentType": "audio/mpeg"
}

Environment Variables Required

OPENCLAW_API_URL— OpenClaw API endpoint
OPENCLAW_API_TOKEN— Authentication token
ELEVENLABS_API_KEY— ElevenLabs TTS key
ELEVENLABS_VOICE_ID— Voice selection ID

All keys are stored server-side only (Vercel env vars). Never exposed to the client.

Discord Bot Integration

Want Neko Agent in your Discord server? Here's how to build a bot that talks to the same OpenClaw backend.

Status: Coming Soon

Official Discord bot is in development. In the meantime, here's how to build your own:

javascript
// discord-bot.js — Example using discord.js
const { Client, GatewayIntentBits } = require("discord.js");

const client = new Client({ 
  intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] 
});

// Your Neko Agent instance URL
const NEKO_API = "https://your-deployment.vercel.app";

client.on("messageCreate", async (message) => {
  if (message.author.bot) return;
  if (!message.content.startsWith("!neko ")) return;
  
  const query = message.content.slice(6);
  
  try {
    const res = await fetch(NEKO_API + "/api/chat", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({
        messages: [{ role: "user", content: query }]
      }),
    });
    
    const data = await res.json();
    
    if (data.ok) {
      await message.reply(data.reply);
    } else {
      await message.reply("Agent error: " + (data.error?.message || "Unknown"));
    }
  } catch (err) {
    await message.reply("Connection error.");
  }
});

client.login(process.env.DISCORD_TOKEN);

Telegram Bot Integration

Build a Telegram bot that connects to Neko Agent's OpenClaw backend.

Status: Coming Soon

Official Telegram bot is in development. Here's how to build your own:

python
# telegram_bot.py — Example using python-telegram-bot
import requests
from telegram import Update
from telegram.ext import Application, CommandHandler, MessageHandler, filters

NEKO_API = "https://your-deployment.vercel.app"

async def handle_message(update: Update, context):
    user_msg = update.message.text
    
    response = requests.post(
        f"{NEKO_API}/api/chat",
        json={"messages": [{"role": "user", "content": user_msg}]},
        headers={"Content-Type": "application/json"},
    )
    
    data = response.json()
    reply = data.get("reply", "Error processing request.")
    
    await update.message.reply_text(reply)

app = Application.builder().token("YOUR_TG_BOT_TOKEN").build()
app.add_handler(MessageHandler(filters.TEXT & ~filters.COMMAND, handle_message))
app.run_polling()

Coding Companion

Use Neko Agent as a coding assistant directly from your terminal or editor.

bash
# Quick CLI usage with curl
curl -X POST https://your-deployment.vercel.app/api/chat \
  -H "Content-Type: application/json" \
  -d '{"messages": [{"role": "user", "content": "Write a React hook for debouncing"}]}'

Use Cases:

Generate boilerplate code
Debug error messages
Explain complex code
Write unit tests
Refactor & optimize
API design help
Database schema design
Architecture decisions

Security

Neko Agent is designed with security as a first-class concern.

Server-Side Keys

All API keys (OpenClaw, ElevenLabs) are stored as server-side environment variables on Vercel. They are NEVER sent to the browser.

No Data Logging

Conversations are not stored on the server. Chat history exists only in your browser session.

Token Authentication

OpenClaw API calls use Bearer token authentication. Tokens are rotated and stored securely.

Edge Deployment

Deployed on Vercel's edge network for low latency and high availability worldwide.

Roadmap

v0.1

Foundation

  • OpenClaw chat integration
  • Live2D model + animations
  • ElevenLabs TTS with lip sync
  • Core documentation
v0.2

Enhanced Agent

In Progress
  • Improved UI/UX overhaul
  • Better error handling & logging
  • Voice ID configuration
  • Integration docs (Discord/TG)
v0.3

Integrations

  • Official Discord bot
  • Official Telegram bot
  • API key management for third parties
  • Plugin system for custom tools
v1.0

Full Launch

  • Token contract deployment
  • Multi-model support
  • Community-built integrations
  • On-chain activity tracking

FAQ