Overview
The FirstHelm API is a JSON API. All requests and responses use JSON. The base URL is https://firsthelm.dev/functions. Each endpoint is a function path under that base (for example, https://firsthelm.dev/functions/logActivity). Responses return standard HTTP status codes; errors use the schema documented below.
| Attribute | Value |
|---|---|
| Base URL | https://firsthelm.dev/functions |
| Format | JSON (UTF-8) |
| Auth | API key — Authorization: Bearer <key> |
| Rate limit | 60 requests / minute per key (HTTP 429 when exceeded) |
Authentication
Authenticate every request with an API key in the Authorization header. Keys are issued in Settings → API. Never expose a key in client-side code.
bashcurl https://firsthelm.dev/functions/registerAgent \ -H "Authorization: Bearer hm_live_8f2c..."
Register an agent
/registerAgentRegister a new agent on the platform.
Request body
| Field | Type | Required |
|---|---|---|
| name | string | yes |
| framework | enum | yes |
| type | enum | no |
| description | string | no |
| endpoint_url | string | no |
| capabilities | string[] | no |
| autonomy_level | number | no |
| status | enum | no |
Example request
bashcurl -X POST https://firsthelm.dev/functions/registerAgent \ -H "Authorization: Bearer hm_live_..." \ -H "Content-Type: application/json" \ -d '{"name":"Scout","framework":"langchain","endpoint_url":"https://my-runner/agents/scout"}'
Example response
json{ "status": "ok", "agent": { "id": "agt_01HX...", "name": "Scout", "framework": "langchain", "status": "idle", "autonomy_level": 0 } }
Log an activity
/logActivityLog an agent action. Pair with /evaluateConstraint to check guardrails against the action.
Request body
| Field | Type | Required |
|---|---|---|
| agent_id | string | yes |
| action_type | enum | yes |
| description | string | yes |
| risk_level | enum | no |
| cost_cents | number | no |
| tokens_used | number | no |
| payload | object | no |
Example request
bashcurl -X POST https://firsthelm.dev/functions/logActivity \ -H "Authorization: Bearer hm_live_..." \ -H "Content-Type: application/json" \ -d '{"agent_id":"agt_01HX...","action_type":"tool_call","description":"Called send_email API","risk_level":"high","cost_cents":12,"tokens_used":840}'
Example response
json{ "status": "ok", "activity": { "id": "act_01HX...", "action_type": "tool_call", "risk_level": "high" } }
Request an approval
/requestApprovalRequest human approval for a proposed action. The request lands in the Approvals queue.
Request body
| Field | Type | Required |
|---|---|---|
| agent_id | string | yes |
| action | string | yes |
| description | string | no |
| risk_level | enum | no |
| timeout_minutes | number | no |
| proposed_payload | object | no |
Example request
bashcurl -X POST https://firsthelm.dev/functions/requestApproval \ -H "Authorization: Bearer hm_live_..." \ -H "Content-Type: application/json" \ -d '{"agent_id":"agt_01HX...","action":"deploy_to_prod","risk_level":"critical","timeout_minutes":30,"proposed_payload":{"service":"billing"}}'
Example response
json{ "status": "ok", "approval": { "id": "apr_01HX...", "status": "pending", "timeout_minutes": 30 } }
Decide an approval
/processApprovalApprove, reject, approve-with-edits, or defer a pending approval.
Request body
| Field | Type | Required |
|---|---|---|
| approval_id | string | yes |
| decision | string — approve|reject|edit_approve|defer | yes |
| reason | string | no |
| edited_payload | string (JSON) — for edit_approve | no |
| defer_minutes | number — for defer | no |
| decided_by | string | no |
Example request
bashcurl -X POST https://firsthelm.dev/functions/processApproval \ -H "Authorization: Bearer hm_live_..." \ -H "Content-Type: application/json" \ -d '{"approval_id":"apr_01HX...","decision":"approved","reason":"LGTM"}'
Example response
json{ "status": "ok", "approval": { "id": "apr_01HX...", "status": "approved", "decided_by": "operator@acme.com" } }
Evaluate constraints
/evaluateConstraintEvaluate enabled constraints against a proposed action. Returns pass, violate, or needs_approval.
Request body
| Field | Type | Required |
|---|---|---|
| constraint_id | string — evaluate one constraint | no |
| agent_id | string | no |
| action_type | string | no |
| action_description | string | no |
| estimated_cost_cents | number | no |
Example request
bashcurl -X POST https://firsthelm.dev/functions/evaluateConstraint \ -H "Authorization: Bearer hm_live_..." \ -H "Content-Type: application/json" \ -d '{"agent_id":"agt_01HX...","action_type":"tool_call","action_description":"send_bulk_email","estimated_cost_cents":1200}'
Example response
json{ "result": "pass", "violations": 0, "constraints_evaluated": 4 }
pass, violate (one or more blocking constraints breached), or needs_approval (an approval gate applies).In-app management
These operations are managed in the FirstHelm dashboard rather than over the API:
| Operation | Where |
|---|---|
| List, view, pause, and resume agents | Agents page |
| List the pending approval queue | Approvals page |
| Create and list missions | Missions page |
| Pause, resume, redirect, or kill an agent | Activity Log or agent detail |
| Export the audit trail | Settings → Compliance → Audit export |
Webhooks
Subscribe to platform events. Configure endpoint URLs in Settings → Connections.
| Event | When it fires | Payload |
|---|---|---|
| approval.requested | An agent action requires human sign-off | { approval_id, agent_id, action, risk_level, timeout_minutes } |
| agent.status.changed | An agent transitions status | { agent_id, from, to, reason } |
| constraint.violated | A constraint is breached | { constraint_id, agent_id, activity_id, severity } |
Errors
| Status | Meaning |
|---|---|
| 400 | Bad request — malformed or missing required fields |
| 401 | Unauthorized — missing, invalid, or revoked API key |
| 404 | Not found — the referenced resource does not exist |
| 429 | Rate limit exceeded — 60 requests/minute per key; retry shortly |
| 500 | Server error — retry with backoff; contact support if persistent |
json{ "error": "Rate limit exceeded. Try again shortly." }
For API questions, integration help, or to report an issue, email support@firsthelm.dev.