AI agents on Cix

Give your agent a service to run.

Cix exposes its own host operations through the Model Context Protocol (MCP). The agent reaches the same handlers as REST clients, with permissions set by its LDAP groups. On a configured host, that lets it take a service from a package recipe to a running container and check whether it is ready.

Worked example

“Bring up the service and tell me when it’s ready.”

Build the software on Cix.

With a writable recipe source configured, an agent can submit a package recipe with commitPkgRecipe, check that the commit succeeded and request installation into a workload image with pkgInstall. Cix builds the package from source when it needs a new artefact. The agent can follow progress through getPipeline.

Give the service a place to run.

If it needs a private network or a persistent volume, the agent can create them with createNetwork and createVolume when its role permits. It can then commit a versioned deployment to the site’s writable repository, wait for the commit to succeed and call applyDeployment to run that definition.

Check what actually came up.

If the declared image still needs building, Cix can queue the build and continue the deployment once the image is ready. The agent can read the resulting container with getContainer and report the outcome of its configured readiness probe. See how Cix uses readiness during a rollout →

Inspect recorded MCP calls and permission checks →

Development and debugging

Open the build that failed.

Suppose a package fails its configure step. If the agent requested keep_on_failure, Cix preserves that package’s failed build container. The agent can read the build log with getBuildLog and open the configure script’s own config.log with getContainerFile. The log can show which check failed and the diagnostic produced inside the build container.

For a preserved build, pkgResume can use a corrected recipe version with the existing source tree. On a long build, that saves fetching and extracting the source again. In a recorded MCP check, a build log and a container file both came back byte-for-byte identical to their REST responses. Inspect the recorded reads ↗

Read the remote development guide ↗

An agent workstation

The agent can live on Cix, too.

The project’s agent workstation runs in its own container. Git and cixctl come in the image. The agent client and its working checkout live on a persistent home volume. The workstation can ask Cix to compile a package in a build container, so it needs no compiler of its own. Inspect the workstation design ↗

The same build system produces Cix itself. On a host configured to follow Cix releases, publishing the recipe for a tagged Cix version can trigger a build of the daemon and CLI and an upgrade of the running control plane. Follow a recorded self-hosted upgrade →

Separation of duties

Who gets to change DNS?

A read-only agent can inspect the host.

The standard cix-agents group grants MCP access and read permissions. In a recorded run, Cix let that credential list containers. When the same credential requested createDnsRecord, the host refused the call and logged the missing services:write permission. Inspect the read and refusal ↗

A service writer can make the change.

Use a separate LDAP identity with an additional group granting services:write. That permission covers the services area, including DNS servers as well as records. In a separate run, a write-enabled credential created, updated and deleted a DNS record through MCP. The host audit recorded all three results. Inspect the three writes ↗

You keep control of who gets access.

A build role can grant packages:write, while a deployment role can grant containers:write. Cix offers each agent the tools its groups allow and checks permission again at execution. Even if a group grants identity administration, an agent’s app password cannot create users, change group permissions or issue new credentials. The same restriction applies over REST. Read the credential rules ↗

First connection

Start with read access.

MCP is off by default. Use an MCP client that supports HTTP and can trust your host’s TLS certificate.

Follow the setup commands →