Automation with context? #3567
Replies: 3 comments 1 reply
-
|
This can actually be achieved with a well-designed prompt. The key is making your HEARTBEAT.md tasks idempotent — each run should read from and write back to a checkpoint file, so the next heartbeat-triggered session can quickly restore context without relying on conversation history. |
Beta Was this translation helpful? Give feedback.
-
|
It never writes to the file though, just does the task and then never marks the task completed, so it ends up doing it again and it doesn't have context of where we are in conversation, looking for something that keeps context of the current session. Right now, the heartbeats seem to be a completely isolated session separate from the main session. |
Beta Was this translation helpful? Give feedback.
-
|
The reason your agent "never writes to the file" is that HEARTBEAT.md itself is the prompt — you need to instruct your agent in that file to do so. It won't happen automatically without explicit instructions. Here's a practical pattern that works:
Heartbeat is designed as an independent session (it runs through If you need help writing a specific HEARTBEAT.md for your use case, feel free to share what you're trying to automate and we can help draft one. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem / Motivation
The issue I keep running into is that there is no way to run any sort of automation that keeps history of the active session in context. I thought that HEARTBEAT.md would do this, but doesn't, so I tried to circumvent it with a cron job, but it doesn't seem to keep history in context either. What this ends up doing is no matter what sort of automated process I try to set up, my agent just completely forgets anything we've currently been talking about when the automation runs which makes it insufficient for things I'm trying to do. As far as I can see there's no way around this. This seems like it should be the function of HEARTBEAT.md, seems to be a fresh session and the way that the prompt is set up for it doesn't work very well. In practice my agent ends up reading the file with zero context, doing whatever tasks are in it without context of the current conversation and then, not even checking off the task, so it just ends up doing the same task over and over again and even this doesn't really complete well without any conversation history loaded. I don't know what the solution would be but it's an ongoing issue.
Proposed Solution
HEARTBEAT.md loaded by the active agent directly instead of a seperate session attempting to deliver tasks from the file.
Alternatives Considered
No response
Related Component
Configuration
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions