Skip to content

Friend Portal

The Friend Portal is a web UI at https://<agent>.your-domain.net/portal where friends manage their relationship with agents.

The portal uses magic-link auth — no passwords, no accounts to create.

  1. Agent generates a link — calls POST /api/auth/portal-session with the friend’s ID
  2. Agent sends the link — via the friend’s current channel
  3. Friend clicks — gets a 30-day session token stored in localStorage
  4. Authenticated — all subsequent /api/portal/* requests include the token as Authorization: Bearer
Agent → POST /api/auth/portal-session {friend_id: "alice"}
← {portal_url: "https://my-agent.your-domain.net/portal?s=abc123...", session_token: "abc123..."}
Agent → sends portal_url to friend via their preferred channel
Friend → clicks link → portal loads → stores session in localStorage
  • View the agent’s notes about you (read-only)
  • Edit your own MEMORY.md file (persists across sessions)
  • The agent reads this file when interacting with you
  • Create, view, update, and delete secrets in your friend-<name> namespace
  • Secrets are stored as Kubernetes Secrets (base64-encoded)
  • Used for API keys, credentials, and other sensitive data
  • View pods, services, and deployments in your namespace
  • Monitor resource quota usage
  • View exposed services and their URLs
  • View scheduled tasks that target your sessions
  • Create, enable/disable, delete, and manually trigger cron jobs

All portal endpoints require a valid friend session token:

MethodPathDescription
GET/api/portal/meFriend profile + stats
GET/POST/DELETE/api/portal/secretsSecret CRUD
GET/PUT/DELETE/api/portal/secrets/:nameIndividual secret operations
GET/api/portal/agentsAgent relationships
GET/api/portal/namespacePods, services, deployments, quota
GET/PUT/api/portal/workspace/memoryFriend’s editable MEMORY.md
GET/api/portal/workspace/friend-notesAgent’s notes (read-only)
GET/POST/DELETE/api/portal/workspace/cronsCron job management