Skip to content

jckw/chelae

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chelae

Minimal autonomous agent server with file-based heartbeat configuration.

This is an exploration of the core functionality behind openclaw and opencode.

Drop a .md file in heartbeats/ and it becomes a scheduled agent task.

Quick Start

# Install dependencies
uv sync

# Set your OpenAI key
export OPENAI_API_KEY=sk-...

# Run the server
uv run chelae serve

# Or with auto-reload for development
uv run chelae serve --reload

Send Messages

# One-off message
uv run chelae send "What's in my current directory?"

# Pipe from stdin
echo "Summarize this" | uv run chelae send

# Use a different session
uv run chelae send -s work "Check my calendar"

# Interactive chat
uv run chelae chat

Create a Heartbeat

<!-- heartbeats/monitor.md -->
---
cron: "*/30 * * * *"
session: main
---

Check if anything needs my attention.
If nothing, reply HEARTBEAT_OK.

The server watches the folder - changes are picked up automatically.

API

# List heartbeats
curl http://localhost:8000/heartbeats

# Trigger manually
curl -X POST http://localhost:8000/trigger \
  -H "Content-Type: application/json" \
  -d '{"prompt": "What time is it?"}'

# Trigger a specific heartbeat
curl -X POST http://localhost:8000/trigger/monitor

# View session history
curl http://localhost:8000/sessions/main

Heartbeat Options

---
cron: "0 9 * * 1-5"        # Required: 5-field cron expression
session: main               # Session ID (default: main)
enabled: true               # Toggle on/off (default: true)
model: gpt-4o               # Model to use (default: gpt-4o)
dedup_hours: 24             # Suppress duplicate text for N hours
timezone: America/New_York  # Cron timezone (default: UTC)
---

Limitations

  • No context compaction - Sessions grow unbounded. If you hit context limits, clear the session with DELETE /sessions/{id} or delete the .jsonl file. Auto-compaction is on the roadmap.

See NOTES.md for full architecture details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages