Skip to content

feat: Add profile-scoped gateway autonomy runtime#4711

Closed
ambrosecltr wants to merge 2 commits into
NousResearch:mainfrom
ambrosecltr:feat-autonomy-loop
Closed

feat: Add profile-scoped gateway autonomy runtime#4711
ambrosecltr wants to merge 2 commits into
NousResearch:mainfrom
ambrosecltr:feat-autonomy-loop

Conversation

@ambrosecltr

@ambrosecltr ambrosecltr commented Apr 3, 2026

Copy link
Copy Markdown

What does this PR do?

Adds a profile-scoped autonomy runtime to the messaging gateway so Hermes can track open-ended watch items, revisit them in the background, and surface useful updates naturally without relying on cron for everything.

This introduces a gateway-only autonomy system with durable state in SQLite, hot-path watch registration for explicit requests, hidden post-turn extraction for implied follow-ups, supervisor-driven findings/drafts, and proactive inbox/outbox delivery to a configured home chat. It also adds config controls for extraction mode, proactivity level, quiet hours, retention, and tool access, plus docs for setup and behaviour.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

How to Test

  1. Enable autonomy in a profile config.yaml, set a home chat, and start the gateway.
  2. In a messaging thread, ask Hermes for open-ended monitoring like Keep an eye on OpenAI for me. Let me know if anything interesting happens and verify it creates an autonomy watch instead of inventing a cron schedule.
  3. Use /autonomy, /autonomy watch, and /autonomy runs to confirm watch registration, background supervisor activity, and clean run summaries.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass (All tests associated with PR are green, failed tests are existing)
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

Focused verification after merging main:

source venv/bin/activate && python -m pytest \
  tests/gateway/test_autonomy_command.py \
  tests/gateway/test_autonomy_helpers.py \
  tests/gateway/test_autonomy_intake_guard.py \
  tests/gateway/test_config.py \
  tests/gateway/test_session.py \
  tests/test_model_tools.py \
  tests/tools/test_autonomy_watch_tool.py \
  tests/tools/test_cron_inspect_tool.py \
  tests/test_hermes_state.py -q

Result: 251 passed

@teknium1

teknium1 commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for the thorough work on this, @ambroseacoulter — the architecture spec and implementation are well thought out. We're not looking to add a proactive autonomy subsystem to the gateway at this time, so closing this PR. Appreciate the contribution!

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.

2 participants