Skip to content

slaveOftime/open-relay-assistant

Repository files navigation

Open Relay Assistant Heart Starter

A supervised agent loop: wake a primary assistant session, feed it bounded task-hook passes, and rotate it through sleep handoffs — all on a heartbeat cadence.

  • heart.ts is the main entrypoint
  • heart/ holds the reusable supervision runtime
  • heart-hooks/ holds the bounded tli task hook flow
  • prompts/soul.md and prompts/sleep.md stay generic

How the loop works

Each heart beat runs one bounded supervisor pass through five stages:

WAKE  →  adopt or start the primary assistant session
HOOK  →  feed it a tli task hook (discover → plan → execute → verify)
SLEEP →  rotate the session after long uptime (checkpoint loop state)

The repo maps to five loop building blocks:

Block Where Role
Automation heart.ts + heart/main.ts Heartbeat cadence; wakes, hooks, sleeps on schedule
Skill heart-hooks/tasks-hook.md Reusable instructions; the task hook prompt is the skill
Sub-agents Worker sessions via oly Maker/checker split; supervisor delegates, workers execute
Connectors heart/oly.ts Acts on the real environment: start sessions, send input, stop
Verifier tli + the hook prompt The gate; tasks are only "done" when a real verify gate passes

The supervisor loop in prompts/soul.md enforces the cycle: discover (read tli state), plan (pick one action), dispatch to a worker (or act if trivial), verify (check a real gate), iterate or stop.

The main session is the brain: it analyzes, triages, dispatches, and verifies. Real work happens in worker sessions (copilot, mimo, codex, gemini, etc.) started via oly start --tag task:<id>. This keeps the main session unblocked to handle heartbeats and new tasks in parallel.

Setup

  1. Install dependencies.

    npm install
  2. Make sure oly, tli, and your assistant command are available on PATH.

    npm i -g @slaveoftime/oly
    npm i -g @slaveoftime/tli
  3. Edit heart.ts and set the starter-specific values you want to use:

    • assistantName
    • primarySessionTitle
    • supervisedSessionTag
    • launch.command
    • launch.arguments
    • any timing values under settings
  4. Adjust the generic prompts in:

    • heart-hooks/tasks-hook.md
    • heart-hooks/tasks-hook-compact.md
    • prompts/soul.md
    • prompts/sleep.md

Run

Check config without touching oly or tli:

npm run check-config

Run the type checker:

npm run typecheck

Run continuously:

oly start -t gogo-heart --disable-notifications node heart.ts

About

Reusable TypeScript heart starter for supervising an AI assistant through oly, with generic prompts, lifecycle handling, and a bounded tli task hook flow

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors