Knot Documentation
Welcome to the Knot documentation. Knot is an agent orchestration framework that structures AI-driven workflows around looms, knots, and strands.
Key Concepts
- Rig — The project root where Knot operates. Contains looms, profiles, and configuration.
- Loom — A directory ending in
-loomthat organises a set of related strands. Looms are auto-discovered by Knot. - Knot — A named agent configuration stored as a
.mdfile inside a loom. Defines what agent to run, how to process strands, and which directory to watch. - Strand — A markdown file inside a knot's strand directory. Each strand event (create, modify, delete) triggers the agent.
- Tie-off — The agent's response output for a strand. Records the chronological history of agent interactions.
- Profile — A reusable agent configuration stored as a named
.mdfile with YAML frontmatter. Knots reference profiles instead of embedding full agent configs inline.
Architecture
Knot follows a clean architecture with:
- Domain layer — Entities, value objects, and business rules
- Application layer — Use cases and ports (abstractions)
- Adapter layer — Inbound (HTTP handlers) and outbound (file system, subprocess) implementations
Project Structure
project/
├── docs/ # Design documents
├── adrs/ # Architecture Decision Records
├── dprs/ # Design Pattern Records
├── prds/ # Product Requirement Documents
└── plans/ # Implementation plans
Getting Started
Knot is a Rust application using axum for HTTP and tokio for async runtime. It watches the file system for strand changes and invokes AI agents through a subprocess runner.