Skip to main content
A self-hosted agent can run from your own image, built on top of the agent base image. Skills and Python tools you copy into it load when the agent starts, so they are versioned by the image tag and built in your CI. Your deployment repository then holds only the chart values. Each Python tool runs exactly the function you wrote, so an agent can run your code without a shell.

What goes into the image

The agent reads two folders under /opt/agentops/agent/ at startup:

Skills

A skill in the image uses the same format as any other skill: a SKILL.md with a name and a description in its frontmatter, and the procedure in the body. The agent reports the skills it loads to the Komodor Agentic Operation Platform (KAOP). They appear in the account’s Skills library, marked as self-reported.

Python tools

Each function decorated with the Claude Agent SDK’s @tool becomes a tool the agent can call. The decorator takes the tool’s name, the description the model reads to decide when to call it, and its parameters:
tools/time_tools.py
The tools run inside the agent’s own process and are served to it as the custom MCP server, so the agent calls this one as mcp__custom__get_current_time. A call runs that function with the arguments the model passed and returns its result; the model cannot change the code it runs.
  • A file in tools/ can import another file in the same folder by its plain module name, so shared helpers can live beside the tools.
  • Files whose names start with _ or . are not scanned for tools.
  • The agent does not start if two tools share a name, or if a file’s name matches a module already installed in the image (a json.py, for example). Rename the file.
  • A tools/ folder with no @tool functions logs a warning and adds no tools.

Build and deploy the image

1

Write the Dockerfile

Start from the agent base image and copy your folders in:
Dockerfile
Use base image 0.1.3401 or later. Earlier tags do not read these folders.If a tool needs a Python package the image does not have, install it into the agent’s environment:
2

Build and push it in CI

Build the image and push it to a registry your cluster pulls from. Tag each build, for example with the commit SHA. The tag is the version of the agent’s skills and tools.
3

Point the chart at the image

Set the image in the agent’s values.yaml:
values.yaml
Install or upgrade with Helm, or let Argo CD or Flux sync the change, the same as any self-hosted agent. To roll back, set the previous tag.
4

Confirm it

When the new replica comes online, the agent page’s Skills and tools card lists the baked skills, marked as self-reported, and mcp__custom for the Python tools. A run that calls a Python tool shows it by name in the run’s trace, with its server and its duration.
The values file still configures everything else: instructions, model, MCP servers and skills. When both define the same thing, the values file wins. A skill from the values file replaces a baked skill with the same id, and an MCP server named custom in the values file replaces the baked tools. To read the folders from another path, set AGENTOPS_AGENT_IMAGE_DIR in the chart’s env.
Do not copy files into /etc/agentops/agent. The chart mounts the agent’s configuration there, which hides anything the image put in that folder.
To move to a newer agent base, raise the tag in the FROM line, rebuild and redeploy. The agent page shows Update available when a newer base is out.

Choose the built-in tools

Besides its MCP and Python tools, the agent has built-in tools for files, search and the shell. With nothing set, it gets Read, Glob, Grep, Edit, Write, NotebookEdit, WebSearch and TodoWrite, and its file tools work only inside its own working directory. It has no shell: Bash, PowerShell and WebFetch are off until you grant them. To set the list, add AGENTOPS_BUILTIN_TOOLS to the chart’s env, comma-separated. The list replaces the default:
values.yaml
The agent can read and search files, call its MCP and Python tools, and nothing else.
  • Agent and Task, which start sub-agents, are never granted, even when listed.
  • Keep Read in the list: the agent opens its skills’ files with it.
  • The agent page’s Skills and tools card lists the built-in tools the agent has, so you can see whether it has a shell.
Python tools in the image run without a shell. For a locked-down agent, put the code it needs in tools/ and leave Bash out.

Next steps

Deploy a self-hosted agent

Install the agent base chart with Helm.

Skills

How skills are versioned, approved and attached.

Upgrade a self-hosted agent

Move an installed agent to the newest release.

Using your own image registry

Pull images from a registry you run.