- Update worker prompt to clarify content vs summary fields - Add Skill-First Architecture components (SkillContainer, SkillPolicy) - Add skill tool binding in worker crew - Add policy filtering in builder - Fix KnowledgeService empty query guards - Add tests for KnowledgeService edge cases - Add enable_retrieval flag to profiles - Add skill artifact extraction in flow |
||
|---|---|---|
| chroma_tools | ||
| data | ||
| docs | ||
| embeddings | ||
| knowledge_db | ||
| runs | ||
| scripts | ||
| src/awm_crewai_runner | ||
| test_docs | ||
| tests | ||
| .env.sample | ||
| .gitignore | ||
| apple_sentence_artifact | ||
| ARCHITECTURE.md | ||
| debug_registry.py | ||
| essay_draft | ||
| fix_all_tools.py | ||
| fix_registry.py | ||
| knowledge.db | ||
| MIGRATION_COMPLETE.md | ||
| orange_sentence_artifact | ||
| poetry.lock | ||
| pyproject.toml | ||
| pyproject.toml.bak | ||
| pytest.ini | ||
| README.md | ||
| research_analysis_summary | ||
| run_awm.py | ||
| run_tests.py | ||
| sentence_about_apples | ||
| TEST_REFACTOR_PLAN.md | ||
| test_txt_file | ||
| TESTING.md | ||
| tool_manager.py | ||
| TOOL_REGISTRY_FIXES_SUMMARY.md | ||
| tools.db | ||
| uv.lock | ||
| verify_all_tools.py | ||
| verify_calc.py | ||
AWM CrewAI Flow Runtime (v0.1)
A deterministic, polymorphic Flow-based runtime for AWM (Autonomous Workflow Model), using CrewAI only as an execution substrate. AWM remains authoritative for planning, regulation, and recursion.
This project implements the control plane for running complex tasks safely, recursively, and with configurable execution context (tools, RAG, specialists).
Core Concepts
AWMEnvelope (Immutable)
The canonical unit of work.
- Intent
- Constraints
- Lineage (parent/child)
- Depth tracking
The envelope is never mutated by agents.
Flow Runtime (Non-LLM)
The runtime is a Flow-driven controller, but not generative.
It:
- Invokes AWM Planner for decomposition using CrewAI tasks
- Routes execution through Flow steps (execute → review → route)
- Manages recursion, retries, and limits
- Selects execution profiles
- Injects tools and RAG context
It never "reasons" — it routes.
ExecutionProfile (Polymorphism)
Defines how a task is executed, without changing what the task is.
Profiles may configure:
- Crew composition
- Agent role addenda
- Tool exposure (including RAG)
- Execution policies (strict, exploratory, etc.)
Profiles live above the envelope.
RAG Support
Two supported modes (profile-controlled):
- Runner-managed: deterministic, auditable, read-only context
- Tool-exposed: agent-invoked RAG with guardrails
RAG is execution context, not task memory.
Project Structure
src/awm_crewai_runner/
├── flow/ # Flow orchestration runtime
├── envelope.py # AWMEnvelope definition
├── profiles.py # ExecutionProfile system
├── rag.py # RAG interfaces
├── llm.py # LLM client abstraction (stubbed)
└── awm_assets/
└── awm_v0_1/ # Embedded AWM prompts/assets
Key Changes from Original Design
Instead of distinct LLM agents, the implementation now uses CrewAI tasks coordinated by a Flow runtime:
- Planning Task: Decomposes the intent into executable steps
- Execution Task: Carries out the planned steps
- Review Task: Evaluates execution results for quality and compliance
- Routing Step: Determines retry, replan, or completion
This approach leverages CrewAI's Flow orchestration while maintaining the AWM's authority over planning and regulation.
Installation
pip install poetry
poetry install
Usage
from awm_crewai_runner import AWMEnvelope, STRICT_PROFILE, AWMFlow
# Create an envelope with your intent
envelope = AWMEnvelope(
intent="Your task intent here",
constraints=["constraint1", "constraint2"],
lineage={},
depth=0
)
# Create and run a flow
flow = AWMFlow(envelope=envelope, profile=STRICT_PROFILE)
state = await flow.run_workflow()
result = flow.get_results()
What v0.1 Provides
- Deterministic Flow-based execution using CrewAI tasks
- Explicit recursion and retry control
- Polymorphic execution profiles
- Clean RAG boundary
- No hidden agent planning
- No emergent behavior
What v0.1 Does Not Provide (Yet)
- Concrete LLM backend implementation
- Full CrewAI adapter layer with all features
- Persistence or long-term memory
Design Guarantees
- Intent integrity
- Bounded recursion
- Reproducibility
- Auditability
- Clear separation of planning vs execution
One-Sentence Summary
AWM defines the work. The flow governs execution. CrewAI executes tasks — nothing more.
AWM Documentation
For detailed information about the Autonomous Workflow Model (AWM) principles and architecture, see docs/awm_documentation.md.
For a visual representation of the AWM architecture, see docs/architecture_diagram.md.