Inspiration
The idea behind this tool is to be able to programmatically control your Claude workspace, giving you time to do other tasks while your computer works for you.
What it does
This project allows you to run tasks in your local machine with Claude Agents, giving you the capabilities to make your workstation do things according to your mail feed and personalized inboxes. CodeWorks allows you to trigger agents remotely, schedule daily jobs, reply automatically and run your agents workflow for you, without any user interaction, giving you capabilities to automate your daily workflow.
How we built it
Built with FastAPI (Python) backend and React/Vite frontend. Used PTY process spawning to give Claude true terminal sessions with xterm.js for live streaming via WebSocket. Integrated APScheduler for cron-based scheduling, Resend webhooks for email triggers, and OpenAI's GPT-4o-mini for intelligent task extraction and agent routing. Skills and MCPs are dynamically injected into each agent's workspace at runtime.
Challenges we ran into
Terminal session management was the biggest challenge—we needed real PTY processes (not subprocess.PIPE) so users could interact with running agents via claude --resume. Email-to-task routing required careful prompt engineering to match incoming emails to the right agent. Process cleanup was tricky—terminating an agent means killing the entire process group, not just the shell. WebSocket reliability for streaming thousands of terminal output lines while keeping the UI responsive pushed us to optimize buffering strategies.
Accomplishments that we're proud of
- Email automation pipeline: Send an email to your CodeWorks inbox → AI extracts the task → right agent picks it up → executes autonomously
- Live interactive terminal: Watch your agent work in real-time and interact with it mid-execution
- Zero-config scheduling: Set up hourly, daily, or custom cron schedules in 3 clicks
What we learned
- PTY process management in Python using ptyprocess for proper shell sessions
- Building resilient WebSocket streaming with backpressure handling
- That AI agents are most useful when they can be orchestrated, not just invoked
What's next for CodeWorks
- More triggers: Slack commands, GitHub webhooks, calendar events
- Agent collaboration: Let agents spawn and orchestrate other agents for complex workflows
- Conversation memory: Persistent context across executions for smarter long-running tasks
- Mobile companion app: Check on your agents and approve actions from your phone
- Marketplace: Share and import agent configurations and skills from the community
Built With
- claude-code
- fastapi
- mcp
- node.js
- python
- react
- tailwind
- typescript
- vite
Log in or sign up for Devpost to join the conversation.