Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 52 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**Official TypeScript SDK for the AXME platform.** Send and manage intents, observe lifecycle events, handle approvals, and access the enterprise admin surface — fully typed, Promise-based, works in Node.js and edge runtimes.

> **Alpha** · API surface is stabilizing. Not recommended for production workloads yet.
> Alpha access: https://cloud.axme.ai/alpha · Contact and suggestions: [hello@axme.ai](mailto:hello@axme.ai)
> **Alpha** — install CLI, log in, run your first example in under 5 minutes. [Quick Start](https://cloud.axme.ai/alpha/cli) · [hello@axme.ai](mailto:hello@axme.ai)

---

Expand Down Expand Up @@ -164,7 +164,56 @@ for await (const event of client.observe(intent.intent_id)) {

---

## Approvals
## Human-in-the-Loop (8 Task Types)

AXME supports 8 human task types. Each pauses the workflow and notifies a human via email with a link to a web task page.

| Task type | Use case | Default outcomes |
|-----------|----------|-----------------|
| `approval` | Approve or reject a request | approved, rejected |
| `confirmation` | Confirm a real-world action completed | confirmed, denied |
| `review` | Review content with multiple outcomes | approved, changes_requested, rejected |
| `assignment` | Assign work to a person or team | assigned, declined |
| `form` | Collect structured data via form fields | submitted |
| `clarification` | Request clarification (comment required) | provided, declined |
| `manual_action` | Physical task completion (evidence required) | completed, failed |
| `override` | Override a policy gate (comment required) | override_approved, rejected |

```typescript
// Create an intent with a human task step
const result = await client.createIntent({
intentType: "intent.budget.approval.v1",
toAgent: "agent://agent_core",
payload: { amount: 32000, department: "engineering" },
humanTask: {
title: "Approve Q3 budget",
description: "Review and approve the Q3 infrastructure budget.",
taskType: "approval",
notifyEmail: "approver@example.com",
allowedOutcomes: ["approved", "rejected"],
},
});
```

Task types with forms use `form_schema` to define required fields:

```typescript
humanTask: {
title: "Assign incident commander",
taskType: "assignment",
notifyEmail: "oncall@example.com",
formSchema: {
type: "object",
required: ["assignee"],
properties: {
assignee: { type: "string", title: "Commander name" },
priority: { type: "string", enum: ["P1", "P2", "P3"] },
},
},
},
```

### Programmatic approvals (inbox API)

```typescript
// Fetch and approve pending items
Expand Down Expand Up @@ -270,6 +319,6 @@ npm test
## Contributing & Contact

- Bug reports and feature requests: open an issue in this repository
- Alpha access: https://cloud.axme.ai/alpha · Contact and suggestions: [hello@axme.ai](mailto:hello@axme.ai)
- Quick Start: https://cloud.axme.ai/alpha/cli · Contact: [hello@axme.ai](mailto:hello@axme.ai)
- Security disclosures: see [SECURITY.md](SECURITY.md)
- Contribution guidelines: [CONTRIBUTING.md](CONTRIBUTING.md)
Loading