Skip to content

motionharvest/agent-services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCode Services

Small local services for running an OpenCode agent system:

  • telegram/ polls Telegram bots, routes messages to agents, and sends replies.
  • scheduler/ runs cron-like jobs from scheduler/schedule.json.
  • intents/ provides a filesystem-backed intent queue for publish, claim, and execute flows.
  • heartbeat/ runs agent heartbeat tasks and optional completion notifications.
  • tasking/ stores and manages natural-language tasks.
  • automation/ contains workflow graph/compiler/runtime experiments.

Open-Source Safety

This repository should only contain source, tests, docs, and sanitized examples. Local runtime state and private config are intentionally ignored:

  • telegram/agents.json contains bot identities, tokens, and session IDs.
  • scheduler/schedule.json can contain personal jobs and shell commands.
  • telegram/data/, telegram/state/, intents/data/, logs, pid files, and pytest caches are generated runtime data.
  • .secrets.json, .env, auth.json, and credential files must remain local.

Before publishing, run a secret scan such as:

rg -i "token|secret|password|api[_-]?key|bot[0-9]+:|/home/[^/]+" .

Local Setup

  1. Copy examples into local private files:
cp telegram/agents.example.json telegram/agents.json
cp scheduler/schedule.example.json scheduler/schedule.json
cp .secrets.example.json ~/.config/opencode/.secrets.json
  1. Fill in Telegram bot tokens in environment variables or ~/.config/opencode/.secrets.json.

  2. Configure a default Telegram chat for fallback notifications:

export OPENCODE_TELEGRAM_DEFAULT_CHAT_ID=123456789
export OPENCODE_TELEGRAM_DEFAULT_BOT_TOKEN=123456789:replace-with-token
  1. Run tests:
python3 -m pytest automation/tests scheduler/tests telegram/tests telegram/group-chat/tests

Notes

The services assume they are installed under ~/.config/opencode/services and that agent data lives under ~/.config/opencode/data. The code avoids shipping personal Telegram IDs or bot tokens; local deployments provide those through ignored config files or environment variables.

About

Chron style scheduler for agents

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors