Skip to content

Commit fca5c89

Browse files
George-iamclaude
andauthored
docs: add human-in-the-loop section with 8 task types (#23)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 72e272e commit fca5c89

1 file changed

Lines changed: 50 additions & 1 deletion

File tree

README.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,56 @@ while (page.get("cursor") != null) {
179179

180180
---
181181

182-
## Approvals
182+
## Human-in-the-Loop (8 Task Types)
183+
184+
AXME supports 8 human task types. Each pauses the workflow and notifies a human via email with a link to a web task page.
185+
186+
| Task type | Use case | Default outcomes |
187+
|-----------|----------|-----------------|
188+
| `approval` | Approve or reject a request | approved, rejected |
189+
| `confirmation` | Confirm a real-world action completed | confirmed, denied |
190+
| `review` | Review content with multiple outcomes | approved, changes_requested, rejected |
191+
| `assignment` | Assign work to a person or team | assigned, declined |
192+
| `form` | Collect structured data via form fields | submitted |
193+
| `clarification` | Request clarification (comment required) | provided, declined |
194+
| `manual_action` | Physical task completion (evidence required) | completed, failed |
195+
| `override` | Override a policy gate (comment required) | override_approved, rejected |
196+
197+
```java
198+
// Create an intent with a human task step
199+
var result = client.createIntent(CreateIntentParams.builder()
200+
.intentType("intent.budget.approval.v1")
201+
.toAgent("agent://agent_core")
202+
.payload(Map.of("amount", 32000, "department", "engineering"))
203+
.humanTask(HumanTask.builder()
204+
.title("Approve Q3 budget")
205+
.description("Review and approve the Q3 infrastructure budget.")
206+
.taskType("approval")
207+
.notifyEmail("approver@example.com")
208+
.allowedOutcomes(List.of("approved", "rejected"))
209+
.build())
210+
.build());
211+
```
212+
213+
Task types with forms use `form_schema` to define required fields:
214+
215+
```java
216+
HumanTask.builder()
217+
.title("Assign incident commander")
218+
.taskType("assignment")
219+
.notifyEmail("oncall@example.com")
220+
.formSchema(Map.of(
221+
"type", "object",
222+
"required", List.of("assignee"),
223+
"properties", Map.of(
224+
"assignee", Map.of("type", "string", "title", "Commander name"),
225+
"priority", Map.of("type", "string", "enum", List.of("P1", "P2", "P3"))
226+
)
227+
))
228+
.build()
229+
```
230+
231+
### Programmatic approvals (inbox API)
183232

184233
```java
185234
Map<String, Object> inbox = client.listInbox("agent://manager", RequestOptions.none());

0 commit comments

Comments
 (0)