Skip to main content

AI/ML Platform

Agentic AI infrastructure powering Norns and related services.


Overview

The AI/ML platform provides intelligent automation through LangGraph-based agents, local LLM inference, and comprehensive observability.

┌──────────────────────────────────────────────────────────────────┐
│ AI/ML PLATFORM │
├──────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────┐ │
│ │ Norns Admin │───▶│ LangGraph │───▶│ Ollama │ │
│ │ (Frontend) │ │ (Agents) │ │ (LLM) │ │
│ └─────────────────┘ └─────────────────┘ └─────────────┘ │
│ │ │ │ │
│ ▼ ▼ │ │
│ ┌─────────────────┐ ┌─────────────────┐ │ │
│ │ Norns Agent │───▶│ Langfuse │◀─────────┘ │
│ │ (Backend) │ │ (Observability) │ │
│ └─────────────────┘ └─────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────┐ │
│ │ Redpanda │ │
│ │ (Messaging) │ │
│ └─────────────────┘ │
└──────────────────────────────────────────────────────────────────┘

Services

ServicePurposeURL
Norns AgentCore AI agent backendnorns-pm.ravenhelm.dev
Norns Memory SystemLong-term memory & learning(internal)
Norns AdminAdmin UI & chat interfacenorns.ravenhelm.dev
Norns Web CrawlingWeb content ingestion for RAGnorns.ravenhelm.dev/documents
LangGraphAgent workflow enginenorns-api.ravenhelm.dev
LangfuseLLM observabilitylangfuse.ravenhelm.dev
OllamaLocal LLM inferenceInternal (11434)
RedpandaEvent streamingInternal (9092)
User Profile SystemProfile management & insightsbifrost-api.ravenhelm.dev
Bifrost MCP GatewayTool routing & executionbifrost-api.ravenhelm.dev
Bifrost Tool CatalogComplete tool reference (21 tools)-
Norns TelephonyOutbound/inbound calling+1 (737) 214-3330
Norns WhatsApp ChannelWhatsApp messagingTwilio Sandbox
Multi-Channel SessionsCross-channel conversation memory-

Architecture

Agent Flow

User Request → Norns Admin → LangGraph → Agent Graph

├── Memory (Muninn - episodic/semantic)
├── Tools (Home Assistant, Calendar, etc.)
├── Ollama (embeddings, local inference)
└── Claude API (complex reasoning)


Langfuse (trace recording)

Memory Architecture (Raven Model)

┌─────────────────────────────────────────┐
│ Huginn (State) - Redis session state │
└─────────────────────────────────────────┘

┌─────────────────────────────────────────┐
│ Context (Identity) - User permissions │
└─────────────────────────────────────────┘

┌─────────────────────────────────────────┐
│ Muninn (Memory) - Episodic + Semantic │
│ • Vector embeddings (pgvector) │
│ • Pattern extraction & learning │
│ • Knowledge entity graph │
└─────────────────────────────────────────┘

See Norns Memory System for details.

Data Stores

  • PostgreSQL (ravenmaskos): Tasks, projects, user data, memories
  • pgvector: Embedding storage for semantic search
  • Redis: Session cache, rate limiting
  • Redpanda: Event streaming between agents

Capabilities

Norns Agent Capabilities

CapabilityDescription
Task ManagementCreate, update, query tasks
CalendarGoogle Calendar integration
Home ControlHome Assistant device control
GroceryGrocy inventory management
ObservabilityQuery Grafana, Loki, Prometheus
SlackPost messages, respond to commands
MemoryRecall past interactions, learn patterns
KnowledgeWeb search, weather, news (details)
TelephonyMake and receive phone calls (details)

Agent Domains

Norns uses a hierarchical agent architecture with specialized domain supervisors:

DomainDescriptionDocumentation
TaskTask and project managementNorns Agent
CalendarGoogle Calendar integrationNorns Agent
HomeSmart home control via Home AssistantNorns Agent
NavigationDirections, places search, travel timesNavigation Domain
ObservabilityMetrics, logs, and monitoringNorns Agent
MemoryLong-term memory and learningNorns Memory System
KnowledgeWeb search, weather, newsKnowledge Domain
CodeFile operations, git, GitLab, CI/CDCoding Agent
SocialSlack messages, DMs, notificationsNorns Agent
GoalGoal tracking and background executionGoals & Background Execution

Quick Commands

