By the end of this tutorial you’ll have an Eliza agent running on Livepeer’s LLM pipeline with five capabilities layered in: model routing through the Livepeer plugin, a character file shaping personality and bio, RAG-backed answers from a knowledge corpus, Slack and Discord client connectors, and a SwarmZero multi-agent orchestration that hands off work between specialised agents. Each layer builds on the previous; you can ship after any one of them. This is the Persona 1 deep activation moment. The LLM chatbot tutorial proved Livepeer can power a chat surface; this tutorial proves it can power a character with persistent identity, retrieval-augmented context, multiple platform integrations, and team-of-agents coordination. Adapted from the Livepeer Agent SPE guide and the existing build-an-ai-agent-on-Livepeer tutorial; verified against the current Eliza framework surface.
Required Tools
- Node.js 22 or later
pnpm(npm install -g pnpm)- A Livepeer Gateway accessible at a URL (paid provider, self-hosted, or the free
dream-gateway.livepeer.cloudfor development) - Optional: Slack workspace admin and Discord server admin access for the client integrations
- Optional: Python 3.11+ for the SwarmZero multi-agent section
- A code editor
Model Provider Layer
Eliza supports pluggable model providers. The Livepeer plugin routes inference requests to the AI Jobs API endpoint at a Livepeer Gateway.Configure the gateway
.env:LIVEPEER_API_KEY stays empty. For a paid Gateway, drop in the Bearer token.Create a minimal character file
characters/agent.character.json:modelProvider: "livepeer" field routes every inference call through the Livepeer plugin. The settings.model value passes through to the AI Jobs API; any Ollama-compatible model on the LLM pipeline works.Run the agent
Character File Depth
The character file is the single source of truth for the agent’s identity. Eight fields shape behaviour.| Field | What it does |
|---|---|
name | Display name in conversation and logs |
system | System prompt prepended to every conversation |
bio | Short biographical facts the agent draws on for self-introduction |
lore | Backstory or deep context the agent references when relevant |
topics | Subjects the agent is positioned to handle |
adjectives | Personality descriptors that shape tone |
messageExamples | Few-shot examples of conversation style |
knowledge | RAG entries the agent retrieves at inference time |
characters/agent.character.json:
RAG Knowledge
Eliza supports retrieval-augmented generation via theknowledge array. Entries are embedded at agent start and retrieved at inference time based on semantic similarity to the user’s message. The Livepeer LLM pipeline handles generation; embeddings happen in Eliza’s local embedding model.
Choose your knowledge corpus
Populate the knowledge array
Load larger corpora from files
knowledge/ directory at boot:Slack and Discord Clients
Eliza ships client connectors for Slack, Discord, Twitter, and Telegram. The agent listens on the platform, treats messages as input, and responds inline. The Livepeer plugin powers every reply.Slack: create a Slack app
api.slack.com/apps, create a new app from manifest, paste:Discord: create a Discord bot
discord.com/developers/applications, create a new application, add a Bot user. Capture the Bot Token from the Bot tab.Generate an OAuth2 invite URL with bot scope and Send Messages, Read Messages, Read Message History permissions. Invite the bot to your server.Enable clients in the character file
Multi-Agent Swarms
A single agent reaches a ceiling. Complex workflows want multiple specialised agents handing off context. SwarmZero is a Python framework that orchestrates multi-agent workflows and supports Livepeer as the inference backend. The example below sets up two agents: a research agent that gathers facts via the Livepeer LLM, and a writer agent that composes the final answer from those facts. The orchestration runs in Python; the agents themselves run on Livepeer.Run the swarm
Reviewer, Translator, Summariser) and chain their outputs.Production Considerations
Six things change between the local agent and a production deployment. Switch to a paid Gateway. The community Gateway is for experimentation. Production agents run against a paid Gateway with rate limits, authentication, and SLA. Monitor model warmth. Cold-start delays kill agent UX. Either pre-warm the model with a scheduled request every few minutes, or self-host an Orchestrator with the target model pinned in memory. Bound RAG corpus size. Embedding a 10 MB corpus is fine; 10 GB is not. Chunk size, embedding model, and retrieval count all affect quality. Test retrieval against a held-out set of queries before shipping. Rate-limit per user. Eliza by default treats every message as a fresh request. A malicious user can drive cost. Add a per-user rate limit in the Slack and Discord adapters, and a per-agent token budget. Character file versioning. Treat character files as code. Commit to git, review changes, ship through CI. A character file edit changes agent behaviour as much as a model swap. Cost observability. Per-message inference cost scales linearly with conversation length and RAG context. Log the input/output token counts per message and aggregate by agent and user. Full hardening guidance in .Common Errors
Agent starts but every response is gibberish
Agent starts but every response is gibberish
modelProvider is not set to livepeer, or the Gateway URL is wrong. Confirm .env has LIVEPEER_GATEWAY_URL set and the character file has "modelProvider": "livepeer".Cold-start times out after 60 seconds
Cold-start times out after 60 seconds
RAG retrieval returns unrelated entries
RAG retrieval returns unrelated entries
Slack bot doesn't respond to messages
Slack bot doesn't respond to messages
@Atlas once to trigger an invite prompt). The SLACK_APP_TOKEN is missing; socket mode requires both Bot and App-Level tokens.Discord bot connects but messages fail with 'missing access'
Discord bot connects but messages fail with 'missing access'
MESSAGE CONTENT privileged intent enabled in the Discord developer portal under the Bot tab. Without it, the bot receives empty message content.SwarmZero workflow stalls on the second agent
SwarmZero workflow stalls on the second agent