Agents

Create an agent

An agent keeps working for your project after the chat: on a trigger (a new document in a collection, a finished call, a closed chat conversation, or a schedule of at least every 15 minutes) it follows your instructions with a small set of actions on Hypamoon: read or update a document, email the owner, send an SMS, start a call, send a webhook to one of your own endpoints. Default deny: an action that is not turned on is refused. SMS and calls go only to the phone number of the event (trigger.phone_field of the document, the other side of the call, or the customer of the chat), at most once per number per day, never to the project's own numbers; they wait for the owner's approval, and always do so when the trigger can come from a stranger (a public form, a call, a chat). In test mode they are simulated; in live mode they need a verified project. Limits: runs per day (default 20) and actions per run (default 3). At most 10 agents per project. Every run is logged with its trigger, a short thought, each action and the model cost. The key needs the scope of every action it turns on (calls:write for start_call, messages:write for send_sms, data:write for update_document, webhooks:write for send_webhook) and of the trigger.

post/agents

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/agents
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.hypamoon.com/oauth/authorize, token URL https://api.hypamoon.com/oauth/token, scopes: project:write)

Request body

namestring required

A short name, like New contact request follow-up.

instructionsstring required

What the agent should do, in plain language, like: Send the owner a short summary of every new contact request and propose a call back.

status'active' | 'paused'

active (default) or paused.

Response

The new agent.

idstring uuid required
namestring required
instructionsstring required
triggerobject required
actionsobject required
status'active' | 'paused' required
mode'live' | 'test' required
next_run_atstring nullable required
pending_approvalsinteger required
created_bystring nullable required

The key (key:<id>) or connected app (oauth:<id>) that created the agent.

created_atstring required
updated_atstring required

Changes

No recorded changes to this operation across all 1 revision of this API.