đ¤ 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. đ¤âĄ