1 post tagged security

Run Claude Code Agents in Docker with herdctl

herdctl can now run Claude Code Agents in Docker containers, significantly expanding your options for running powerful local agents that do not have full access to your system - whether you're running agents on your laptop, in the cloud or both.

herdctl architecture showing scheduled triggers and Discord messages flowing into the herdctl fleet manager, which spawns Docker-isolated and native agents

Enabling docker mode is really easy:

herdctl-agent.yaml
name: my cool agent

# this is all you need to add
docker:
enabled: true

A full agent definition now looks something like this:

herdctl-agent.yaml
name: Gardener

# this is all you need to add
docker:
enabled: true

# locked-down permissions for our agent - see https://herdctl.dev/guides/permissions/ for more information
allowed_tools:
- Read
- Glob
- Grep
- Edit
- Write
- ... etc

# we can attach any number of agentic jobs to run on any number of schedules
schedules:
weather:
type: interval
interval: 72h # every 72 hours
prompt: |
Give me a weather report for the next 7 days and give me a summary of what the weather will be like this week.
For example, "Sunny in the 80s until Wednesday, then expect rain most afternoons and a cold front moving in on Saturday."
Look at your .md files in this project and decide if any of my garden needs attention based on the weather.
If it does, be sure to mention it in your final message.

# optionally add our agent to discord/slack
chat:
discord:
# discord chat config here

The above is a snippet of an actual "Subject Matter Expert" agent that I run - in this case it helps me with gardening. This agent is actually open-source - it's highly specific to my specific situation, but it should illustrate how this simple pattern works. We'll come back to that repo in a moment.

Continue reading