Skip to content

feat: ship memory, autonomy, Hermes, and tmux manager - #61

Merged
cvsloane merged 16 commits into
mainfrom
build/agentd-origin-main-20260216
Mar 28, 2026
Merged

cvsloane merged 16 commits into
mainfrom
build/agentd-origin-main-20260216

Conversation

@cvsloane

@cvsloane cvsloane commented Mar 28, 2026 •

Copy link
Copy Markdown
Owner

Summary\n- ship the production memory and automation tranche already deployed on apps-vps\n- add Hermes integration, external wake/status plumbing, and memory file delivery\n- add the new tmux-first dashboard manager and shared session workbench\n\n## Verification\n- deployed manual compose stack on apps-vps and verified /health plus /tmux\n- pnpm --filter @agent-command/dashboard typecheck\n- pnpm --filter @agent-command/dashboard build\n\n## Notes\n- production is currently the manual compose stack under /opt/agent-console-restored on apps-vps\n- this PR aligns origin/main with the already-live production state

Summary by CodeRabbit

New Features

  • Automation management dashboard with agent creation, run tracking, wakeup scheduling, governance approvals, and work item management
  • Memory interface for searching and creating durable repo/global memory entries with scoped persistence
  • tmux session management dashboard with host selection and inline session controls
  • Session memory bootstrapping that injects persisted knowledge into new sessions
  • Service-authenticated integration routes and webhook support for external automation triggers
  • Expanded REST API for repositories, automation workflows, memory operations, and work items

Documentation

  • New "Automation and Memory" guide covering scoped memory, autonomous agents, and orchestration workflows
  • Updated API reference with new endpoints and authentication schemes
  • Enhanced data model documentation with Repo, Memory, and Automation entities

@coderabbitai

coderabbitai Bot commented Mar 28, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 83b80e94-26de-4674-aba8-6de3d22dec5a

📥 Commits

Reviewing files that changed from the base of the PR and between b0a3818 and 7ab4404.

📒 Files selected for processing (51)
  • README.md
  • agents/agentd/cmd/agentd/main.go
  • apps/dashboard/src/app/(dashboard)/automation/page.tsx
  • apps/dashboard/src/app/(dashboard)/memory/page.tsx
  • apps/dashboard/src/app/(dashboard)/sessions/[id]/page.tsx
  • apps/dashboard/src/app/(dashboard)/tmux/TmuxPageClient.tsx
  • apps/dashboard/src/app/(dashboard)/tmux/page.tsx
  • apps/dashboard/src/components/layout/SidebarNav.tsx
  • apps/dashboard/src/components/session/SessionWorkbench.tsx
  • apps/dashboard/src/hooks/useSessionDetail.ts
  • apps/dashboard/src/lib/api.ts
  • docs/README.md
  • docs/api.md
  • docs/automation-memory.md
  • docs/data-model.md
  • docs/orchestrator.md
  • docs/websockets.md
  • migrations/027_memory_automation.sql
  • migrations/028_runtime_memory_refinements.sql
  • migrations/029_memory_bridge_hermes.sql
  • packages/ac-schema/src/automation.ts
  • packages/ac-schema/src/command.ts
  • packages/ac-schema/src/host.ts
  • packages/ac-schema/src/index.ts
  • packages/ac-schema/src/memory.ts
  • packages/ac-schema/src/message.ts
  • packages/ac-schema/src/repo.ts
  • packages/ac-schema/src/session.ts
  • project_status.md
  • services/control-plane/src/auth/types.ts
  • services/control-plane/src/auth/verify.ts
  • services/control-plane/src/config.ts
  • services/control-plane/src/db/automationMemory.ts
  • services/control-plane/src/db/index.ts
  • services/control-plane/src/index.ts
  • services/control-plane/src/metrics.ts
  • services/control-plane/src/routes/automation.ts
  • services/control-plane/src/routes/governanceApprovals.ts
  • services/control-plane/src/routes/integrations.ts
  • services/control-plane/src/routes/memory.ts
  • services/control-plane/src/routes/repos.ts
  • services/control-plane/src/routes/sessions.ts
  • services/control-plane/src/routes/workItems.ts
  • services/control-plane/src/services/automation.ts
  • services/control-plane/src/services/embeddings.ts
  • services/control-plane/src/services/pubsub.ts
  • services/control-plane/src/services/sessionMemory.ts
  • services/control-plane/src/services/sessionSpawn.ts
  • tasks/2026-03-27-memory-hermes-tranche.md
  • tasks/2026-03-27-universal-memory-autonomy-v2.md
  • tasks/lessons.md

📝 Walkthrough

Walkthrough

This PR introduces three major interconnected capabilities: Scoped Memory (persisted repository and global memory with semantic search and trajectory-backed ingestion), Autonomous Agents (scheduled/manual orchestrators and workers with concurrency policies, runtime reuse, preflight validation, and governance approvals), and Enhanced Dashboard UI (new pages for automation management, memory search/creation, and tmux session control with real-time websocket synchronization).

Changes