# Check all AI/ML services
for svc in norns-agent norns-admin langgraph langfuse-web ollama norns-redpanda; do
echo "=== $svc ==="
docker ps --filter "name=$svc" --format "{{.Names}}: {{.Status}}"
done

# View Norns agent logs
docker logs -f norns-agent

# Test Ollama
docker exec ollama ollama list

# Query Langfuse
curl https://langfuse.ravenhelm.dev/api/public/health

# Check memory stats
docker exec -i postgres psql -U ravenhelm -d ravenmaskos -c \
"SELECT
(SELECT COUNT(*) FROM episodic_memories) as episodic,
(SELECT COUNT(*) FROM semantic_patterns) as patterns;"

Environment Variables

Key environment variables for AI services:

# API Keys
ANTHROPIC_API_KEY=<key>
OPENAI_API_KEY=<key>

# Langfuse
LANGFUSE_PUBLIC_KEY=<key>
LANGFUSE_SECRET_KEY=<key>
LANGFUSE_HOST=http://langfuse-web:3000

# Embeddings
OLLAMA_URL=http://ollama:11434
OLLAMA_EMBED_MODEL=nomic-embed-text
EMBEDDING_PROVIDER=auto

# Integrations
SLACK_BOT_TOKEN=<token>
HOMEASSISTANT_TOKEN=<token>
GOOGLE_CALENDAR_CLIENT_ID=<id>

Recent Updates

Fixed and documented the Navigation domain supervisor with several critical improvements:

  • Two-phase execution: Automatically gets directions to top result when user requests "find X and get directions"
  • Database-first location resolution: Prioritizes users.location over memory context for more reliable "near me" queries
  • Slack delivery integration: Navigation handles its own Slack delivery (only sends directions, not places list)
  • Parallel routing fix: Prevents Social domain from being called in parallel with Navigation (avoiding duplicate messages)
  • Graceful error handling: Converts all API errors to user-friendly messages

See Navigation Domain for complete documentation.

RBAC Integration (2026-01-03)

Norns Admin and Bifrost API now integrate with OpenFGA for fine-grained authorization:

  • Store ID: 01KE1W1JS5HZWWJSZKG5HR9XA5
  • Model ID: 01KE1W3RJH1E13G84N3ERN5XDN
  • Tuples migrated: 23 authorization relationships
  • Integration: Bifrost's services/openfga.py and auth/dependencies.py
  • CORS workaround: Norns Admin uses /api/rbac/permissions proxy

See OpenFGA for details.

Memory System Fix (2026-01-03)

Fixed pgvector embedding handling in Norns memory system:

  • Issue: Embeddings were incorrectly converted to strings
  • Fix: Pass embeddings as Python lists directly to asyncpg
  • Affected files: episodic.py, muninn_context.py
  • Type registration: pgvector.asyncpg.register_vector() handles conversion

See Norns Memory System for details.

Zitadel Opaque Token Support (2026-01-03)

Bifrost now handles both JWT and opaque tokens from Zitadel:

  • Detection: token.count('.') == 2 → JWT, else opaque
  • Validation: Opaque tokens validated via Zitadel's /oidc/v1/userinfo
  • User lookup: By auth_provider_id (Zitadel sub), not UUID

See Zitadel for token details.

Multi-Task Parallel Execution & Social Domain (2026-01-07)

Major update to Norns agent with parallel task execution and communication capabilities:

Multi-Task Support:

  • Compound requests are now automatically decomposed into discrete tasks
  • Tasks are executed in parallel using asyncio.as_completed() for optimal performance
  • Each task streams its own progress independently
  • Example: "Add eggs to shopping list, check calendar, and call John" → 3 parallel tasks

Social Domain:

  • New SOCIAL domain for all communication tasks
  • SlackMessagingWorker: Send Slack messages and DMs
  • PhoneCallWorker: Make outbound calls via telephony service (with API key auth)
  • SMSWorker: Send SMS via Twilio REST API

Smart Contextual Greeting:

  • Greetings now vary based on conversation context
  • Uses dynamic templates with time-of-day awareness
  • Fresh starts get friendly greetings; quick follow-ups get "Sure!" style responses

Telephony Delegation:

  • Voice agent can now delegate to Norns for Slack messaging during calls
  • Updated system prompt to allow broader delegation types
  • User can say "Send me that on Slack" and the voice agent will delegate

See Norns Agent for full documentation.