These docs are new.
Expect rough edges. If something is missing or hard to follow, tell us on Discord or by mail at hallo@knecht.works.
Get Started

Concepts

The pieces you meet in the dashboard and how they fit together.

A trigger starts a workflow on a project. Knecht checks the project out in a session, runs the steps in order, boots the full environment when a step asks for it, and delivers what the last steps produced. This page explains each of these pieces, in the order a run touches them, and how the environments are isolated from each other.

Projects

A project is a GitHub repository connected to Knecht. If the repo already ships a .ddev/config.yaml, Knecht boots from it as it is. If not, Knecht reads composer.json, package.json, .nvmrc, and the lockfile, and generates the environment itself; the database, if the project needs one, is picked in the project settings. Environment variables and a database dump are stored on the project, so every run starts from a working state.

Adding and configuring projects is covered on Projects.

Workflows

A workflow is a list of steps Knecht runs on a project, in a fixed order. A typical one boots the project, updates the Composer packages, runs the tests, and opens a pull request. None of these steps need AI. Workflows live in the dashboard, and every instance ships with two starter workflows to copy from.

Building and testing workflows is covered on Workflows.

Triggers

A trigger defines when a workflow starts on its own. Knecht reacts to GitHub events such as a new issue or a label, to changes in a connected issue tracker, and to a schedule. Any workflow can also be started by hand. One workflow can serve several projects.

Actions

Each step in a workflow executes one action. Deterministic actions boot the project, run a shell command or your own JavaScript, call a URL, check the site for broken links, or create a branch, a commit, and a pull request. Control flow actions run steps conditionally or in a loop. The AI action hands the booted project to an agent that reads code, changes files, and runs commands until the task is done. It is one action among the others, and a workflow works without it.

The agent, its instructions, and its memory are covered on AI Agent.

Sessions

A session holds the checkout, one shared agent conversation, and, once booted, the environment with its database and preview. It can hold several tickets and pull requests: a PR that Knecht opens from a session joins it, and a follow-up or mention on either one continues the same conversation instead of starting over. It stays open until all of them are closed, and reopens if one is.

A session is a code session or a preview session. A code session runs in a lightweight workspace container with just the checkout and the project's tools. A preview session also has the full environment, with its database and preview. You pick one when starting a session by hand; a workflow's "Boot project" step, or "Start preview" from the run menu, turns a code session into a preview session for good, and every later step then runs in the environment.

Runs

A run is one execution of a workflow inside a session. Two triggers on the same session run one after the other, never in parallel, even when they belong to different tickets or pull requests that share the session. A run has its own status, log, and steps, and a failed run can be retried from the step where it stopped.

Previews

Every session that has booted the project gets a preview URL. It shows the current state of the environment, stays the same across all runs of the session, and needs a Knecht login to open. The share button on the preview copies a link that lets anyone in without a login for a limited time. By default that is as long as possible: until the stopped preview would be archived, so a visitor never waits for a restore. Settings > Advanced can also make previews public for the whole instance, and each project can override both in its advanced settings. The IDE, services, and terminal always need a login.

Isolation

Every session runs in its own environment on your server. Nothing inside it can reach the host or another session.

  • Own checkout and containers: A session gets its own clone of the repository, its own workspace container, and, once booted, its own DDEV project with a separate web container, database container, and volumes. Two sessions of the same project never share files or a database.
  • Commands run inside the container: Shell commands, JavaScript steps, the agent, the terminal, and the IDE all execute inside the session's container as an unprivileged user: the workspace before the boot step, the web container after it. The Docker socket and the DDEV CLI stay on the Knecht side, so a step cannot start containers or touch the host.
  • Sessions cannot see each other: The containers are detached from DDEV's shared network and attached only to Knecht's ingress network. No ports are published on the host. Previews go through Knecht's proxy, container to container, behind the login.
  • Short-lived credentials: Git pushes from a session use an installation token that is scoped to the one repository and expires after about an hour. The AI key reaches the agent process as an environment variable, not as a file in the checkout.

Security

On a self-hosted instance, Knecht does not manage your server's security or its updates. That stays your responsibility. On a managed instance we operate the server.

The installer sets up Docker and Knecht itself, nothing more. Hardening the host, keeping the operating system patched, restricting SSH, and setting up a firewall beyond ports 80 and 443 are up to you. Knecht updates itself from the dashboard, the rest of the host it leaves alone.

What Knecht does cover is the door into the instance. Only invited members get in, the IDE and terminal sit behind that login, previews too unless you share or open them, webhooks are signature-checked, and stored credentials are encrypted. Since the Knecht container drives the host's Docker daemon, the host should run nothing but Knecht.

Was this page helpful?