Factory & Backends¶
Backend Factory¶
backends
¶
Backend registry and factory.
create_backend(name, *, harness, **kwargs)
¶
Create a backend instance by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Backend name ("podman" or "openshell"). |
required |
harness
|
Harness
|
Agent harness instance. |
required |
**kwargs
|
Any
|
Backend-specific arguments (workdir, image, policy, timeout, etc.). |
{}
|
Returns:
| Type | Description |
|---|---|
Backend
|
A Backend instance. |
Source code in src/agentic_ci/backends/__init__.py
Local Backend¶
local
¶
Local (direct execution) backend for agentic-ci.
LocalBackend(workdir='.', extra_env=None, *, harness)
¶
Bases: Backend
Runs an AI agent directly in the local environment.
No container or sandbox — the agent binary must already be installed and accessible on PATH. Useful when agentic-ci is running inside an existing CI container (e.g. Prow) where an extra isolation layer is unnecessary.
Source code in src/agentic_ci/backends/local.py
Podman Backend¶
podman
¶
Podman container backend for agentic-ci.
PodmanBackend(workdir='.', image=None, timeout=1200, extra_env=None, *, harness)
¶
Bases: Backend
Runs an AI agent inside a persistent Podman container.
setup() creates a long-running detached container. run() execs the agent inside it. stop() tears it down. The work directory is mounted into the container and gcloud credentials are mounted read-only.