Cohort / File(s) Summary
Database Migrations
migrations/027_memory_automation.sql, migrations/028_runtime_memory_refinements.sql, migrations/029_memory_bridge_hermes.sql
Introduces repos, memory_entries/trajectories, automation_agents/wakeups/runs/runtime_states/run_events, governance_approvals, and work_items tables with full-text search vectors, embeddings support, and constraints for scope/tier consistency and concurrency limits.
Schema Packages
packages/ac-schema/src/automation.ts, packages/ac-schema/src/memory.ts, packages/ac-schema/src/repo.ts, packages/ac-schema/src/command.ts, packages/ac-schema/src/session.ts, packages/ac-schema/src/message.ts, packages/ac-schema/src/host.ts
Adds comprehensive Zod schemas for automation entities (agents, runs, wakeups, approvals), memory (entries, trajectories, search), repositories, and websocket messages; extends session/command schemas with memory file support; adds provider capability tracking.
Control Plane Database Abstraction
services/control-plane/src/db/automationMemory.ts, services/control-plane/src/db/index.ts
Implements 40+ async functions covering memory CRUD with optional vector similarity search, trajectory ingestion from sessions, memory distillation/promotion, and comprehensive automation lifecycle (agents, wakeups, runs, governance, work items) with concurrency enforcement and budget tracking.
Control Plane Orchestration Service
services/control-plane/src/services/automation.ts
1400-line automation lifecycle service: enqueues scheduled wakeups, claims/processes wakeups with runtime state reuse, enforces concurrency/budget policies, performs preflight checks, spawns/reuses sessions with memory bootstrap, publishes run events, handles work-item checkout, syncs session completion, and periodically distills memory trajectories.
Control Plane Memory & Session Services
services/control-plane/src/services/sessionMemory.ts, services/control-plane/src/services/sessionSpawn.ts, services/control-plane/src/services/embeddings.ts
Memory bootstrapping for sessions (builds repo/global context prompts, generates durable markdown exports for Claude), session spawning/input helpers (validates host capabilities, dispatches commands, records audits), and OpenAI embedding generation with vector literal serialization.
Control Plane Routes
services/control-plane/src/routes/automation.ts, services/control-plane/src/routes/memory.ts, services/control-plane/src/routes/repos.ts, services/control-plane/src/routes/integrations.ts, services/control-plane/src/routes/governanceApprovals.ts, services/control-plane/src/routes/workItems.ts, services/control-plane/src/routes/sessions.ts
Six new route modules (automation agents/runs/wakeups, memory search/create, repo listing, integration webhooks/wake/Hermes summaries, governance approvals, work items) with RBAC/auth enforcement; refactored sessions route to delegate spawning logic.
Control Plane Infrastructure
services/control-plane/src/auth/verify.ts, services/control-plane/src/auth/types.ts, services/control-plane/src/config.ts, services/control-plane/src/metrics.ts, services/control-plane/src/services/pubsub.ts, services/control-plane/src/index.ts
Extended auth to support service-header authentication with timing-safe comparison; added config options for embedding model, integration tokens, webhook secret; added 8 new Prometheus counters with helpers; extended pubsub with 6 new automation message types and filtering; integrated automation service lifecycle management and new route registration.
Frontend Pages
apps/dashboard/src/app/(dashboard)/automation/page.tsx, apps/dashboard/src/app/(dashboard)/memory/page.tsx, apps/dashboard/src/app/(dashboard)/tmux/page.tsx, apps/dashboard/src/app/(dashboard)/tmux/TmuxPageClient.tsx
New automation page (agents, runs, wakeups, approvals, work items with creation forms and real-time updates), memory page (search with optional repo filter, creation with tier/scope/confidence), and tmux pages (host/session/pane selection with inline workbench and session actions).
Frontend Components & Hooks
apps/dashboard/src/components/session/SessionWorkbench.tsx, apps/dashboard/src/hooks/useSessionDetail.ts, apps/dashboard/src/app/(dashboard)/sessions/[id]/page.tsx, apps/dashboard/src/components/layout/SidebarNav.tsx
Extracted session detail logic into reusable hook with websocket sync; added SessionWorkbench component (console/terminal modes, group assignment, fullscreen with Esc-exit, analytics/timeline/events); refactored session detail page to use hook + component; added sidebar nav items for automation/memory/tmux.
Frontend API Client
apps/dashboard/src/lib/api.ts
Added 15+ client functions: repos listing, automation agents/runs/wakeups/approvals (list/create/update/wake/decide), work items (list/create/update), memory (search/create).
Agent Daemon
agents/agentd/cmd/agentd/main.go
Added memory file writing with validation (base_dir/relative_path/scope restrictions, parent dir creation, content diffing); extended capability map to dynamic provider availability; integrated memory file setup into session spawn paths (worktree and interactive).
Documentation
README.md, docs/README.md, docs/automation-memory.md, docs/api.md, docs/data-model.md, docs/orchestrator.md, docs/websockets.md
Added automation/memory features to README; new comprehensive automation-memory guide covering repo identity, memory model, ingestion, distillation, automation orchestration; expanded API reference with integration/memory/automation endpoints and webhook signature requirements; updated data model with Repo/Memory/Automation entities; added related surfaces reference; documented new websocket topics.
Planning & Status
tasks/2026-03-27-memory-hermes-tranche.md, tasks/2026-03-27-universal-memory-autonomy-v2.md, tasks/lessons.md, project_status.md
Added tranche/spec planning documents for memory-Hermes integration and memory/autonomy v2; updated lessons with process improvements and live-in-production validation; auto-updated project status.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120+ minutes


Possibly related PRs


Poem

🐰 Memories now bloom in repos vast,
Agents stir from scheduled dreams to act,
Wakeups coalesce, runs unfold with grace,
Memory sewn into every spawned space. 🌱✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch build/agentd-origin-main-20260216

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant