Backend¶
backend
¶
Abstract base class for sandbox backends.
HostSetupRefusedError()
¶
Bases: ValueError
allow_host_setup was requested in a CI job, where it is never allowed.
Source code in src/agentic_ci/backend.py
Backend(workdir='.', image=None, *, harness, allow_host_setup=False)
¶
Bases: ABC
Base class for sandbox backends.
Subclasses implement setup() and run() to provide different execution environments (OpenShell sandbox, Podman container, etc.).
Source code in src/agentic_ci/backend.py
setup(otel_port=None)
abstractmethod
¶
stop()
abstractmethod
¶
run(prompt, model, streaming=True, otel_port=None, otel_rate_file=None, extra_args=None, traceparent=None, effort=None)
abstractmethod
¶
Execute the agent with the given prompt. Returns the exit code.
effort is the resolved reasoning effort (None when no effort
flag is passed). It is exported to the agent as
AGENT_REASONING_EFFORT next to AGENT_MODEL; the matching CLI
flags come from the caller through extra_args.
Source code in src/agentic_ci/backend.py
running_in_ci(env=None)
¶
Whether env (default os.environ) marks a CI job.
A marker counts when it is set to a non-empty value other than 0 or
false (any case).