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
| Service | Purpose | URL |
|---|---|---|
| Norns Agent | Core AI agent backend | norns-pm.ravenhelm.dev |
| Norns Memory System | Long-term memory & learning | (internal) |
| Norns Admin | Admin UI & chat interface | norns.ravenhelm.dev |
| Norns Web Crawling | Web content ingestion for RAG | norns.ravenhelm.dev/documents |
| LangGraph | Agent workflow engine | norns-api.ravenhelm.dev |
| Langfuse | LLM observability | langfuse.ravenhelm.dev |
| Ollama | Local LLM inference | Internal (11434) |
| Redpanda | Event streaming | Internal (9092) |
| User Profile System | Profile management & insights | bifrost-api.ravenhelm.dev |
| Bifrost MCP Gateway | Tool routing & execution | bifrost-api.ravenhelm.dev |
| Bifrost Tool Catalog | Complete tool reference (21 tools) | - |
| Norns Telephony | Outbound/inbound calling | +1 (737) 214-3330 |
| Norns WhatsApp Channel | WhatsApp messaging | Twilio Sandbox |
| Multi-Channel Sessions | Cross-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
| Capability | Description |
|---|---|
| Task Management | Create, update, query tasks |
| Calendar | Google Calendar integration |
| Home Control | Home Assistant device control |
| Grocery | Grocy inventory management |
| Observability | Query Grafana, Loki, Prometheus |
| Slack | Post messages, respond to commands |
| Memory | Recall past interactions, learn patterns |
| Knowledge | Web search, weather, news (details) |
| Telephony | Make and receive phone calls (details) |
Agent Domains
Norns uses a hierarchical agent architecture with specialized domain supervisors:
| Domain | Description | Documentation |
|---|---|---|
| Task | Task and project management | Norns Agent |
| Calendar | Google Calendar integration | Norns Agent |
| Home | Smart home control via Home Assistant | Norns Agent |
| Navigation | Directions, places search, travel times | Navigation Domain |
| Observability | Metrics, logs, and monitoring | Norns Agent |
| Memory | Long-term memory and learning | Norns Memory System |
| Knowledge | Web search, weather, news | Knowledge Domain |
| Code | File operations, git, GitLab, CI/CD | Coding Agent |
| Social | Slack messages, DMs, notifications | Norns Agent |
| Goal | Goal tracking and background execution | Goals & 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
Navigation Domain Supervisor (2026-01-05)
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.locationover 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.pyandauth/dependencies.py - CORS workaround: Norns Admin uses
/api/rbac/permissionsproxy
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.