Autogen Team has evolved from an MLOps library into a Long-Term Agentic System serving as the intelligence core for the Dark Gravity CA/CD Autonomous Agent Factory.
Built upon strict Domain-Driven Design (DDD) standards and solid LLMOps principles, this Python package provides the robust architectural foundation required to orchestrate multi-agent autonomous workloads spanning long-running software development lifecycles.
The codebase enforces strict separation of concerns to handle the deep complexity of autonomous multi-agent interactions, ensuring absolute maintainability over the long term.
core/: Shared kernel (schemas, business-independent exceptions, security protocols).application/: Orchestrates use-cases without knowing infrastructure details. Includes Hatchet Workflows (e.g.,autonomous_mission.py), the Agents themselves, and the MCP Server.infrastructure/: The outermost layer connecting to the world. Encompasses A2A (Agent-to-Agent) Kafka messaging protocols, Hatchet API clients, MinIO connections, and Firecracker MicroVM Sandbox Services.- Bounded Contexts: Independent domains such as
models,data_access,registry, andevaluationoperate with dedicated Data Adapter and Repository patterns.
While prioritizing long-term autonomous agents, the systemic backbone uses proven LLMOps pipelines. The factory natively supports offline evaluations, asynchronous inferences, and RAG context persistence via R2R and pgvector.
Within the Dark Gravity Zero-Trust Cluster, this package drives the opencode workers.
Missions are managed through Hatchet (yielding durable state and parallel "fan-out" execution), utilizing Model Context Protocol (MCP) tools for completely automated planning, code execution in sandboxes, testing, and security scanning.
This package operates as the Agentic Intelligence & LLMOps Engine within the Dark Gravity Autonomous CA/CD Software Factory (Architecture Knowledge Base).
-
Agent Cognition & Tooling: Drives the cognitive worker nodes (
agentsnamespace) and the Model Context Protocol (MCP) server for multi-agent autonomous planning (Rustant), coding (ZeroClaw), and verification. -
OpenWiki & ISO Compliance: Governs architectural documentation following ISO/IEC/IEEE 42010:2022 and ISO/IEC/IEEE 15289:2019, ensuring zero symbol drift (Orphan Symbol Rate
$\text{OSR} < 5%$ ) across mission lifecycles. -
Context Persistence in S3 & Vector DB: Connects directly with the sovereign S3 storage tier (
r2r-documentsandsemantica-provenancebuckets) and PostgreSQL CNPGpgvectorfor long-term memory retrieval.
- Sovereignty Against Closed-Source AI APIs: Designed to run with local ternary/open weights (Bonsai 27B Ternario, Qwen 2.5 Coder 7B) through LiteLLM with air-gapped zero-ingress governance, eliminating critical external API single points of failure.
- Autonomous Supply-Chain Auditing: Maintained independently under
@lgcorzowith continuous dependency scanning and strict zeroize memory sanitization.
- Install
- The Agentic CA/CD Factory
- Legacy Batch & Realtime Inference
- Configuration
- Development Workflow
- Project Structure Map
-
Clone the repository:
git clone https://github.com/lgcorzo/llmops-python-package cd llmops-python-package -
Install dependencies with Poetry:
poetry install
The flagship implementation of this package is the Autonomous Mission Workflow which transforms software requirements into fully reviewed, production-ready Pull Requests.
Core Agentic Components:
- Hatchet Workflow DSL:
AutonomousMissionWorkflowhandles task DAG planning, fan-out execution of worker tasks in parallel (usingaio_run_many), and aggregation/review with durable execution state. - OpenCode Workers: Dynamically scaled by KEDA based on Kafka queues to act as robust edge-workers executing the Hatchet flows.
- MCP Server (Model Context Protocol): Exposes a standardized suite of deep integrations to the LLMs.
- Zero Trust Network: All A2A (Agent to Agent) communication is encrypted and validated dynamically via OpenZiti APIs.
Driven by configuration (confs/mcp_prompts.yaml), the MCP exposes:
plan_mission: Break down a goal into a Task DAG (Planner Agent).execute_code: Generate and inject code changes securely within an ephemeral Sandbox (Coder Agent).run_tests: Run isolated test suites over PR diffs in a MicroVM (Tester Agent).security_review: Comprehensive OWASP & RAG-backed vulnerability analysis (Reviewer Agent).retrieve_context&index_code: Semantic queries over the codebase via an R2R Knowledge Graph.
# Start the MCP Server
poetry run invoke projects.mcp
# With custom system prompts for agents:
poetry run invoke projects.mcp --prompts=confs/mcp_prompts.yamlThe package still seamlessly supports legacy MLOps topologies managed by OmegaConf configurations.
poetry run autogen_team confs/training.yaml
poetry run autogen_team confs/evaluations.yaml
# etc.- Hatchet Inference: Offload batch inference asynchronously
poetry run invoke projects.run --job hatchet_inference - Kafka Streaming: Realtime inference streams using Docker Compose stack. Run
docker-compose up -d(Includes Kafka, MLflow, Inference Service UI on port 8081).
We aggressively decouple configuration from code using OmegaConf and Pydantic. System prompts for the Autonomous team live in confs/mcp_prompts.yaml, and job logic in corresponding YAML files.
Access the JSON schema for configurations:
poetry run autogen_team --schemaTask automation is heavily driven by Invoke.
- Format:
inv format(Ruff) - Check (Lint/Type/Test):
inv checks(Mypy, Pytest, Ruff) - Comprehensive Lifecycle Test:
inv all(E2E job orchestration, Kafka, MCP test boot) - List Tasks:
inv --list
Ensure you install pre-commit hooks before committing:
poetry run pre-commit install.
├── confs/ # YAML configurations (Jobs, MCP Prompts)
├── data/ # Data directory (inputs/targets)
├── src/
│ └── autogen_team/ # Main package source code
│ ├── application/ # Application Layer: Workflows, MCP Server, Agents, Jobs
│ ├── core/ # Core Layer: Shared schemas, common security interfaces
│ ├── data_access/ # Bounded Context: Data adapters & repositories
│ ├── evaluation/ # Bounded Context: Eval metrics & services
│ ├── infrastructure/ # Infrastructure Layer: Hatchet/Minio/Kafka Integrations, Sandbox
│ ├── models/ # Bounded Context: Model registries & entities
│ └── registry/ # Bounded Context: Loggers and state registry
