FarmOS Task Manager
Work orders and task management — view assignments, check status, and manage the task workflow.
When to Use This
What this skill handles: Task creation, assignments, status updates, work orders, action items, follow-ups, and restock/procurement requests.
Trigger phrases: "remind me to...", "we need to...", "someone should...", "create a task", "what tasks are assigned to me?", "any overdue tasks?", "mark task X as complete", "we're low on...", "used the last...", "we need more..."
What this does NOT handle: Equipment maintenance tracking (use farmos-equipment), scheduling/time-off/availability (use farmos-workforce), field observations and scouting reports (use farmos-observations).
Minimum viable input: Any description of work that needs to happen. "We need to do something about field 12" is enough.
API Base
http://100.102.77.110:8007
Integration Endpoints (No Auth Required)
Dashboard Summary
GET /api/integration/dashboard
Returns: Task widget data — counts by status, priority breakdown, recent activity. Use for summary stats only — not for listing tasks.
Tasks Summary
GET /api/integration/tasks-summary
Returns: Aggregate counts:
CODEBLOCK0
Task List (Filtered)
GET /api/integration/tasks?limit=10&status=in_progress&priority=high
Query params: limit, status (pending|assigned|in_progress|completed|cancelled), priority (low|normal|high|critical)
Returns: Simplified task objects with id, title, status, priority, due_date, assignees.
Single Task
GET /api/integration/tasks/{id}
Returns: Full task detail for integration.
Authenticated Endpoints
These require JWT auth. See Authentication section below.
Authentication
This skill accesses protected FarmOS endpoints that require a JWT token.
To get a token: Run the auth helper with the appropriate role:
CODEBLOCK1
To use the token: Include it as a Bearer token:
CODEBLOCK2
Token expiry: Tokens last 15 minutes. If you get a 401 response, request a new token.
Role mapping: Check the sender's role in ~/.clawdbot/farmos-users.json to determine which auth level to use. If the user's role doesn't have permission for the requested data, tell them they don't have access rather than trying with a higher-privilege token.
My Tasks (Employee View)
GET /api/tasks/mine
Authorization: Bearer {token}
Returns: Tasks assigned to the authenticated user.
Create Task (Manager+)
POST /api/tasks
Authorization: Bearer {token}
Content-Type: application/json
Body:
CODEBLOCK3
Update Task Status
POST /api/tasks/{id}/start — Mark as in_progress
POST /api/tasks/{id}/complete — Mark as completed
POST /api/tasks/{id}/cancel — Cancel task
Authorization: Bearer {token}
Assign Task (Manager+)
POST /api/tasks/{id}/assign
Authorization: Bearer {token}
Content-Type: application/json
Body:
CODEBLOCK4
Employee IDs come from the Workforce module integration endpoint.
Task Templates
List Templates
GET /api/templates
Authorization: Bearer {token}
Create Task from Template
POST /api/templates/{id}/create-task
Authorization: Bearer {token}
Creates a new task pre-filled from the template.
Status Workflow
CODEBLOCK5
- - Tasks start as "pending"
- Assigning employees moves to "assigned"
- Worker starting moves to "in_progress"
- Worker finishing moves to "completed"
Conversational Task Creation
The bot should recognize when someone describes work that needs to happen and offer to create a task. Do NOT create tasks silently — always offer first.
Auto-Detect from Conversation
When someone describes actionable work, extract as much as you can:
| Signal | How to Detect | Example |
|---|
| Assignee | "tell Jake to..." → Jake. "I need to..." → reporter. Otherwise → unassigned | "Tell Jake to check the tile outlet" → assignee: Jake |
| Priority |
"ASAP" / "before it rains" / "right now" → high. "When you get a chance" / "sometime" → low. Default → normal | "We need to spray before it rains" → priority: high |
|
Field | Field number, field name, landmark reference | "field 14", "the Byrd farm", "that field by the elevator" |
|
Equipment | Machine name, number, type | "the 8370R", "the planter", "combine #2" |
|
Deadline | Time references parsed to dates | "by Thursday", "this week", "before planting", "end of month" |
Natural Language Examples
| What They Say | Auto-Detect |
|---|
| "We need to spray field 14 before Thursday" | Field: 14, action: spray, deadline: Thursday |
| "Remind me to call the seed rep" |
Assignee: reporter, action: call seed rep |
| "Someone should check the tile outlet in field 8" | Field: 8, action: check tile outlet, unassigned |
| "The north fence needs fixed before we turn cows out" | Location: north fence, context: cattle, deadline: before turnout |
| "Jake needs to grease the planter before we start" | Assignee: Jake, equipment: planter, action: grease |
| "We should probably get the combine serviced this month" | Equipment: combine, action: service, deadline: end of month, priority: normal |
Confirmation Before Creating (ALWAYS)
Never create a task without confirming. Pattern:
"Creating: 'Spray field 14' — due Thursday, unassigned. Sound right?"
If they say yes, confirm details and POST. If they tweak something ("actually make it high priority"), adjust and confirm again.
When NOT to Offer a Task
- - Message is clearly just conversation, not actionable ("Man, that field looks rough")
- Someone is asking a question, not requesting work ("When was field 14 last sprayed?")
- The work is already being done right now ("I'm spraying field 14")
- It's a status update, not a new request ("Field 14 is done")
Guidance
- - "Want me to make that a task?" is the right prompt when it sounds like work
- If vague, create the task with what you have — a vague task is better than no task
- For recurring needs ("we always need to do X before Y"), mention templates: "Want me to create a template for this so it auto-generates next time?"
- After creating, offer related actions: "Want me to assign someone?" "Should I set a reminder?"
Parts & Supplies Intake
Any mention of supply levels should be treated as actionable. The bot captures supply intel that would otherwise be lost.
Detection Patterns
| What They Say | Action | Priority |
|---|
| "We're low on hydraulic filters" | Offer restock task (tag: procurement) | normal |
| "Used the last box of seed treatment" |
Create restock task (tag: procurement) | high — last one is urgent |
| "We're gonna need more twine before we're done" | Offer restock task (tag: procurement) | normal |
| "Down to 2 hydraulic filters for the planters" | Offer restock task with quantity context | normal |
| "I ordered 5 gallons of Roundup" | Acknowledge — no task needed (already ordered) | — |
| "Where do we keep the grease cartridges?" | Answer question — no task | — |
| "We're out of DEF" | Create restock task (tag: procurement) | high — completely out |
Response Patterns
- - Low supply: "Good to know — logged it. Want me to create a restock task or just flag it for Brian?"
- Last one / completely out: "Noted — that sounds urgent. Creating a restock task now." (still confirm, but signal urgency)
- Already ordered: "Got it, thanks for the heads up." (no task, just acknowledge)
- Question about supplies: Answer the question, no task creation
Restock Task Format
When creating a procurement task:
CODEBLOCK6
Tag ALL supply/restock tasks with procurement so they can be filtered and batched for ordering.
For "used the last" or "completely out" situations, set priority to "high".
Data Completeness
- - Always report the total count of records returned
- If a query returns suspiciously few results, say so: "I'm only seeing X results — that may be incomplete"
- Use integration
/tasks endpoint with appropriate filters for listing, not /api/integration/dashboard (which truncates) - For paginated results, note the total and offer to fetch more
Cross-Module Context
When working with tasks, connect the dots to other modules:
Tasks → Weather:
- - When listing today's tasks or the week's schedule, check farmos-weather. Flag conflicts: "You've got spray tasks on the board for Thursday, but rain is coming Thursday afternoon. Might want to move those up."
- For any field operation task (spraying, planting, harvesting, tillage), the weather matters. Check spray conditions for spray tasks, check precipitation forecast for fieldwork.
- Don't check weather for shop tasks, office tasks, or supply runs — only field work.
Tasks → Equipment:
- - When listing tasks, check farmos-equipment for machine availability. If a task requires specific equipment, verify it's not down or due for maintenance: "The sprayer has 3 tasks this week, but it's at 197 hours and service is due at 200. Might want to get that done first."
- When a task is created for a specific machine, check that machine's status. If it's in maintenance or has an open issue, flag it.
- When equipment is reported as down, check for tasks assigned to that machine and offer to flag them as blocked.
Tasks → Observations:
- - When a task relates to a field, check farmos-observations for recent observations on that field. "There's a waterhemp observation from yesterday in field 14 — might be related to the scouting task."
- After a task is created from an observation (e.g., "spray field 14 for waterhemp"), link back to the observation context.
Tasks → Marketing (delivery deadlines):
- - During harvest season, check farmos-marketing delivery schedules. Delivery commitments affect which fields get priority: "You've got a 5,000-bu bean delivery to ADM due next week — priority on the bean fields."
- This only matters during harvest and delivery windows. Don't cross-reference marketing for routine maintenance or spray tasks.
Cross-reference when it adds value. Not every "mark task complete" needs a weather check. Use judgment — the goal is connecting dots the crew might miss, not adding noise to simple operations.
Usage Notes
- - Use integration endpoints for read queries (no auth needed).
- Use authenticated endpoints for creating/updating tasks (manager+ role).
- Priority levels: low, normal, high, critical.
- Always check for overdue tasks in summaries.
- Equipment IDs link to the Equipment module — use farmos-equipment skill to look up names.
- Employee IDs for assignments come from farmos-workforce skill.
- When creating tasks, suggest appropriate priority based on context.
FarmOS 任务管理器
工单与任务管理 — 查看分配、检查状态并管理任务工作流。
使用场景
此技能处理的内容: 任务创建、分配、状态更新、工单、行动项、跟进以及补货/采购请求。
触发短语: 提醒我...、我们需要...、应该有人...、创建一个任务、分配给我的任务有哪些?、有逾期任务吗?、将任务X标记为完成、我们快用完...、用了最后一个...、我们需要更多...
此技能不处理的内容: 设备维护跟踪(使用 farmos-equipment)、排班/休假/可用性(使用 farmos-workforce)、田间观察与巡查报告(使用 farmos-observations)。
最低有效输入: 任何需要完成的工作描述。我们需要对12号地块做点什么就足够了。
API 基础地址
http://100.102.77.110:8007
集成端点(无需认证)
仪表盘摘要
GET /api/integration/dashboard
返回:任务小部件数据 — 按状态统计、优先级分布、近期活动。仅用于摘要统计 — 不用于列出任务。
任务摘要
GET /api/integration/tasks-summary
返回:聚合计数:
json
{
total: 15,
pending: 3,
assigned: 5,
in_progress: 4,
completed: 3,
critical: 1,
high_priority: 2,
overdue: 1
}
任务列表(筛选)
GET /api/integration/tasks?limit=10&status=in_progress&priority=high
查询参数:limit、status(pending|assigned|in_progress|completed|cancelled)、priority(low|normal|high|critical)
返回:简化任务对象,包含 id、title、status、priority、due_date、assignees。
单个任务
GET /api/integration/tasks/{id}
返回:用于集成的完整任务详情。
认证端点
这些端点需要 JWT 认证。请参阅下方的认证部分。
认证
此技能访问受保护的 FarmOS 端点,需要 JWT 令牌。
获取令牌: 使用相应角色运行认证助手:
bash
TOKEN=$(~/clawd/scripts/farmos-auth.sh manager)
使用令牌: 将其作为 Bearer 令牌包含:
bash
curl -H Authorization: Bearer $TOKEN http://100.102.77.110:8007/api/endpoint
令牌过期: 令牌有效期为15分钟。如果收到401响应,请请求新令牌。
角色映射: 在 ~/.clawdbot/farmos-users.json 中检查发送者的角色,以确定使用哪个认证级别。如果用户的角色没有请求数据的权限,告知他们无权访问,而不是尝试使用更高权限的令牌。
我的任务(员工视图)
GET /api/tasks/mine
Authorization: Bearer {token}
返回:分配给已认证用户的任务。
创建任务(经理及以上)
POST /api/tasks
Authorization: Bearer {token}
Content-Type: application/json
请求体:
json
{
title: 喷洒北地块 - 第12区,
description: 根据农艺建议施用芽前除草剂,
priority: high,
due_date: 2026-02-20,
equipment_id: 5,
estimateddurationminutes: 180
}
更新任务状态
POST /api/tasks/{id}/start — 标记为进行中
POST /api/tasks/{id}/complete — 标记为已完成
POST /api/tasks/{id}/cancel — 取消任务
Authorization: Bearer {token}
分配任务(经理及以上)
POST /api/tasks/{id}/assign
Authorization: Bearer {token}
Content-Type: application/json
请求体:
json
{
employee_ids: [3, 4]
}
员工ID来自劳动力模块集成端点。
任务模板
列出模板
GET /api/templates
Authorization: Bearer {token}
从模板创建任务
POST /api/templates/{id}/create-task
Authorization: Bearer {token}
从模板预填创建新任务。
状态工作流
待处理 → 已分配 → 进行中 → 已完成
→ 已取消
- - 任务初始为待处理
- 分配员工后变为已分配
- 工作人员开始后变为进行中
- 工作人员完成后变为已完成
对话式任务创建
机器人应识别出某人描述需要完成的工作,并提供创建任务的选项。切勿静默创建任务 — 始终先提供选项。
从对话中自动检测
当某人描述可操作的工作时,尽可能提取信息:
| 信号 | 检测方式 | 示例 |
|---|
| 分配对象 | 告诉Jake... → Jake。我需要... → 报告人。否则 → 未分配 | 告诉Jake检查排水口 → 分配对象:Jake |
| 优先级 |
尽快/下雨前/现在 → 高。有空时/某个时候 → 低。默认 → 正常 | 我们需要在下雨前喷洒 → 优先级:高 |
|
地块 | 地块编号、地块名称、地标参考 | 14号地块、Byrd农场、电梯旁那块地 |
|
设备 | 机器名称、编号、类型 | 8370R、播种机、2号联合收割机 |
|
截止日期 | 时间引用解析为日期 | 周四前、本周、播种前、月底 |
自然语言示例
| 他们说的话 | 自动检测 |
|---|
| 我们需要在周四前喷洒14号地块 | 地块:14,操作:喷洒,截止日期:周四 |
| 提醒我给种子代表打电话 |
分配对象:报告人,操作:给种子代表打电话 |
| 应该有人检查8号地块的排水口 | 地块:8,操作:检查排水口,未分配 |
| 北边围栏需要在放牛前修好 | 位置:北边围栏,上下文:牛,截止日期:放牛前 |
| Jake需要在开始前给播种机上油 | 分配对象:Jake,设备:播种机,操作:上油 |
| 我们可能应该这个月给联合收割机做保养 | 设备:联合收割机,操作:保养,截止日期:月底,优先级:正常 |
创建前确认(始终执行)
未经确认绝不创建任务。模式:
正在创建:喷洒14号地块 — 截止日期周四,未分配。看起来对吗?
如果他们同意,确认详情并POST。如果他们调整某些内容(实际上设为高优先级),调整后再次确认。
何时不提供任务创建
- - 消息明显只是对话,不可操作(天哪,那块地看起来真糟糕)
- 某人在提问,而不是请求工作(14号地块上次喷洒是什么时候?)
- 工作正在进行中(我正在喷洒14号地块)
- 这是状态更新,不是新请求(14号地块已完成)
指导原则
- - 要我把它变成一个任务吗? 当听起来像工作时,这是合适的提示
- 如果模糊,用已有的信息创建任务 — 模糊的任务总比没有任务好
- 对于重复性需求(我们总是在Y之前需要做X),提及模板:要我为此创建一个模板,以便下次自动生成吗?
- 创建后,提供相关操作:要我分配某人吗? 需要设置提醒吗?
零件与耗材录入
任何关于供应水平的提及都应视为可操作。机器人会捕获否则会丢失的供应情报。
检测模式
| 他们说的话 | 操作 | 优先级 |
|---|
| 我们快用完液压滤芯了 | 提供补货任务(标签:采购) | 正常 |
| 用了最后一盒种子处理剂 |
创建补货任务(标签:采购) | 高 — 最后一个是紧急的 |
| 我们完成前还需要更多麻绳 | 提供补货任务(标签:采购) | 正常 |
| 播种机只剩2个液压滤芯了 | 提供带数量上下文的补货任务 | 正常 |
| 我订了5加仑农达 | 确认 — 无需任务(已订购) | — |
| 润滑脂筒放在哪里? | 回答问题 — 无需任务 | — |
| 我们DEF用完了 | 创建补货任务(标签:采购) | 高 — 完全用完 |
响应模式
- - 供应不足: 知道了 — 已记录。要我创建补货任务还是只给Brian标记一下?
- 最后一个/完全用完: 已记录 — 听起来很紧急。正在创建补货任务。(仍需确认,但提示