RAIAβ„’ Specification

πŸ€– Hermes Agent & Multi-Profile Workflows

Developer architecture guide on persistent memory, specialized profiles, and custom skills of Hermes Agent in our engineering pipeline.

← Back to Developer Hub TEXTBOOK SPECIFICATION
RAIAβ„’ (Real estate Artificial Intelligence Agent) Specification

Developer architecture guide on persistent memory, specialized profiles, and custom skills of Hermes Agent in our engineering pipeline.

🧩 Section A: In Plain English

πŸ€– Hermes Agent & Multi-Profile Workflows

The Hermes Agent is our autonomous AI framework for developer workflows, system commands, database migrations, and codebase updates. It operates via CLI and messaging gateways with deep environmental self-awareness.

πŸ€– Hermes Agent & Multi-Profile Workflows

Concept

What is Hermes Agent?

Hermes Agent is our autonomous AI framework designed to run developer workflows, execute system commands, run database migrations, and manage codebase updates. Operating on-demand via the CLI and messaging gateways, Hermes differs from traditional static LLM clients through its state-machine tool invocation, context compression, and deep environmental self-awareness.

Security Isolation

Hermes VPS Boundary (ADR-234)

Under strict boundary security rules, Hermes is a purely developer-facing bot hosted exclusively on our esoteric VPS (lt-vno-01.esoteric.love / 194.31.52.167) under the esoteric repo. It is completely isolated from RAIA's production environment. It connects to database clusters under a highly restricted hermes_readonly Postgres role to guarantee zero destructive risk.

Core Mechanics of Hermes Workflows

Rather than resetting state at the end of every interaction, Hermes maintains durable context across turns and sessions. We harness this architecture using three primary pillars: **Structured Profiles**, **Specialized Skills**, and **Durable Memory**.

πŸ“ Multi-Profile Isolation

Profiles allow us to run entirely independent Hermes instances with isolated file environments, configurations, histories, and memories.

  • Separation of Concerns: The default profile manages day-to-day scripting, while separate profiles isolate staging, client-specific configurations, or local sandboxes.
  • Directory Structure: Profiles are stored at ~/.hermes/profiles/<name>/. Each maintains its own config.yaml, .env file, local sessions, and memories.
  • Model Routing: We utilize specialized models across profiles. Our codebase updates are executed with **Claude**, intensive research is routed to **DeepSeek**, and general maintenance/command-execution tasks utilize **Gemini**.

⚑ Procedural Skills

Skills are Hermes' procedural memory. They represent modular, reusable, markdown-structured blueprints that instruct the agent on executing specialized tasks.

  • Skill Assets: Stored under ~/.hermes/skills/, skills consist of an authoritative SKILL.md accompanied by supporting assets (such as validation scripts and templates).
  • Explicit Workflows: If an operation requires more than 5 tool calls, is highly complex, or has specific environmental pitfalls, we author a skill to guarantee deterministic execution.
  • Dynamic Loading: Skills can be loaded on the fly. When invoked, Hermes reads the skill definition into its active context, absorbing its trigger conditions, CLI steps, and verification procedures.
Key Distinction: Do not confuse the developer-facing Hermes Agent with the staff-facing raia_robot Telegram bot. The raia_robot bot is integrated directly into RAIA's production repository and handles tenant-facing and property manager notifications, while Hermes remains restricted to developer infrastructure and isolated tools.

Managing Profiles and Skills from the Terminal

Developers can inspect and adjust Hermes' state using both CLI terminal tools and inline slash commands during active sessions.

1
Profile Management Commands

Command wrappers to inspect, clone, and navigate isolated workspaces:

# List all active and available profiles
hermes profile list

# Create a fresh profile cloned from the default template
hermes profile create staging --clone-from default

# Activate and set a sticky default profile
hermes profile use staging

# Show the active profile's detailed paths and current state
/profile (in-session) or hermes profile show staging
2
Skill Management and Authoring

Repository Code

The live codebase implementation for this specification sits within the following repository folder:

To install, list, or dynamically patch procedural skills:

