Barkley Configuration
Architecture
Section titled “Architecture”- Runtime: Cloudflare Workers (TypeScript)
- Sandboxes: Cloudflare Sandbox SDK (Durable Objects + containers)
- AI: Claude Agent SDK for multi-turn sessions
- State: DO
ctx.storagefor schedules, session maps, backup handles - Backups: R2 for sandbox filesystem snapshots
- Guidelines: Cloudflare Vectorize with
@cf/baai/bge-base-en-v1.5embeddings
Teaching Barkley
Section titled “Teaching Barkley”Team members can teach Barkley via Slack:
@Barkley learn: [correction or guideline]This stores the correction in the Vectorize guidelines database with category tags.
Knowledge Base Sync
Section titled “Knowledge Base Sync”The golden-child-brain repo is synced to sandboxes:
- On wake:
git pullto get latest knowledge - On learning: Create new
.mdfile andgit push - Semantic search: Query AutoRAG REST API for relevant context
Reddit Monitoring
Section titled “Reddit Monitoring”- Schedule ID:
sched-3 - Frequency: Every 4 hours
- Thread grouping: Daily rolling threads in Slack
- Deduplication: SQLite database at
/workspace/barkley.db(reddit_seentable) - API access: Brave Search + PullPush API (Reddit OAuth API recommended but not yet configured)
Known Limitations
Section titled “Known Limitations”- Direct Reddit API blocked from Cloudflare sandbox; relies on Brave Search (free tier, rate-limited 1 req/sec)
- Reddit OAuth API credentials not yet configured
- Only 4 of Megan’s 8 original corrections are in the codebase; remaining 4 are in Vectorize only