# Heartbeat Automations in Codex: Mechanics of Proactive Agents
Screenshots from the test version of OpenAI's desktop app reveal the integration of heartbeat automations. This system, similar to the OpenClaw agent's architecture, enables proactive task tracking without constant user intervention. Automations run on a schedule and analyze unfinished processes in conversations.
In the Automations menu, the standout task is The Next-Move Scout. It activates every 30 minutes and scans the conversation context for 'loose ends'—unresolved topics or forgotten items. Upon detection, it suggests a specific next step, avoiding false positives.
Heartbeat and Cron Architecture in JSON Schema
Agent tools are defined via JSON schema with two types of automations:
- cron: standard scheduler for fixed intervals.
- heartbeat: proactive reminders tied to a specific conversation, with periodic triggering.
Heartbeat operates on the principle of periodic checks: a timer sends the agent a prompt to analyze email, calendar, and tasks. Possible responses:
- HEARTBEAT_OK — if nothing urgent, the agent stays silent.
- Initiating contact — when tasks requiring attention are detected.
This logic distinguishes proactive agents from reactive chatbots, where interaction depends on user input.
{
"type": "heartbeat",
"interval": "30m",
"prompt": "Prover nezakrytye zadachi in dialoge and predlozhi next shag"
}
Example heartbeat automation schema from the leak.
OpenAI Super App: From ChatGPT to a Unified Platform
The Codex super app will unite ChatGPT, the Atlas browser, and GPT Images into a desktop application. Codex will serve as the central hub for AI interactions. Heartbeat mechanics will enhance its autonomy, allowing the agent to monitor context independently without manual launches.
In the test build, signs of mature implementation are visible: the automations menu is already functional, tasks are customizable by interval and prompt. This points to a shift toward second-generation agents with built-in proactivity.
Benefits of Proactive Automations for Developers
For mid/senior developers, this architecture solves typical workflow issues:
- Automatic closure of 'loose ends' in long AI conversations.
- Integration with external services (email, calendar) via API.
- Minimizing notifications: triggering only on real changes.
Implementing heartbeat simplifies agent scaling: instead of constant polling, it uses an event-driven approach with timers.
When integrating into your own projects, use a similar schema:
class HeartbeatAgent:
def __init__(self, interval=1800): # 30 min in sekundakh
self.interval = interval
self.timer = None
def check_context(self, dialog_id):
# Analysis dialog
if self.has_pending_tasks(dialog_id):
return self.suggest_next_step(dialog_id)
return "HEARTBEAT_OK"
Basic template for heartbeat logic in Python.
Key Points
- Proactivity: The agent initiates actions independently every 30 minutes.
- Two Types of Automations: cron for scheduling, heartbeat for conversations.
- Codex as the Foundation: The super app will unite ChatGPT, Atlas, and GPT Images.
- OpenClaw Architecture: Perfect match with the known agent's mechanics.
- For Developers: Ready-to-use JSON schema for quick integration.
— Editorial Team
No comments yet.