Comment by SyneRyder
5 hours ago
> I could tell it (via Telegram) to add something to my TODO list at home while I'm in the office. It would call a custom API I had set up that adds items to my TODO list. How can I replicate this without the hassle of setting up OpenClaw?
The general idea is make a simple deterministic program that runs on your PC at home in a never ending loop. Every minute or so, check Telegram for a new message. If a message is received, then the program runs "claude -p" with a prompt, whatever MCP tools or CLI permissions it needs, and the contents of your Telegram message. Just leave the program running on your home computer while you're out, and you're done.
I don't use Telegram, so coding the part to check Telegram would be the hard part. I use email instead, and have the program check every minute for new mail (I leave my email program running and check the local inbox file). I'd already coded up a local MCP server to manage my ToDo list (Toodledo) so Claude just calls the MCP tools to add the task.
For things like TODO, I guess an email will suffice.
However, it was really nice being able to use Telegram and get quick validation. I also had a flow set up where I could send a voice memo. It would take the audio file (ogg), run Whisper, and then pass through an LLM for cleanup, and follow the instructions in my message. Really handy to use while I'm walking around.
I guess I want to create my own OpenClaw like agent, but not with its crazy broad access: Just limited to the functionality I allow, and with the convenience of using Telegram. I don't care about memory, soul, etc.
I did the exact same voice memo thing too, except I had Claude make an Android app to record the file and send it to Whisper. In the end I had the app just email the transcription & trigger Claude that way (ie receiving the email triggers my PC to wake up Claude), rather than sending Claude the audio file directly.
My reverse audio reply loop is convoluted - I have Claude generate its TTS file from Whisper/Mistral, and upload them to a server with an RSS file it updates, so I can play them in my podcast app (AntennaPod), then send me a notification via Pushover that the reply is waiting. I ended up building out an MCP tool for that workflow, so Claude really just calls the MCP tool with the text of what it wants to say, everything else is a deterministic program doing the work.
Memory is really useful to have - it can just be a bucket of searchable Markdown files. It's also useful to have a "reminders to self" Markdown file that Claude reads each time, and that Claude can update. I don't continue the same context window, and that "reminders to self" plus the ability to read previous emails in the conversation seems to be enough to keep the context going for me.
You'll feel better if you know exactly how your Claw is locked down. Mine doesn't have the open email access others are granting, not at all. Claude gets a bit grumpy about that and keeps begging for more access :)
>telegram bot that runs claude -p
https://github.com/a-n-d-a-i/ULTRON
It also supports Codex :)
I felt pretty clever until (1) I found a repo where they used this trick to create a full OpenAI compatible API endpoint[0] (lmao, the VC money distortion field spawning truly comical Rube Goldberg machines), and (2) they started banning "unauthorized" usage of the Claude sub, which trend unfortunately seems to be accelerating recently as their lower value consumers have grown in both number and usage.
I think shoving claude -p in your bash script / cronjob / messaging app bot of choice counts as "unathorized 3rd party harness", but your guess is as good as mine...
(claude -p with per-token billing (i.e. paying 7x more) is allowed though, of course)
-- There's also an Agents SDK (formerly Claude Code SDK?) which is basically just claude -p but with more typing, as far as I could tell.
[0] https://github.com/router-for-me/CLIProxyAPI
[0b] Honorable mention https://github.com/kronael/claude-serve