Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: Merged into antcrew>=0.35.0 — pip install antcrew

antcrew-engine

Capability-driven autonomous project execution engine — Layer 2 of the antcrew stack.

The engine iterates an EngineLoop over a natural-language goal, dispatching modular Capability executors until every condition in the desired project state is satisfied. No LangGraph dependency — designed to be embedded directly or wrapped by antcrew (Layer 1).

When to use antcrew-engine vs antcrew

Use antcrew-engine (Layer 2) when you want a fully autonomous loop that builds or modifies code without a fixed pipeline of named roles. The EngineLoop is goal-directed — it reads the current artifact state, picks the cheapest capability that closes the gap toward the desired conditions, and repeats. The set of steps is not known in advance; it emerges from what's already been done. This is the right model for brownfield work (--from-dir), resume runs, and any task where the pipeline structure shouldn't be hardcoded.

Use antcrew (Layer 1) when you want a structured pipeline of named agents (Business Analyst → PM → Backend Dev → QA → Reviewer) orchestrated with LangGraph, with explicit human-in-the-loop between roles, project sessions across multiple runs, and semantic memory. Layer 1 depends on Layer 2 — all its capabilities are re-exported from antcrew_engine.

Architecture

Goal + Constraints
       │
       ▼
  EngineLoop ─── CapabilityRegistry
       │              │
       │    ┌─────────┴──────────────────────────────┐
       │    │  Architect   TaskPlanner   CodeGenerator │
       │    │  TestRunner  BugFixer      HitlReviewer  │
       │    │  CodeReviewer  DocGenerator  ...         │
       │    └─────────────────────────────────────────┘
       │
       ▼
  ArtifactStore  (MemoryStore | FilesystemStore | MultiRepoStore)

Each capability reads from and writes to the store. The EngineLoop picks the cheapest applicable capability until the DesiredProjectState is reached.

Install

pip install antcrew-engine
# with Anthropic support:
pip install "antcrew-engine[anthropic]"
# all model providers:
pip install "antcrew-engine[all]"

Quick start — CLI

# Build a REST API, write output to ./my-api
antcrew-engine "Build a FastAPI REST API with user authentication" \
  --tech Python --output ./my-api

# Load an existing project (skips planning, jumps to coding/testing)
antcrew-engine "Add docstrings to all public functions" \
  --from-dir ./my-project --output ./my-project

# Multi-repo routing (write to different repos by file prefix)
antcrew-engine "Build a full-stack app" \
  --repo backend:/repos/api --repo frontend:/repos/ui \
  --route src/api/:backend --route src/ui/:frontend

# Resume a prior run
antcrew-engine --resume --output ./my-api

# Inspect an existing output directory
antcrew-engine status ./my-api

Quick start — Python API

from antcrew_engine import (
    Operator, MemoryStore, Goal, DesiredProjectState, Constraints,
    Condition, ConditionId, CapabilityRegistry, EventLog, build_llm,
    Architect, TaskPlanner, CodeGenerator, TestGenerator, TestRunner,
    BugFixer, CodeReviewer, DocGenerator, DependencyInstaller,
)

llm = build_llm("claude")   # or "gpt-4o", "groq:llama3-70b", "simulated"

registry = CapabilityRegistry()
registry.register(Architect(llm=llm))
registry.register(TaskPlanner(llm=llm))
registry.register(CodeGenerator(llm=llm))
registry.register(TestGenerator(llm=llm))
registry.register(TestRunner())
registry.register(BugFixer(llm=llm))
registry.register(CodeReviewer(llm=llm))
registry.register(DocGenerator(llm=llm))
registry.register(DependencyInstaller(llm=llm))

store = MemoryStore()

goal = Goal(
    description="Build a CLI tool that converts Markdown to HTML",
    desired_state=DesiredProjectState(frozenset([
        Condition(ConditionId("requirements_exists"), "requirements written"),
        Condition(ConditionId("architecture_exists"), "architecture designed"),
        Condition(ConditionId("task_graph_exists"),   "tasks planned"),
        Condition(ConditionId("implementation_exists"), "code written"),
        Condition(ConditionId("tests_pass"),           "tests passing"),
        Condition(ConditionId("documentation_exists"), "README written"),
    ])),
    constraints=Constraints(tech_stack=("Python",)),
)

event_log = EventLog()
operator  = Operator(registry, [], event_log, max_iterations=40)
state     = operator.run(store, goal)

print("Success:", state.is_complete)
for artifact in store.list():
    print(f"  {artifact.id}: {artifact.kind.value}")

Multi-repo store

Route artifact writes to different filesystem roots by file-path prefix:

from antcrew_engine import MultiRepoStore

store = MultiRepoStore(
    repos={
        "backend":  "/repos/api",
        "frontend": "/repos/ui",
        "shared":   "/repos/shared",
    },
    routes={
        "src/api/": "backend",
        "src/ui/":  "frontend",
    },
    default="shared",
)

Capabilities

Capability Description
Architect Writes requirements + architecture documents
TaskPlanner Breaks architecture into a task graph
CodeGenerator Implements tasks in parallel
CodeRegenerator Regenerates code after a bad review
TestGenerator Writes a pytest test suite
TestRunner Runs pytest, produces a test report
BugFixer Reads the traceback, patches failing files
CodeReviewer Reviews code, produces an approval or rejection
ReviewFixer Applies reviewer feedback to source files
DependencyInstaller Infers requirements.txt and installs a venv
DocGenerator Writes README.md
HitlReviewer Pauses for human approval before proceeding
SpecExtractor Extracts a structured spec from a free-form description

Model support

Pass a model string to build_llm():

String Provider
"claude" Anthropic claude-sonnet (default)
"claude-haiku-4-5-20251001" Anthropic Haiku (cheap/fast)
"gpt-4o" OpenAI
"groq:llama3-70b-8192" Groq
"ollama:llama3" Ollama (local)
"gemini" Google Gemini
"simulated" Deterministic stub (tests / CI)

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

antcrew_engine-0.3.7.tar.gz (101.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

antcrew_engine-0.3.7-py3-none-any.whl (106.6 kB view details)

Uploaded Python 3

File details

Details for the file antcrew_engine-0.3.7.tar.gz.

File metadata

  • Download URL: antcrew_engine-0.3.7.tar.gz
  • Upload date:
  • Size: 101.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for antcrew_engine-0.3.7.tar.gz
Algorithm Hash digest
SHA256 533d77f2f7103596c8d57d964c00c7ae597258337bbbdf2711dd2e809ea9f04b
MD5 82544fa96f13b6304351112056ffb891
BLAKE2b-256 0ef07400da33ab62b0c3518f838ae31ec4dc84c3c2d8edffd4b8e407e00bb2bd

See more details on using hashes here.

File details

Details for the file antcrew_engine-0.3.7-py3-none-any.whl.

File metadata

  • Download URL: antcrew_engine-0.3.7-py3-none-any.whl
  • Upload date:
  • Size: 106.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for antcrew_engine-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a4a6037467561f8657cf5eab723ae0a15eaf8dd3a6e319e77650cd4c50977678
MD5 19fa971827208765e79b5a73d3d45d89
BLAKE2b-256 ed359f6c99eab25d73d94a1916cf57fddd1d6432a605fd5b281547cc6e6cb72d

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.0

2 files

0.3.17

2 files

0.3.16

2 files

0.3.15

2 files

0.3.11

2 files

0.3.10

2 files

0.3.9

2 files

0.3.8

2 files

This release

0.3.7 This release

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page