A persistent, self-scheduling AI agent built on the Anthropic Claude API. Runs 24/7 on Hugging Face Spaces with autonomous scheduled tasks, a live Gradio UI, and a REST API.
ANTHROPIC_API_KEY = sk-ant-...proactive-claude-agent/
├── app.py # Gradio UI + FastAPI + background agent thread
├── requirements.txt # All Python dependencies
├── README.md
├── agent/
│ ├── __init__.py
│ ├── core.py # ProactiveAgent orchestrator
│ ├── memory.py # Persistent JSONL event log + KV state
│ ├── scheduler.py # APScheduler async wrapper
│ └── llm.py # Anthropic Claude API wrapper
└── tasks/
├── __init__.py
├── health_check.py # Every 30 min: verify all subsystems
├── daily_summary.py # Daily 09:00 UTC: Claude summarises events
└── self_optimization.py # Weekly Sunday 02:00 UTC: Claude rewrites its prompt
| Task | Schedule | Description |
|---|---|---|
| health_check | Every 30 min | Verify LLM API, memory, scheduler |
| daily_summary | Daily 09:00 UTC | Claude generates a daily insight report |
| self_optimization | Sundays 02:00 UTC | Claude reviews and improves its own system prompt |
GET /api/status
GET /api/history?limit=20
POST /api/task/run/{task_id}
MIT