# Browse the available skill library and list locally installed files
hermes skills list

# Load a specific procedural skill directly into your current session
/skill <name> (in-session)

# Author or patch an existing skill with specialized steps or fixes
# Stored at ~/.hermes/skills/<domain>/<name>/SKILL.md
# Supported actions: create, patch, edit, delete
# Always include metadata, triggers, step-by-step commands, and pitfalls
3
Durable Memory and Personalization

Hermes maintains declarative memories (saved under ~/.hermes/state.db and injected into every conversation). We separate memory targets strictly:

  • 'user' Target: Persists human-centric facts (e.g. Eugin prefers WA over Web Forms).
  • 'memory' Target: Persists stable host, tooling, or project environment facts (e.g. db_raia database ID is suazhpquxpzuhbtritxj).
# Read, add, or update memories using the structured memory tool
# Always write facts as declarative, descriptive statements, not instructions.
# Correct: "Project uses Node.js v18 with ESM"
# Incorrect: "Run build using Node.js"

Essential Slash Commands Reference

When interacting with the agent via CLI or the Telegram bot, developers utilize these in-session slash commands to alter agent configuration mid-flight:

Command Action Developer Best Practice
/reset or /new Starts a fresh conversation Use before initiating a completely new task. This forces prompt context cleanup and preserves token cache efficiency.
/model [name] Changes the active LLM mid-session Route lightweight or command-execution jobs to Gemini, high-level code refactoring to Claude, and deep research tasks to DeepSeek.
/skills Interactively search/load skills Use to load a procedure guide directly into the active session without restarting.
/yolo Bypasses CLI command approvals Speeds up background operations during rapid local prototyping (disables safety prompt intercepts on critical commands).
/status Displays active platform connection Verifies telemetry, runtime memory consumption, and gateway routing parameters.
Maintenance Rule: Skills must remain clean and up-to-date. If you execute a procedure and discover a missing environment variable, updated API, or general pitfall, immediately call skill_manage(action='patch') to keep the procedural guide optimized for the next agent session.
πŸ”§ Section C: Developer Guide

Architecture Details

Multi-agent architecture with a hierarchical orchestration model. The orchestrator agent manages task decomposition, worker agent dispatch, and result aggregation. Each agent runs in an isolated context with its own toolset and memory, communicating via a shared message bus.

  • Core Component: Agent orchestration engine
  • Data Flow: User Request β†’ Orchestrator β†’ Task Decomposition β†’ Worker Agents β†’ Result Aggregation β†’ Response
  • Integration Points: Hermes Agent framework, tool registry, memory stores, delegation bus

Configuration Reference

Key configuration parameters for this system:

Parameter Type Default Description
max_concurrent_agents integer 3 Maximum number of parallel worker agents
agent_timeout_seconds integer 300 Agent execution timeout
model_routing_policy string cost_optimized Model selection strategy (precision, cost_optimized, speed)
AGENT ARCHITECTURE β€” ORCHESTRATOR β†’ WORKER β†’ RESULT 1. ORCHESTRATOR Task Decomposition Worker Dispatch 🎯 Orchestrator 2. WORKER AGENTS Isolated Execution Tool & Memory Access πŸ€– Workers 3. RESULT AGGREGATION Merge & Validate Response Formatting πŸ“Š Aggregation Hierarchical agent architecture: orchestrator decomposes tasks, workers execute in isolation, results are aggregated and validated Isolated contexts Β· Tool access control Β· Memory injection Β· Result validation Orchestrator / Dispatch Workers / Execution Aggregation / Output Data flow β†’

Figure 2: Agent architecture β€” component interaction and data flow.

Troubleshooting

Issue Cause Resolution
Agent timeout Complex task or downstream dependency failure Increase timeout or break task into smaller subtasks
Orchestrator loop detected Circular delegation or self-referencing task Enforce max_spawn_depth and cycle detection
Repo Reference RAIA

This component is part of the RAIA (Real estate Artificial Intelligence Agent) platform mono-repo. Implementation details, API contracts, and integration tests are available in the repository.