-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Feature Request
Add support for Craft headless agents as an agent runner in mdflow.
What is Craft?
Craft is a modern document and notes app for Mac, iPad, and iPhone with rich formatting, real-time collaboration, and a powerful block-based editor. Craft recently introduced Craft Agents — AI-powered assistants that can read, analyze, and act on your workspace content.
Why Craft Agents?
Craft Agents provides a headless CLI designed specifically for non-interactive automation of AI workflows, making it a natural fit for mdflow's markdown-driven approach:
- Headless Mode: Runs without user interaction, ideal for automation pipelines
- Structured Output: Supports
--output-format jsonfor easy parsing and integration - Model Selection: Allows choosing appropriate models (Haiku for simple queries, Claude for complex tasks)
- MCP Integration: Connects to external services via Model Context Protocol servers
- Scheduling-Ready: Designed for cron jobs and recurring automation tasks
Craft Headless Mode Flags
| Flag | Description |
|---|---|
-p "prompt" |
The prompt to execute |
-a "agent" |
Activate a sub-agent by name |
-w "workspace" |
Select workspace by name |
--model |
Choose model (opus, sonnet, haiku) |
--output-format |
Output format (text, json, stream-json) |
--max-turns |
Limit conversation turns |
CLI Example:
craft -p "Summarize my project notes" --output-format textPotential Integration Points
- Filename convention:
agent.craft.md(following mdflow'sagent.<runner>.mdpattern) - Frontmatter mapping: Map frontmatter keys to Craft CLI flags
- Output format: Leverage JSON output for chaining workflows
- Timeout handling: Built-in timeout support for robust automation
Example Usage
agent.craft.md:
---
model: haiku
output-format: json
max-turns: 5
workspace: my-workspace
---
Summarize the key points from the following content...References
- Craft — The document app
- Craft Agents Documentation
- Similar to Add pi coding agent as an agent runner #12 (Pi coding agent runner request)
Metadata
Metadata
Assignees
Labels
No labels