Repository navigation
docs(examples): runnable scheduling and heartbeat examples - #1894
Conversation
…ol and the daemon
…index both new examples
|
@infer can you finalise this PR? if it's ready for a review mark it as ready, if not then continue on the leftover todos. use /ponytail:ponytail |
|
Model: Todos
Pull Request✅ Infer Result: SuccessFinalization complete. PR #1894 is marked ready for review. What I didBoth example suites are now verified to run end to end offline on this checkout, and the validation caught two real breakages, both fixed and pushed:
Validation evidence
Skipped: running the daemon examples against a real model or the Telegram compose stack, and re-checking doc links outside the diff. Risk: the example output excerpts in the READMEs paraphrase exact log lines from observed runs - minor wording drift between CLI versions is possible. Model: Tokens: 2,557,654 in · 28,518 out · 2,586,172 total (46 requests) Tool calls: 61 total · 100% success rate TracesStatsTriggered by edenreich · Infer Action · OSS |
|
🎉 This PR is included in version 0.263.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Resolves #1892
Summary
Adds two runnable offline examples for the automation features the README advertises but never demonstrates: the Schedule tool (cron prompts run by
infer daemon) and the heartbeat (periodic agent wake-ups). Both run against the tokenless mock model under a seeded demo HOME, the way examples/web-terminal runs its daemon, so no API key, gateway or channel is needed - each fire is recorded to conversation storage and readable back throughinfer conversations.Changes
--mode autowhere the mock model calls the Schedule tool withoperation: create(recurring@every 1m),createwithrun_once: true,listanddelete; atask daemonthat runsinfer daemonso the jobs fire; atask jobsthat prints the job files and run records written under~/.infer/schedules/; andtask runs/task show ID=...that show the recorded runs viainfer conversations listandinfer conversations show. Shipsschedules/demo-standup-summary.yaml, a hand-written job file, to demonstrate hot reload and to givedeletea real target.heartbeat.yaml(enabled, shortinterval: 30sandinitial_delay: 5s, prompt) seeded bytask homeinto the demo HOME; atask daemonwhose wake-ups record conversations;task wakes/task show ID=...to read them; andtask oncerunninginfer headless --heartbeat "<prompt>"for a single wake-up with the heartbeat system prompt.INFER_TOOLS_SCHEDULE_ENABLED: trueits compose file already sets - asking the bot for a recurring job and a one-off reminder, and noting the job's output is delivered back to the same chat. Links the Scheduling Guide.no docs ticket: the PR only adds examples and their index rows, no behavior change.