Skip to main content

Norns Admin

Web interface for interacting with Norns AI agents.


Overview

Norns Admin is a Next.js application providing chat UI, voice calls, document management, and admin features.

PropertyValue
Containernorns-admin
URLnorns.ravenhelm.dev
Port3000 (internal), 3001 (external)
Source~/ravenhelm/docs/AI-ML-Platform/norns-agent/admin/
Repogitlab.ravenhelm.dev/ravenmask/norns-admin

Features

FeatureDescriptionRoute
Chat InterfaceConversational AI with orchestration visualization/chat
Voice ChatLiveKit-powered voice calls/voice
SessionsView all user sessions with transcripts/sessions
Knowledge BaseManage documents and memories/knowledge
DocumentsUpload files, crawl web content, view chunk details/documents
ToolsManage Bifrost tools and configurations/tools
CallsView call history and manage campaigns/calls
ProfileUser identity, preferences, insights/profile
SettingsConfiguration and preferences/settings

Documents Page

Document management interface with chunk viewing.

Features

FeatureDescription
File UploadDrag-and-drop or click to upload documents
Web CrawlingScrape single pages or crawl entire sites
Document ListView all ingested documents with chunk counts
Chunk ViewerClick any document to view its content chunks
Metadata DisplaySee token counts, content types, and source info

Document Detail Modal

Click on any document card to open the detail modal showing:

  • Document metadata (name, type, source URL)
  • List of all chunks with:
    • Chunk index and token count
    • Full chunk content (expandable)
    • Content type indicator
    • Associated metadata

Calls & Campaigns

Telephony management interface for outbound campaigns.

Call History

View all AI voice calls with:

  • Call status (completed, failed, in-progress)
  • Duration and timestamps
  • Recipient information
  • Transcript access

Campaigns

Create and manage outbound calling campaigns:

  • Campaign creation wizard
  • Recipient list management
  • Campaign status monitoring
  • Bulk recipient import

Routes

RouteDescription
/callsCall history list
/calls/newInitiate new call
/calls/campaignsCampaign list
/calls/campaigns/newCreate campaign
/calls/campaigns/[id]Campaign details
/calls/campaigns/[id]/add-recipientsAdd recipients

Chat Enhancements

Orchestration Timeline

Visual representation of agent workflow execution:

  • Step-by-step execution path
  • Tool calls and responses
  • Memory retrievals
  • Decision points

Memory Recall

View retrieved context during conversations:

  • Knowledge base matches
  • Previous conversation context
  • User profile information

Task Sidebar

Manage tasks created during conversations:

  • Real-time task creation
  • Status updates
  • Task completion tracking

Tools Management

Interface for managing Bifrost tools:

RouteDescription
/toolsList all available tools
/tools/[id]Tool configuration and testing

RBAC System

Role-based access control for admin features.

Components

ComponentDescription
PermissionGateConditionally render based on permissions
RoleGateConditionally render based on roles
PermissionProviderContext provider for permission state

Usage

import { PermissionGate } from '@/lib/rbac';

<PermissionGate permission="admin:calls:manage">
<CampaignManagement />
</PermissionGate>

Sessions Admin Page

Real-time session monitoring and debugging interface.

Access

Navigate to norns.ravenhelm.dev/sessions

Features

FeatureDescription
Session ListView all sessions across all users and channels
Channel FilteringFilter by slack, web, voice, or siri
Status FilteringFilter active vs completed sessions
User SearchSearch by user name or email
Live TranscriptReal-time message updates via SSE
Langfuse TracesEmbedded trace visualization for debugging

Architecture

┌─────────────────────────────────────────────────────────────────┐
│ /sessions (Admin Page) │
├─────────────────────────────────────────────────────────────────┤
│ Session List Panel │ Session Detail Panel │
│ ├─ Filter by channel │ ├─ Metadata header │
│ ├─ Filter by status │ ├─ Transcript tab │
│ ├─ Search by user │ │ └─ SSE real-time updates │
│ └─ Session cards │ └─ Trace tab │
│ └─ Click to select │ └─ Langfuse iframe │
└─────────────────────────────────────────────────────────────────┘

