ᛉ AI Agents Overview
The Vanaheim realm houses BrierStudios' AI agent ecosystem — a collection of intelligent chat agents that operate across platforms, powered by the Lilith personality system.
The Agent Architecture
Every BrierStudios agent follows the same core architecture:
┌─────────────────────────────────────────────┐
│ Platform Layer │
│ ┌──────────────┐ ┌──────────────────┐ │
│ │ Discord Bot │ │ Telegram Agent │ │
│ └──────┬───────┘ └────────┬─────────┘ │
│ │ │ │
│ ┌──────┴────────────────────┴─────────┐ │
│ │ Agent Runtime (Core) │ │
│ │ ┌────────────────────────────┐ │ │
│ │ │ Personality Engine │ │ │
│ │ │ (Lilith v2.0 Profile) │ │ │
│ │ └────────────────────────────┘ │ │
│ │ ┌────────────────────────────┐ │ │
│ │ │ Command Router │ │ │
│ │ │ (Slash Commands) │ │ │
│ │ └────────────────────────────┘ │ │
│ │ ┌────────────────────────────┐ │ │
│ │ │ Context Manager │ │ │
│ │ │ (Memory & Session) │ │ │
│ │ └────────────────────────────┘ │ │
│ └─────────────────────────────────────┘ │
│ │ │
│ ┌──────┴──────────────────────────┐ │
│ │ LLM Integration Layer │ │
│ │ (OpenAI / Local Models) │ │
│ └─────────────────────────────────┘ │
└─────────────────────────────────────────────┘
Platform Agents
Discord Bot — Lilith v2.0
The primary agent platform. Lilith v2.0 operates as a Discord bot with 19 slash commands, personality-driven responses, and realm-aware context.
Features:
- 19 slash commands (see CLI Commands)
- Personality-driven responses using the Lilith profile
- Multi-server context awareness
- Ephemeral and public response modes
- Image generation via connected pipelines
- Code snippet formatting and explanation
Configuration:
name: lilith-discord
version: "2.0.0"
platform: discord
personality: lilith-v2
commands:
- slash: true
- prefix: "!"
- mention: true
rate_limits:
global: 30/min
per_user: 10/min
permissions:
- send_messages
- embed_links
- attach_files
- read_message_history
Telegram Agent
A streamlined version of Lilith for Telegram, optimized for smaller group conversations and direct messaging.
Features:
- Inline command processing (
/commandformat) - Conversation threading support
- Sticker and media responses
- Group admin integration
- Privacy-first: no message storage
Configuration:
name: lilith-telegram
version: "2.0.0"
platform: telegram
personality: lilith-v2
commands:
- prefix: "/"
rate_limits:
global: 20/min
per_user: 8/min
privacy:
store_messages: false
store_context: session-only
data_retention: none
The Personality Engine
At the heart of every agent is the Personality Engine — a system that controls how the agent speaks, responds, and behaves.
How It Works
import { PersonalityEngine } from '@brierstudios/personality-engine';
// Load a personality profile
const engine = new PersonalityEngine(LILITH_V2_PROFILE);
// Generate a response with personality
const response = await engine.respond({
message: "What's the weather like?",
context: { channel: 'discord', server: 'brierstudios' },
history: recentMessages,
});
// response.text = "I don't check the weather — I make it. But seriously,
// I can't help with that. Try a weather API! ᛊ️"
// response.tone = "playful"
// response.confidence = 0.95
Personality Parameters
Each personality profile defines:
| Parameter | Description | Example (Lilith) |
|---|---|---|
| Traits | Core behavioral traits | curious, direct, playful |
| Voice | Communication style | technical-but-approachable |
| Tone | Default emotional tone | casual-professional |
| Humor | Humor type | dry-and-self-aware |
| Verbosity | Response length preference | concise |
| Restrictions | What the personality never does | never patronizing, never vague |
Profile Switching
Agents can switch personality profiles dynamically:
// Switch personality for a specific channel
engine.setProfile('lilith-v2', { channelId: '112233' });
// Use a different profile for moderation
engine.setProfile('strict-moderator', { context: 'moderation' });
// Multiple personalities running simultaneously
engine.registerProfile('lilith-v2', LILITH_PROFILE);
engine.registerProfile('heimdall-v1', HEIMDALL_PROFILE);
Slash Commands
The Discord agent supports 19 slash commands, organized into five categories. See the full reference at CLI Command Reference.
Key agent-specific commands:
/agent create— Create a new agent configuration/agent deploy— Deploy an agent to its platform/agent personality— Configure a personality profile/agent chat— Open an interactive test session
Context Management
Agents maintain conversation context using a sliding window approach:
interface AgentContext {
channelId: string;
userId: string;
serverId: string;
messageHistory: Message[]; // Last 20 messages
personalityOverrides: Partial<PersonalityProfile>;
sessionStart: Date;
metadata: Record<string, unknown>;
}
Key behaviors:
- Last 20 messages retained per channel
- Session expires after 30 minutes of inactivity
- No messages are stored persistently (ephemeral only)
- Cross-channel context is NOT shared by default
Deployment
Agents deploy through the Yggdrasil CLI:
# Deploy Discord agent
yg agent deploy --name lilith-discord --env production
# Deploy Telegram agent
yg agent deploy --name lilith-telegram --env production
# Test locally
yg agent chat --name lilith-discord
All agents run on Cloudflare Workers for global low-latency response times.
Monitoring
Agent health is monitored through the Yggdrasil bus:
# Check agent status
yg status --agent lilith-discord
# View real-time logs
yg deploy logs --realm vanaheim --follow
Key metrics:
- Response latency (p50, p95, p99)
- Token usage per conversation
- Error rate by command
- Personality consistency score
Every agent has a soul. We just code ours into existence. ᛉᛊ