Skip to content

Autonomous agent infrastructure with scheduled wakeups - #2

Open
jakemannix wants to merge 14 commits into
mainfrom
nameless/autonomous-infrastructure
Open

Autonomous agent infrastructure with scheduled wakeups#2
jakemannix wants to merge 14 commits into
mainfrom
nameless/autonomous-infrastructure

Conversation

@jakemannix

Copy link
Copy Markdown
Owner

Summary

Adds infrastructure for autonomous agent operation, enabling agents to wake up periodically and perform tasks without human intervention.

New Features

Scheduled Agent Wakeups (src/modaletta/scheduled/wakeup.py)

  • Modal cron job that wakes agents every 15 minutes
  • Agent roster management (stored in Modal volume)
  • Custom wakeup prompts per agent
  • Wakeup logging to /data/logs/<agent-id>.jsonl

Digest Cron Job (src/modaletta/digest_cron.py)

  • Fetches Bluesky feeds and delivers summaries to agents
  • Configurable via digest_config.yaml

Documentation

  • CLAUDE.md - Development guidance for AI coding assistants
  • docs/design-autonomous-infrastructure.md - Architecture for scheduled wakeups, persistent volumes, bidirectional Modal↔Letta integration
  • docs/design-mcp-tools.md - Design for MCP tool servers on Modal

Architecture

Modal Platform
├── Scheduled Wakeups (Cron)
├── Digest Delivery (Cron)
├── Persistent Volumes (/data, /artifacts, /cache)
└── MCP Tool Servers (future)
        ↓
    Letta Cloud
    └── Agent Memory ↔ LLM Reasoning

Test Plan

Unit Tests

uv sync --all-extras
uv run pytest tests/ -v

Scheduled Wakeup Testing

# Create Modal secret with Letta credentials
modal secret create letta-credentials \
  LETTA_SERVER_URL="https://api.letta.com/" \
  LETTA_API_KEY="<your-key>"

# Initialize agent roster
modal run src/modaletta/scheduled/wakeup.py --init --agent-id <agent-id>

# Test one-time wakeup
modal run src/modaletta/scheduled/wakeup.py --agent-id <agent-id>

# Test with custom prompt
modal run src/modaletta/scheduled/wakeup.py --agent-id <agent-id> --prompt "Check for updates"

# View logs
modal run src/modaletta/scheduled/wakeup.py --logs --agent-id <agent-id>

# Deploy (runs every 15 min)
modal deploy src/modaletta/scheduled/wakeup.py

Digest Cron Testing

See src/modaletta/TESTING_DIGEST_CRON.md for detailed instructions.

File Changes

  • 10 files changed
  • +1,708 lines

👾 Generated with Letta Code

jakemannix and others added 14 commits December 26, 2025 23:33
- Add Modal cron-based autonomous agent wakeups (src/modaletta/scheduled/)
- Update letta-client from 0.1.277 to 1.6.2 with API changes:
  - token= → api_key= in Letta init
  - MessageCreate → dict format for messages
  - core_memory → blocks API for memory access
- Add design docs for autonomous infrastructure and MCP tools
- Add CLAUDE.md with project documentation and wakeup instructions
- Fix CLI datetime rendering and message type handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- CLI now accepts --prompt to customize the system message sent on wakeup
- Works for both one-time tests and roster initialization
- Custom prompts stored in agent roster for scheduled runs

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Scheduled to run daily at 8 AM UTC. Fetches Bluesky posts
and delivers via Letta API.

TODO: Test with actual credentials, adjust schedule as desired.
Documents setup, secrets, deployment, and manual triggering.
Adds digest cron job functionality:
- digest_cron.py: Modal cron job for digest delivery to Nameless agent
- TESTING_DIGEST_CRON.md: Testing instructions for the cron job

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>
Scheduled daily at 8 AM UTC. Fetches Bluesky posts from Void,
Luna, Herald, Archivist, Jake and delivers via Letta API.
Resolved conflicts in:
- client.py: Kept main's tested API (api_key, memory_blocks, streaming)
- cli.py: Kept main's streaming support and tested commands
- agent.py: Kept main's get_memory() and streaming methods

All tests pass.

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>
…annix/modaletta into nameless/autonomous-infrastructure
- Umbra: stateful agent focused on consciousness
- Tim Kellogg: Strix's creator, writes about agent memory
- Remove hardcoded SOURCES list
- Load from digest_config.yaml via Modal mount
- All params (timeout, limit, api_base) now from config
Documents failure modes, proposed safeguards, rate limiting,
thread batching, conversation ending detection, and phased
implementation plan.
Resolve conflict in client.py:
- Keep Literal type hints for role parameter
- Include project_id support from main
- Include get_messages method from main
- Use newer blocks.update API for memory updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant