canonical: https://jentic.com/apis/human4ai.ai/human4ai

# Human4AI API

The Human4AI API records the corrections a support team makes to AI-drafted customer replies and turns them into tested, scoped experiences that a support agent can reuse. Each correction stores the context, the original reply, the corrected reply, the reason, and a category; an experience built from it carries a condition, an action, and a boundary, and collects positive and boundary test evidence against a specific revision. Only the workspace owner can activate or archive an experience, and the export call returns active knowledge (up to 1000 rules) for loading into a support agent. A separate public area lists synthetic example cases and owner-published feedback on them.

## For AI agents

Record corrections to AI support replies, draft experiences with a condition, action, and boundary, log test evidence against a revision, and export the workspace's active support knowledge.

## Scope

Does not send customer replies, manage support tickets or inboxes, or run the support agent itself. Use for recording reply corrections and curating tested support experiences only.

## Capabilities

- Record a correction with the context, original reply, corrected reply, reason, and category, attributed to the agent key that sent it
- Draft an unverified experience from a correction with a condition, action, and boundary
- Edit a draft experience with an optimistic revision check, which invalidates earlier test evidence
- Log positive and boundary test observations with expected and actual output and a pass or fail verdict
- Export the workspace's active experiences, up to 1000 rules, for a support agent to load
- Search the public synthetic case directory and submit discussion, test, or reuse feedback on a case

## Use cases

### Support agent that learns from corrections through Jentic

A developer's support agent logs every reply a human corrects as a Human4AI correction, then drafts a candidate experience from it, both through Jentic. The agent key is injected by the developer's own Jentic One instance, and activation stays with the workspace owner's browser session, so the agent can propose and test knowledge without being able to switch it on.

Example prompt: Call POST `/api/v1/cases` with title 'Refund window wording', context, original, corrected, reason, and category refunds, then call POST `/api/v1/rules` with the returned correctionId, a title, a condition, an action, and a boundary

### Test an experience before owner review

Before an experience is activated, collect evidence that it behaves as intended. The agent records a positive test and a boundary test against the current revision, each with input, expected, actual, a pass or fail verdict, and a note. The owner-only activation call requires current human positive and boundary passes and no failed evidence, so agent evidence informs the decision without replacing it.

Example prompt: Call GET `/api/v1/rules/{id}` to read the current revision, then POST `/api/v1/rules/{id}/tests` twice with that revision: once with kind positive and once with kind boundary, each with input, expected, actual, verdict, and note

### Load active support knowledge into an agent

Refresh a support agent's working knowledge from what the team has approved. The export call returns the workspace's active experiences, up to 1000 rules, and the spec notes that the export does not grant any external action permissions, so the content is reference material for the agent, not instructions to act on.

Example prompt: Call GET `/api/v1/export` and load each returned experience's condition, action, and boundary into the support agent's reference notes

### Learn from public synthetic cases

Browse the anonymous public directory of synthetic support cases to see how other corrections were turned into experiences. The public case search matches Chinese or English titles and summaries, each case has a feedback thread, and a feedback or write key can submit discussion, test, or reuse feedback that starts as pending until the owner reviews it.

Example prompt: Call GET `/api/public/cases` with q refund, open the first result with GET `/api/public/cases/{slug}`, then submit POST `/api/v1/feedback` with that caseSlug, kind test, a message, and an outcome

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/api/v1/cases` | Record a correction |
| GET | `/api/v1/cases` | List corrections |
| POST | `/api/v1/rules` | Create an unverified candidate experience |
| PATCH | `/api/v1/rules/{id}` | Edit a draft with a revision check |
| POST | `/api/v1/rules/{id}/tests` | Record test observations for a revision |
| GET | `/api/v1/export` | Export active knowledge |
| POST | `/api/v1/rules/{id}/activate` | Owner-only activation |
| GET | `/api/public/cases` | Search the public synthetic case directory |

## Key resources

- **Corrections (cases)** — Original and corrected AI replies with context, reason, and category
- **Experiences (rules)** — Scoped knowledge with condition, action, boundary, status, and revision
- **Test evidence** — Positive and boundary observations with expected, actual, and verdict per revision
- **Public cases and feedback** — Anonymous synthetic cases and pending or published feedback on them
- **Owner keys** — Read, write, or feedback agent keys created and revoked from the owner session

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 62 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 99 / 100
  - Developer Experience & Jentic Compatibility: 69 / 100
  - AI-Readiness & Agent Experience: 41 / 100
  - Agent Usability: 94 / 100
  - Security: 55 / 100
  - AI Discoverability: 55 / 100
- **View full report:** https://jentic.com/apis/human4ai.ai/human4ai/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the Human4AI API by hand means keeping two credentials apart, an Agent bearer key for agent calls and the owner session cookie for activation and key management, sending an Idempotency-Key on writes, and following opaque list cursors. Through Jentic you install once, import Human4AI from the API Directory, store the Agent key once, and your agent calls it.
- **Permission scoping:** Human4AI puts the experience id in the URL path (`/api/v1/rules/{id}/...`), so a rule can pin your agent to testing or editing one experience. You choose the operations it may call, so feedback submission and draft edits are not included unless you add them.
- **Credential handling:** Your Human4AI Agent key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'record a reply correction' or 'export support knowledge', and Jentic returns the matching Human4AI operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Zendesk API** — Help desk tickets and replies where corrected answers originate
- **Intercom API** — Customer conversations and help center content
- **Freshdesk API** — Ticketing and canned responses for support teams

## FAQ

### What authentication does the Human4AI API use?

The spec declares two schemes. Agent calls use a bearer token, an owner-issued Agent key in the form h4a_agent_ followed by random characters, with read, write, or feedback scope. Owner-only operations such as activating an experience, publishing feedback, and managing keys use the owner browser session, an apiKey-type cookie named `__Host-h4a`. The health check, workspace creation, recovery-key restore, and the public case endpoints need no credential. Through Jentic you store the Agent key, encrypted by your own Jentic One instance; the spec says never to give recovery keys to agents.

### Can my agent activate an experience with the Human4AI API?

No. POST `/api/v1/rules/{id}/activate` is marked owner only and needs the owner session, and the spec states that no Agent key permits publication, activation, or key management. An agent can create candidates, edit drafts, and record test evidence; activation also requires current human positive and boundary passes and no failed evidence.

### What are the rate limits for the Human4AI API?

The spec states a limit of 60 writes per workspace per minute and a payload limit of 32KB. It does not state a read limit; check https://human4ai.ai for current details.

### How do I record a correction with the Human4AI API through Jentic?

Search Jentic for 'record a support reply correction' to get POST `/api/v1/cases`, then send the required title, context, original, corrected, reason, and category, with an Idempotency-Key header so a retry does not create a duplicate. To run it on your own infrastructure, install Jentic One from its GitHub repo and store your Agent key once.

### Is there a Human4AI MCP server?

You don't need an MCP server to give your agent Human4AI. Jentic connects it directly from the API Directory: import it, store your Agent key once, and your agent calls the operations you allow, discovered on demand rather than loaded into its context up front.

### Can I limit what my agent is allowed to do with the Human4AI API?

Yes. For example, allow only POST `/api/v1/cases` and POST `/api/v1/rules/{id}/tests`, so the agent can log corrections and record test evidence but cannot edit experience drafts or read the export. Human4AI's own key scopes add a second layer: the spec says a feedback-scope key only reaches public feedback operations, never private cases. Every call the agent makes is logged by your Jentic One instance.
