Declarative YAML-based framework for defining, managing, and orchestrating AI coding agent instances
Project description
scitex-agent-container
Declarative YAML-based AI agent lifecycle management
pip install scitex-agent-container
Problem
Managing AI coding agents (Claude Code, Cursor, Aider) in production requires manual script-writing, environment setup, and process monitoring for each agent instance. Scaling from one agent to a fleet means duplicating fragile shell scripts with no health checks, restart policies, or lifecycle management.
Solution
scitex-agent-container provides declarative YAML definitions that fully specify an agent -- runtime, model, channels, environment, health checks -- started with a single command:
- YAML-first configuration -- one file defines runtime, model, watchdog, health checks, restart policy, and hooks
- Pluggable runtimes -- run agents bare on screen, inside Docker, or inside Apptainer (HPC clusters)
- Built-in watchdog -- auto-responds to Claude Code's permission prompts so agents run unattended
- Health checks and restart policies -- agents self-heal with configurable backoff
YAML manifest --> scitex-agent-container start --> screen session
+ watchdog
+ health monitor
+ restart policy
Installation
Requires Python >= 3.10.
pip install scitex-agent-container
# With Telegram integration
pip install scitex-agent-container[telegram]
# Development
pip install scitex-agent-container[dev]
Quickstart
- Write a YAML manifest:
apiVersion: cld-agent/v1
kind: Agent
metadata:
name: telegram-master
labels:
role: telegram
team: core
spec:
runtime: claude-code
model: opus[1m]
workdir: ~/proj
claude:
channels:
- plugin:telegram@claude-plugins-official
flags:
- --dangerously-skip-permissions
session: continue
env:
CLAUDE_AGENT_ROLE: telegram
CLAUDE_AGENT_ID: telegram-master
screen:
name: cld-telegram
watchdog:
enabled: true
interval: 1.5
responses:
y_n: "1"
y_y_n: "2"
waiting: "/speak-and-call"
health:
enabled: true
interval: 30
method: screen-alive
restart:
policy: on-failure
max_retries: 3
backoff:
initial: 30
max: 300
multiplier: 2
- Start and monitor:
scitex-agent-container start config/examples/telegram-master.yaml
scitex-agent-container status telegram-master
scitex-agent-container logs telegram-master -n 100
scitex-agent-container attach telegram-master # Ctrl-A D to detach
Four Interfaces
Python API
from scitex_agent_container import (
AgentConfig, load_config, validate_config,
agent_start, agent_stop, agent_restart, agent_status, agent_logs,
Registry,
)
config = load_config("agent.yaml") # Parse YAML manifest
agent_start("agent.yaml") # Launch agent
info = agent_status("telegram-master") # Query status
agent_stop("telegram-master") # Stop agent
agent_restart("telegram-master") # Restart agent
output = agent_logs("telegram-master") # Read logs
registry = Registry() # Access agent registry
CLI Commands
scitex-agent-container --help-recursive # Show all commands
# Lifecycle
scitex-agent-container start <config.yaml> # Start an agent
scitex-agent-container stop <name> # Stop an agent
scitex-agent-container restart <name> # Restart an agent
scitex-agent-container attach <name> # Attach to screen session
# Inspection
scitex-agent-container status [name] [--json] # Show agent status
scitex-agent-container list [--json] # List all agents
scitex-agent-container ps [--json] # Alias for list
scitex-agent-container logs <name> [-n LINES] # Show recent output
scitex-agent-container health <name> [--json] # Run health check
# Configuration
scitex-agent-container validate <config.yaml> # Validate YAML config
scitex-agent-container build [--runtime docker|apptainer]
# Maintenance
scitex-agent-container cleanup # Remove stale entries
scitex-agent-container list-python-apis [-v] # List public API tree
scitex-agent-container version # Show version
MCP Server -- for AI Agents
Not yet implemented. Planned for a future release.
Skills -- for AI Agent Discovery
Skills are planned for a future release. They will be available under _skills/ and via the CLI.
Part of SciTeX
scitex-agent-container is part of SciTeX. It depends on scitex-container for container runtime abstractions and is used by scitex-orochi for multi-machine agent orchestration.
Four Freedoms for Research
- The freedom to run your research anywhere -- your machine, your terms.
- The freedom to study how every step works -- from raw data to final manuscript.
- The freedom to redistribute your workflows, not just your papers.
- The freedom to modify any module and share improvements with the community.
AGPL-3.0 -- because we believe research infrastructure deserves the same freedoms as the software it runs on.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scitex_agent_container-0.4.0.tar.gz.
File metadata
- Download URL: scitex_agent_container-0.4.0.tar.gz
- Upload date:
- Size: 409.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fad526157f7c3a906a39e4f3e0bd1244379d8c775be67132e11d7618bbc82c83
|
|
| MD5 |
676a977cc13efff4b73ae53cd2c7442f
|
|
| BLAKE2b-256 |
eb7da76319479974a267ad1d42d7e8202347b7d75fbf047fdfe2c1a8e2489cfe
|
File details
Details for the file scitex_agent_container-0.4.0-py3-none-any.whl.
File metadata
- Download URL: scitex_agent_container-0.4.0-py3-none-any.whl
- Upload date:
- Size: 45.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb559c62d4fe4350a10931be81607b531560695c85ab2000f4f98bc00520e4e3
|
|
| MD5 |
eef47257ab6ae1db0625b2df5f5ba126
|
|
| BLAKE2b-256 |
e58444eb81f11649d5df3369d0754aad0bbc341950fcc207435d7399a981c075
|