Automate tasks with Claude Code

Run prompts on Claude Code sessions running on your own server or computer. Maintain conversation context across multiple calls using named sessions.
https://claude.ai/code

Add a new profile Step-by-step guide

This Botize integration with Claude Code lets you connect any machine that has Claude Code installed (your Mac, a server, a Raspberry Pi) to Botize so it can act as an agent. You can request tasks from any Botize flow and receive the response wherever you want: Telegram, email, another automation...

The idea is simple: you create the Claude session the way you normally do in your terminal, give it a name with /rename, and from Botize you can route messages to that name. No need to open any port or expose the machine to the Internet — the worker only makes outbound calls to Botize.

Copy and paste this command in your terminal (Mac or Linux) to install the worker:

curl -fsSL https://kanon.botize.es/downloads/claude_code/install.sh | bash

The installer checks that you have Python 3 and Claude Code installed (it tells you how to install them if any are missing) and downloads the script into ~/botize_claude_code/. Then pick how you want to run it:

python3 claude_api.py --start runs the worker in your current terminal (good to try it out, Ctrl+C to stop). python3 claude_api.py --install installs it as a permanent service that runs in the background and starts on boot — launchd on Mac, cron on Linux. Either way, the first run generates a token that you'll paste into the Claude Code connection profile in Botize.

To create your first agent, run python3 claude_api.py --session-add my-agent. If the agent doesn't exist yet it will ask where you want it to live, create the folder and add the alias to the whitelist. If it exists already it just authorizes it. From that moment on, any Botize flow can address my-agent and Claude will respond with the full context of that directory: its CLAUDE.md, its permissions, its MCP servers, its skills.

Claude Code respects the .claude/settings.json file in your folder exactly the same way as when you use it by hand. If Botize asks for something you haven't authorized, Claude will reply saying which permission is missing and your Botize flow will receive that information as part of the result. You can open Claude in that folder, press "always allow" when it asks, and the next messages from Botize will be able to perform that action — without restarting anything.

Once installed, you can control the worker with these commands from the ~/botize_claude_code/ directory:

python3 claude_api.py Shows this list of commands. Does not start anything.
python3 claude_api.py --start Runs the worker in this terminal. Ctrl+C to stop. Good to try it out.
python3 claude_api.py --install Installs the worker as a permanent service. Runs in the background and starts on boot.
python3 claude_api.py --status Tells you whether the worker is running and shows the last log lines.
python3 claude_api.py --stop Stops the worker for real. On Mac it also unloads the launchd service.
python3 claude_api.py --activity Shows the log live (like tail -f). Useful to watch jobs as they come in.
python3 claude_api.py --sessions Lists the aliases the worker is authorized to accept jobs for from Botize.
python3 claude_api.py --session-add my-agent Adds an alias. If it doesn't exist yet, offers to initialize a folder and run a smoke test.
python3 claude_api.py --session-remove my-agent Revokes an alias's authorization.
python3 claude_api.py --check-alias my-agent Verifies the alias exists on your machine and shows which folder the session lives in.
python3 claude_api.py --new-token Generates a new token (remember to update it in the Botize connection profile).

To update the worker to a new version, just run the install command again. It's idempotent: it updates the script but keeps your configuration and history intact. If the worker was running, stop it with --stop and relaunch it with --install (or --start) so the new version takes effect.

This integration is especially useful for building agents with a specific role (for example a programmer that only touches one repo, a designer with access to wireframing tools, an analyst with read-only access to your data), orchestrated from Botize flows that chain their responses.

Actions

The action is what happens automatically, without you having to do anything else.

  • claude_code

    Run

    Send a message to a Claude Code session and wait for the response.

  • claude_code

    Orchestrate (PoC)

    Iterative orchestration step. Calls Claude Code with the orchestrator schema (done/message/next_agent/reason) and pauses until the response (or a manual stop) arrives. Multi-agent delegation is not implemented yet: when 'done' is false the task ends with an informational text.