Index
backends
¶
Execution backends — instruments that musicians play.
Classes¶
AnthropicApiBackend
¶
AnthropicApiBackend(model='claude-sonnet-4-5-20250929', api_key_env='ANTHROPIC_API_KEY', max_tokens=16384, temperature=0.7, timeout_seconds=300.0)
Bases: Backend
Run prompts directly via the Anthropic API.
Uses the official anthropic SDK for direct API access. Supports all Claude models available through the API.
Initialize API backend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
str
|
Model ID to use (e.g., claude-sonnet-4-5-20250929) |
'claude-sonnet-4-5-20250929'
|
api_key_env
|
str
|
Environment variable containing API key |
'ANTHROPIC_API_KEY'
|
max_tokens
|
int
|
Maximum tokens for response |
16384
|
temperature
|
float
|
Sampling temperature (0.0-1.0) |
0.7
|
timeout_seconds
|
float
|
Maximum time for API request |
300.0
|
Source code in src/marianne/backends/anthropic_api.py
Functions¶
from_config
classmethod
¶
Create backend from configuration.
Source code in src/marianne/backends/anthropic_api.py
apply_overrides
¶
Apply per-sheet overrides for the next execution.
Source code in src/marianne/backends/anthropic_api.py
clear_overrides
¶
Restore original backend parameters after per-sheet execution.
Source code in src/marianne/backends/anthropic_api.py
set_output_log_path
¶
Set base path for real-time output logging.
Called per-sheet by runner to enable writing API responses to log files. Provides observability parity with ClaudeCliBackend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path | None
|
Base path for log files (without extension), or None to disable. |
required |
Source code in src/marianne/backends/anthropic_api.py
execute
async
¶
Execute a prompt via the Anthropic API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prompt
|
str
|
The prompt to send to Claude |
required |
timeout_seconds
|
float | None
|
Per-call timeout override. API backend uses its
own HTTP timeout from |
None
|
Returns:
| Type | Description |
|---|---|
ExecutionResult
|
ExecutionResult with API response and metadata |
Source code in src/marianne/backends/anthropic_api.py
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 | |
health_check
async
¶
Check if the API is available and authenticated.
Uses a minimal prompt to verify connectivity.
Source code in src/marianne/backends/anthropic_api.py
availability_check
async
¶
Check if the API client can be created without making an API call.
Unlike health_check(), this does NOT send a request or consume API quota. Used after quota exhaustion waits.
Source code in src/marianne/backends/anthropic_api.py
close
async
¶
Close the async client connection (idempotent).
Source code in src/marianne/backends/anthropic_api.py
Backend
¶
Bases: ABC
Abstract base class for Claude execution backends.
Backends handle the actual execution of prompts through Claude, whether via CLI subprocess or direct API calls.
Attributes¶
working_directory
property
writable
¶
Working directory for backend execution.
Subprocess-based backends (e.g. ClaudeCliBackend) use this as the cwd for child processes. API-based backends store it but don't use it directly.
Returns None if no working directory is set, meaning the process CWD is used.
Thread/Concurrency Safety: This property is NOT safe to mutate while executions are in-flight. The worktree isolation layer sets it before any sheet execution starts, and restores it in the finally block after all sheets complete. During parallel execution, all concurrent sheets share the same working directory (the worktree path), so the value is read-only while sheets are running. Never change this property from a concurrent task mid-execution.
override_lock
property
¶
Lock for serializing apply_overrides → execute → clear_overrides cycles.
Parallel sheet execution must acquire this lock around the entire override lifecycle to prevent concurrent sheets from stomping on each other's saved originals.
Functions¶
execute
abstractmethod
async
¶
Execute a prompt and return the result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prompt
|
str
|
The prompt to send to Claude |
required |
timeout_seconds
|
float | None
|
Per-call timeout override. If provided, overrides the backend's default timeout for this single execution. |
None
|
Returns:
| Type | Description |
|---|---|
ExecutionResult
|
ExecutionResult with output and metadata |
Source code in src/marianne/backends/base.py
health_check
abstractmethod
async
¶
Check if the backend is available and working.
Used to verify connectivity before starting a job, and to check if rate limits have lifted.
Returns:
| Type | Description |
|---|---|
bool
|
True if backend is ready, False otherwise |
Source code in src/marianne/backends/base.py
availability_check
async
¶
Lightweight check: is the backend reachable without consuming API quota?
Unlike health_check(), this must NOT send prompts or consume tokens. Used after quota exhaustion waits where sending a prompt would fail.
Default returns True (assume available). Backends override for real checks.
Source code in src/marianne/backends/base.py
close
async
¶
Close the backend and release resources.
Override in subclasses that hold persistent connections or resources. Default implementation is a no-op for backends without cleanup needs.
This method should be idempotent - calling it multiple times should be safe.
Source code in src/marianne/backends/base.py
__aenter__
async
¶
__aexit__
async
¶
Async context manager exit — ensures close() is called.
apply_overrides
¶
Apply per-sheet parameter overrides for the next execution.
Called per-sheet by the runner when sheet_overrides is configured.
Subclasses store the overrides and apply them in execute().
clear_overrides() is called after execution to restore defaults.
Callers MUST hold override_lock for the entire
apply → execute → clear window when parallel execution is possible.
Default implementation is a no-op for backends without override support.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
overrides
|
dict[str, object]
|
Dict of parameter name → value. Only non-None values
from |
required |
Source code in src/marianne/backends/base.py
clear_overrides
¶
Clear per-sheet parameter overrides, restoring defaults.
Called after each sheet execution to ensure the next sheet uses global config. Default implementation is a no-op.
set_preamble
¶
Set the dynamic preamble for the next execution.
Called per-sheet by the runner with a context-aware preamble built by
build_preamble(). The preamble includes sheet identity, position,
workspace, and retry status.
Override in subclasses that support prompt injection. Default implementation is a no-op for backends without this capability.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
_preamble
|
str | None
|
Preamble text to prepend, or None to clear. |
required |
Source code in src/marianne/backends/base.py
set_prompt_extensions
¶
Set prompt extensions for the next execution.
Extensions are additional directive blocks injected after the preamble. Called per-sheet by the runner to apply score-level and sheet-level prompt extensions (GH#76).
Override in subclasses that support prompt injection. Default implementation is a no-op for backends without this capability.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
_extensions
|
list[str]
|
List of extension text blocks. |
required |
Source code in src/marianne/backends/base.py
set_output_log_path
¶
Set base path for real-time output logging.
Called per-sheet by runner to enable streaming output to log files. This provides visibility into backend output during long executions.
Uses industry-standard separate files for stdout and stderr: - {path}.stdout.log - standard output - {path}.stderr.log - standard error
Override in subclasses that support real-time output streaming. Default implementation is a no-op for backends without this capability.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
_path
|
Path | None
|
Base path for log files (without extension), or None to disable. |
required |
Source code in src/marianne/backends/base.py
ExecutionResult
dataclass
¶
ExecutionResult(success, stdout, stderr, duration_seconds, exit_code=None, exit_signal=None, exit_reason='completed', started_at=utc_now(), rate_limited=False, rate_limit_wait_seconds=None, error_type=None, error_message=None, model=None, tokens_used=None, input_tokens=None, output_tokens=None)
Result of executing a prompt through a backend.
Captures all relevant output and metadata for validation and debugging.
Note: Fields are ordered with required fields first, then optional fields with defaults, as required by Python dataclasses.
Attributes¶
exit_code
class-attribute
instance-attribute
¶
Process exit code or HTTP status code. None if killed by signal.
exit_signal
class-attribute
instance-attribute
¶
Signal number if process was killed by a signal (e.g., 9=SIGKILL, 15=SIGTERM).
On Unix, when a process is killed by a signal, returncode = -signal_number. This field extracts that signal for clearer diagnostics.
exit_reason
class-attribute
instance-attribute
¶
Why the execution ended: - completed: Normal exit (exit_code set) - timeout: Process was killed due to timeout - killed: Process was killed by external signal - error: Internal error prevented execution
started_at
class-attribute
instance-attribute
¶
started_at = field(default_factory=utc_now)
When execution started.
rate_limited
class-attribute
instance-attribute
¶
Whether rate limiting was detected.
rate_limit_wait_seconds
class-attribute
instance-attribute
¶
Parsed wait duration from rate limit error, in seconds.
When set, this is the actual duration extracted from the API's error message (e.g. 'retry after 300 seconds'). When None, callers should use their default wait time.
error_message
class-attribute
instance-attribute
¶
Human-readable error message.
tokens_used
class-attribute
instance-attribute
¶
Total tokens consumed (API backend only).
.. deprecated::
Use input_tokens + output_tokens instead. This field will be
removed in a future version.
Equivalent: tokens_used == (input_tokens or 0) + (output_tokens or 0).
input_tokens
class-attribute
instance-attribute
¶
Input tokens consumed (prompt tokens). None if not available from backend.
output_tokens
class-attribute
instance-attribute
¶
Output tokens consumed (completion tokens). None if not available from backend.
Functions¶
__post_init__
¶
Validate invariant: success=True requires exit_code 0 or None.
Source code in src/marianne/backends/base.py
ClaudeCliBackend
¶
ClaudeCliBackend(skip_permissions=True, disable_mcp=True, output_format='text', cli_model=None, allowed_tools=None, system_prompt_file=None, working_directory=None, timeout_seconds=1800.0, progress_callback=None, progress_interval_seconds=5.0, cli_extra_args=None)
Bases: Backend
Run prompts via the Claude CLI.
Uses asyncio.create_subprocess_exec to invoke claude -p <prompt>.
This is shell-injection safe as arguments are passed as a list.
Initialize CLI backend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
skip_permissions
|
bool
|
Pass --dangerously-skip-permissions |
True
|
disable_mcp
|
bool
|
Disable MCP servers for faster execution (--strict-mcp-config) |
True
|
output_format
|
str
|
Output format (json, text, stream-json) |
'text'
|
cli_model
|
str | None
|
Model to use (--model flag), None uses default |
None
|
allowed_tools
|
list[str] | None
|
Restrict to specific tools (--allowedTools) |
None
|
system_prompt_file
|
Path | None
|
Custom system prompt file (--system-prompt) |
None
|
working_directory
|
Path | None
|
Working directory for running commands |
None
|
timeout_seconds
|
float
|
Maximum time allowed per prompt |
1800.0
|
progress_callback
|
ProgressCallback | None
|
Optional callback for progress updates during execution. Called with dict containing: bytes_received, lines_received, elapsed_seconds, phase. |
None
|
progress_interval_seconds
|
float
|
How often to call progress callback (default 5s). |
5.0
|
cli_extra_args
|
list[str] | None
|
Extra arguments to pass to claude CLI (escape hatch). |
None
|
Source code in src/marianne/backends/claude_cli.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | |
Functions¶
from_config
classmethod
¶
Create backend from configuration.
Source code in src/marianne/backends/claude_cli.py
apply_overrides
¶
Apply per-sheet overrides for the next execution.
Source code in src/marianne/backends/claude_cli.py
clear_overrides
¶
Restore original backend parameters after per-sheet execution.
Source code in src/marianne/backends/claude_cli.py
set_output_log_path
¶
Set base path for real-time output logging.
Called per-sheet by runner to enable streaming output to log files. This provides visibility into Claude's output during long executions.
Uses industry-standard separate files for stdout and stderr: - {path}.stdout.log - standard output - {path}.stderr.log - standard error
This enables clean tail -f monitoring without stream interleaving.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path | None
|
Base path for log files (without extension), or None to disable. Example: workspace/logs/sheet-01 creates sheet-01.stdout.log |
required |
Source code in src/marianne/backends/claude_cli.py
set_preamble
¶
Set the dynamic preamble for the next execution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
preamble
|
str | None
|
Preamble text to prepend, or None to clear. |
required |
set_prompt_extensions
¶
Set prompt extensions for the next execution.
Extensions are additional directive blocks injected after the preamble. Called per-sheet by the runner to apply score-level and sheet-level extensions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
extensions
|
list[str]
|
List of extension text blocks. Empty strings are ignored. |
required |
Source code in src/marianne/backends/claude_cli.py
execute
async
¶
Execute a prompt (Backend protocol implementation).
Source code in src/marianne/backends/claude_cli.py
health_check
async
¶
Check if claude CLI is available and responsive.
Source code in src/marianne/backends/claude_cli.py
availability_check
async
¶
Check if the claude CLI binary exists and is executable.
Unlike health_check(), this does NOT send a prompt or consume API quota. Used after quota exhaustion waits.
Source code in src/marianne/backends/claude_cli.py
OllamaBackend
¶
OllamaBackend(base_url='http://localhost:11434', model='llama3.1:8b', timeout=300.0, num_ctx=32768, keep_alive='5m', max_tool_iterations=10, mcp_proxy=None)
Bases: HttpxClientMixin, Backend
Backend for Ollama model execution with tool translation.
Implements the Backend protocol for local Ollama models. Supports: - MCP tool schema translation to Ollama function format - Multi-turn agentic loop for tool calling - Health checks via /api/tags endpoint
Example usage
backend = OllamaBackend( base_url="http://localhost:11434", model="llama3.1:8b", ) result = await backend.execute("Write a hello world function")
Initialize Ollama backend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_url
|
str
|
Ollama server URL (default: http://localhost:11434) |
'http://localhost:11434'
|
model
|
str
|
Model to use (must support tool calling) |
'llama3.1:8b'
|
timeout
|
float
|
Request timeout in seconds |
300.0
|
num_ctx
|
int
|
Context window size (recommend >= 32768 for Claude Code tools) |
32768
|
keep_alive
|
str
|
Keep model loaded duration (e.g., "5m", "1h") |
'5m'
|
max_tool_iterations
|
int
|
Maximum tool call iterations per execution |
10
|
mcp_proxy
|
MCPProxyService | None
|
Optional MCPProxyService for tool execution |
None
|
Source code in src/marianne/backends/ollama.py
Attributes¶
Functions¶
from_config
classmethod
¶
Create backend from configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
BackendConfig
|
Backend configuration with ollama settings |
required |
Returns:
| Type | Description |
|---|---|
OllamaBackend
|
Configured OllamaBackend instance |
Source code in src/marianne/backends/ollama.py
set_preamble
¶
set_prompt_extensions
¶
execute
async
¶
Execute a prompt and return the result.
Runs the agentic loop if tools are available via MCPProxyService, otherwise performs a simple completion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prompt
|
str
|
The prompt to send to Ollama |
required |
timeout_seconds
|
float | None
|
Per-call timeout override. Ollama uses the httpx
client-level timeout from |
None
|
Returns:
| Type | Description |
|---|---|
ExecutionResult
|
ExecutionResult with output and metadata |
Source code in src/marianne/backends/ollama.py
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | |
health_check
async
¶
Check if Ollama is available and model is loaded.
Uses /api/tags to verify Ollama is running and configured model exists.
Returns:
| Type | Description |
|---|---|
bool
|
True if healthy, False otherwise |
Source code in src/marianne/backends/ollama.py
OpenRouterBackend
¶
OpenRouterBackend(model=_DEFAULT_MODEL, api_key_env='OPENROUTER_API_KEY', max_tokens=16384, temperature=0.7, timeout_seconds=300.0, base_url=_OPENROUTER_BASE_URL)
Bases: HttpxClientMixin, Backend
Run prompts via the OpenRouter API (OpenAI-compatible).
Provides direct HTTP access to 300+ models including free-tier options. Uses HttpxClientMixin for lazy, connection-pooled httpx client lifecycle.
Example usage::
backend = OpenRouterBackend(
model="minimax/minimax-m1-80k",
api_key_env="OPENROUTER_API_KEY",
)
result = await backend.execute("Explain quicksort")
Initialize OpenRouter backend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
str
|
Model ID (e.g., 'minimax/minimax-m1-80k', 'google/gemma-4'). |
_DEFAULT_MODEL
|
api_key_env
|
str
|
Environment variable containing API key. |
'OPENROUTER_API_KEY'
|
max_tokens
|
int
|
Maximum tokens for response. |
16384
|
temperature
|
float
|
Sampling temperature (0.0-2.0). |
0.7
|
timeout_seconds
|
float
|
Maximum time for API request. |
300.0
|
base_url
|
str
|
OpenRouter API base URL (without endpoint path). |
_OPENROUTER_BASE_URL
|
Source code in src/marianne/backends/openrouter.py
Attributes¶
Functions¶
from_config
classmethod
¶
Create backend from a BackendConfig.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
object
|
A BackendConfig instance (typed as object to avoid circular import — BackendConfig lives in core.config). |
required |
Returns:
| Type | Description |
|---|---|
OpenRouterBackend
|
Configured OpenRouterBackend instance. |
Source code in src/marianne/backends/openrouter.py
apply_overrides
¶
Apply per-sheet overrides for the next execution.
Source code in src/marianne/backends/openrouter.py
clear_overrides
¶
Restore original backend parameters after per-sheet execution.
Source code in src/marianne/backends/openrouter.py
set_preamble
¶
set_prompt_extensions
¶
set_output_log_path
¶
Set base path for real-time output logging.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path | None
|
Base path for log files (without extension), or None to disable. |
required |
Source code in src/marianne/backends/openrouter.py
execute
async
¶
Execute a prompt via the OpenRouter API.
Sends a chat completion request to OpenRouter's OpenAI-compatible endpoint and returns the result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prompt
|
str
|
The prompt to send. |
required |
timeout_seconds
|
float | None
|
Per-call timeout override. Logged but not enforced (httpx client timeout from init is used). |
None
|
Returns:
| Type | Description |
|---|---|
ExecutionResult
|
ExecutionResult with API response and metadata. |
Source code in src/marianne/backends/openrouter.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | |
health_check
async
¶
Check if the OpenRouter API is reachable and authenticated.
Uses the /models endpoint (lightweight, no token consumption) to verify connectivity and authentication.
Returns:
| Type | Description |
|---|---|
bool
|
True if healthy, False otherwise. |
Source code in src/marianne/backends/openrouter.py
availability_check
async
¶
Check if the backend can be initialized without consuming API quota.
Verifies that the API key is present and the httpx client can be created. Does NOT make any HTTP requests.
Source code in src/marianne/backends/openrouter.py
RecursiveLightBackend
¶
Bases: HttpxClientMixin, Backend
Execute prompts via Recursive Light HTTP API.
Uses httpx.AsyncClient to communicate with the Recursive Light server for TDF-aligned processing with confidence scoring, domain activations, and boundary state tracking.
The RL server provides dual-LLM processing: - LLM #1 (unconscious): Confidence assessment and domain activation - LLM #2 (conscious): Response generation with accumulated wisdom
Attributes:
| Name | Type | Description |
|---|---|---|
rl_endpoint |
Base URL for the Recursive Light API. |
|
user_id |
Unique identifier for this Marianne instance. |
|
timeout |
Request timeout in seconds. |
Initialize Recursive Light backend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rl_endpoint
|
str
|
Base URL for the Recursive Light API server. Defaults to localhost:8080 for local development. |
'http://localhost:8080'
|
user_id
|
str | None
|
Unique identifier for this Marianne instance. Generates a UUID if not provided. |
None
|
timeout
|
float
|
Request timeout in seconds. Defaults to 30.0. |
30.0
|
Source code in src/marianne/backends/recursive_light.py
Attributes¶
Functions¶
from_config
classmethod
¶
Create backend from configuration.
Source code in src/marianne/backends/recursive_light.py
execute
async
¶
Execute a prompt through Recursive Light API.
Sends the prompt to RL's /api/process endpoint and parses the response for text output plus RL-specific metadata (confidence, domain activations, boundary states, quality).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prompt
|
str
|
The prompt to send to Recursive Light. |
required |
timeout_seconds
|
float | None
|
Per-call timeout override. RL backend uses its
own HTTP timeout from |
None
|
Returns:
| Type | Description |
|---|---|
ExecutionResult
|
ExecutionResult with output text and RL metadata populated. |
ExecutionResult
|
On connection errors, returns a failed result with graceful |
ExecutionResult
|
error handling (not raising exceptions). |
Source code in src/marianne/backends/recursive_light.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | |
health_check
async
¶
Check if Recursive Light server is available and responding.
Attempts to reach the RL health endpoint (or root) to verify connectivity before starting a job.
Returns:
| Type | Description |
|---|---|
bool
|
True if RL server is healthy and responding, False otherwise. |
Source code in src/marianne/backends/recursive_light.py
close
async
¶
Close the HTTP client connection.
Should be called when done using the backend to clean up resources.