Authentication

Uses Zitadel SSO via Auth.js:

Login → Zitadel → Callback → Session

Protected vs Public Routes

Route PatternAuth Required
/loginNo
/healthNo
/api/auth/*No
/api/voice/*No (LiveKit auth)
/api/proxy/*No (API key auth)
/api/bifrost/*No (Proxy to Bifrost)
/api/telephony/*No (Proxy to Telephony API)
All other routesYes

API Proxies

The admin app proxies requests to backend services:

Proxy RouteTargetDescription
/api/proxy/[...path]Norns AgentGeneral agent API
/api/bifrost/[...path]Bifrost APITool gateway
/api/telephony/[...path]Telephony APIVoice/calls

Quick Commands

# View logs
docker logs -f norns-admin

# Restart
docker restart norns-admin

# Rebuild
cd ~/ravenhelm/docs/AI-ML-Platform/norns-agent/admin
export NORNS_API_KEY=$(grep NORNS_API_KEY ~/ravenhelm/secrets/.env | cut -d= -f2)
export AUTH_SECRET=$(grep AUTH_SECRET ~/ravenhelm/secrets/.env | cut -d= -f2)
export AUTH_ZITADEL_CLIENT_ID=$(grep AUTH_ZITADEL_CLIENT_ID ~/ravenhelm/secrets/.env | cut -d= -f2)
export AUTH_ZITADEL_CLIENT_SECRET=$(grep AUTH_ZITADEL_CLIENT_SECRET ~/ravenhelm/secrets/.env | cut -d= -f2)
docker compose -f docker-compose.service.yml build --no-cache
docker compose -f docker-compose.service.yml up -d --force-recreate

Configuration

Environment Variables

environment:
# API Access
- NORNS_AGENT_URL=http://host.docker.internal:3901
- NORNS_API_KEY=${NORNS_API_KEY}
- NEXT_PUBLIC_NORNS_API_URL=http://host.docker.internal:8000

# Auth (Zitadel)
- AUTH_SECRET=${AUTH_SECRET}
- AUTH_ZITADEL_ID=zitadel
- AUTH_ZITADEL_CLIENT_ID=${AUTH_ZITADEL_CLIENT_ID}
- AUTH_ZITADEL_CLIENT_SECRET=${AUTH_ZITADEL_CLIENT_SECRET}
- AUTH_ZITADEL_ISSUER=https://auth.ravenhelm.dev
- AUTH_TRUST_HOST=true

# Voice (optional)
- NEXT_PUBLIC_LIVEKIT_URL=wss://livekit.ravenhelm.dev
- VOICE_API_URL=http://voice-api:8000

Docker Compose

The admin service runs from a separate docker-compose file:

Location: ~/ravenhelm/docs/AI-ML-Platform/norns-agent/admin/docker-compose.service.yml


Troubleshooting

Issue: Login Fails

Symptoms: Can't authenticate with Zitadel

Solutions:

  1. Verify Zitadel client configuration
  2. Check AUTH_SECRET is set in container
  3. Clear browser cookies
  4. Check Zitadel logs: docker logs zitadel

Issue: Sessions Page Shows "Failed to load"

Symptoms: Sessions page can't fetch data

Solutions:

  1. Verify NORNS_API_KEY is set in container:
    docker exec norns-admin env | grep NORNS
  2. Check norns-agent is running:
    curl -H "X-API-Key: $NORNS_API_KEY" http://localhost:3901/sessions/stats
  3. Check agent logs: docker logs norns-agent

Issue: Document Chunks Not Loading

Symptoms: Document detail modal shows error

Solutions:

  1. Verify document exists in database
  2. Check norns-agent logs for chunk retrieval errors
  3. Verify API key authentication

Issue: Real-time Updates Not Working

Symptoms: Transcript doesn't update in real-time

Solutions:

  1. Verify SSE endpoint is accessible
  2. Check browser dev tools Network tab for EventSource connection
  3. Verify session_id format matches database