Agent Builder

Create agent definition

Creates a new Agent Builder definition as an organization-scoped database-only write and returns safe definition metadata.

POSTNeeds publication reviewLocal writeAgent BuilderoperationId: createAgentBuilderDefinitionhttps://dev-api.quickintell.com/api/v1/agent-builder/definitions
Needs publication reviewLocal writeAgent Builder and Prevention

Route status

Needs publication review

The endpoint contract is visible, but QuickRCM has not approved it yet for normal production API use.

Publication status

Needs publication review

Requires product, security/compliance, tenancy, side-effect, or module-owner approval before production public API use. Also requires E2 side-effect policy before production recipes, SDK inclusion, or try-out access.

Authentication

Bearer API key declared

OpenAPI declares bearer API-key security for this operation.

Tenant context

API-key organization

API-key organization context is authoritative; request organizationId is not a public tenant selector.

Side-effect summary

Local write

May mutate QuickRCM records. It does not prove live payer, EHR, clearinghouse, payment, or communication execution.

Source artifact

docs/openapi/openapi.json

OpenAPI 3.1.0; API 1.0.0.

When to use this endpoint

Use this page as an internal baseline for the agent builder and prevention contract generated for POST /api/v1/agent-builder/definitions. External use still depends on route classification, release evidence, and endpoint-specific side-effect approval.

What this does now

Shows the generated OpenAPI shape for POST /api/v1/agent-builder/definitions, but keeps the route out of ordinary production API positioning until review is complete.

What this does not do

Does not prove external GA readiness, SDK readiness, live production execution, or complete module behavior. Mutating behavior still needs side-effect and retry evidence.

Not public from this page

Do not publish this endpoint as an ordinary developer API until its unresolved decisions are closed.

Headers and tenancy

Current headers and tenant authority. Target headers stay labeled as future until OpenAPI and release evidence declare them.

HeaderRequiredCurrent statusNotes
AuthorizationYesCurrentBearer <QUICKRCM_API_KEY>. OpenAPI security: bearerAuth.
Idempotency-KeyNoTarget/futureDo not claim universal header support until E3 and OpenAPI metadata exist.
X-Request-IdNoTarget/futureUse for support correlation only after approved; not declared as a standard OpenAPI header today.

Required scopes

Unclassified until E6 route metadata exists; do not infer scopes from route names.

Wrong-org behavior

Tenant-safe 404, empty list, or 403 is endpoint-specific and remains an evidence gap until E1 is closed.

Actor and audit

No public actor, audit, or correlation contract is published from OpenAPI alone.

Idempotency and retries

Retry behavior is documented conservatively because universal idempotency headers are not declared.

TopicStatusGuidance
Current idempotencyNo idempotency mechanism is declared.Do not retry blindly. Check resource, status, batch, or job state before repeating the request.
Universal headerNot declaredDo not document universal Idempotency-Key support until OpenAPI and E3 evidence declare it.
Conflict behaviorUnresolvedSame-key changed-payload, in-flight retry, fingerprint scope, and TTL behavior remain endpoint-specific evidence gaps.

Async jobs and polling

Queued work is accepted work, not proof of completed workflow execution.

TopicStatusGuidance
Immediate responseNo 202 response declaredOpenAPI does not declare HTTP 202 for this operation.
Polling and terminal statesNot indicated by OpenAPINo generic polling contract is published from this page.
Later side effectsNot provenDo not infer background execution beyond the documented response.

Files and artifacts

File-like routes need content-class, ownership, scanning, retention, and URL policy evidence before public recipes.

TopicStatusGuidance
Content classNo file/artifact class inferredOpenAPI text does not indicate file or artifact handling for this endpoint.
Ownership and storage keysNot applicable unless a file field is presentTenant ownership must be proven before retrieval or upload docs. Never expose storage keys as public identifiers.
URLs, scanning, and retentionUnresolved unless endpoint-specific evidence existsShort-lived URLs, MIME limits, checksums, scanner status, retention, expiration, and legal hold behavior are not implied by OpenAPI examples.

Publication warnings

  • This endpoint needs explicit product, security/compliance, tenancy, or side-effect approval before publication.
  • Universal Idempotency-Key header support is not declared; retry only after checking endpoint-specific state.

Evidence

EvidenceStatusCaveat
OpenAPI artifactdocs/openapi/openapi.json; OpenAPI 3.1.0; API 1.0.0.Generated baseline contract only.
Route registryNeeds publication review from documentation classification overlay.E6 route registry evidence is still required before external publication.
Example validationGenerated examples are internal baseline aids.No external publication claim; examples must pass no-PHI/no-secret/no-raw-payload/no-storage-key checks.
Last reviewedImplementation run 20260619T-docs-impl; source boardroom packet 20260619T064820Z.Refresh this evidence for release workspaces.
Release evidenceE9 required.No SDK readiness, production readiness, or expanded external docs claim from this endpoint page.

Agent Builder public API.

Agent Builder public API endpoints let an authenticated tenant integration manage visual robotic process automation (RPA) agent definitions, schedules, safe execution wrapper records, credential discovery metadata, and reusable templates. These endpoints are intentionally conservative: definition and schedule responses return safe metadata, template responses omit step bodies, credential responses omit stored usernames and secrets, and execution create/retry responses expose `dryRun`, `queueOnly`, and `browserAutomationStarted` safety controls instead of starting browser automation inline. Use these endpoints to configure and monitor organization-scoped automation around payer, electronic health record (EHR), clearinghouse, government, lab, pharmacy, registry, or custom portals. Do not send real protected health information (PHI), raw portal payloads, credentials, electronic data interchange (EDI) files, transcripts, or storage keys in examples or logs. Treat `inputParams`, `steps`, extraction schemas, schedule secrets, and execution output as sensitive workflow configuration. Public read endpoints require Agent Builder read access; public write endpoints require the relevant Agent Builder automation write/admin permission, role-based access control (RBAC), and organization ownership checks.

What this endpoint does

Use case
Use this when an external implementation tool is ready to register a visual RPA workflow definition before schedules or executions are created.
Before calling
Prepare a non-PHI agent name, target application metadata, and at least one step. If using `defaultCredentialId`, resolve it from the same organization first.

Request and response behavior

Request guidance
Send structured step definitions and extraction/transformation configuration only. Keep portal credentials out of `description`, `tags`, `steps`, and `inputVariables`; reference credentials by ID instead.
  • `steps` must contain 1 to 200 step objects with supported `type` values and non-empty `instruction` strings.
  • `description` is optional and capped at 5000 characters; `icon` is optional and capped at 100 characters.
  • `tags` accepts up to 50 non-empty strings, each up to 100 characters.
  • Default create values include `category: CUSTOM`, `applicationType: CUSTOM`, `mode: READ`, `requiresApproval: false`, `creditCost: 5`, `tokenBudget: 30000`, `timeoutSeconds: 300`, and `maxRetries: 3`.
Response semantics
A 201 response creates a `DRAFT` definition and returns `SAFE_WRITE_DB_ONLY` metadata. It does not run the agent and does not return the submitted step body.
  • `data.mode` is `SAFE_WRITE_DB_ONLY`.
  • The response includes the generated `slug`, lifecycle `status`, and runtime-control metadata, but not the raw step list.

Errors and retries

Fix 400 validation failures before retrying. A 409 means the generated slug conflicts with an existing definition name in the organization. After a timeout, list definitions before creating another copy.
  • 400 can indicate an invalid credential reference, inactive or locked credential, malformed step, or validation range failure.
  • 409 means the name-derived slug is already used by another definition in the authenticated organization.

Template boundary before examples

The route class, authentication state, tenancy rule, side-effect mode, idempotency status, async behavior, file policy, warnings, links, and evidence above are part of the endpoint contract. Treat generated examples below as internal baseline aids until release evidence closes.

Path parameters

This endpoint does not define path parameters.

Query parameters

This endpoint does not define query parameters.

OpenAPI-declared header parameters

Standard platform header guidance appears in the governance panel. This table only lists operation-specific headers declared in OpenAPI.

This endpoint does not define operation-specific header parameters.

Request body

JSON fields from the generated OpenAPI schema with pilot enrichment applied where available. Nested object fields are shown with dotted paths.

NameLocationRequiredTypeDescriptionValidation and safety notes
namebodyYesstringRequired human-readable definition name, 1-200 characters; used to generate a tenant-scoped slug.Minimum length: 1. Maximum length: 200. Tenant context is selected by the API key; do not treat this as a public tenant selector.
descriptionbodyNostringOptional definition description, up to 5000 characters. Keep it operational and free of PHI or secrets.Maximum length: 5000. Sensitive credential or storage-adjacent value; use placeholders only.
iconbodyNostringOptional short icon identifier or display token, up to 100 characters.Maximum length: 100. Sensitive credential or storage-adjacent value; use placeholders only.
categorybodyNoELIGIBILITY | CLAIMS | PAYMENTS | ENROLLMENT | PRIOR_AUTH | DENIAL | REPORTING | PATIENT | PROVIDER | BILLING | CUSTOMOptional RCM category; defaults to `CUSTOM`.Enum values are declared in the Type column. Default: CUSTOM.
tagsbodyNostring[]Optional metadata labels, up to 50 entries, for filtering and UI grouping.Default: .
applicationUrlbodyYesstringRequired target portal or application URL, up to 2048 characters. Do not include session tokens or signed URLs.Minimum length: 1. Maximum length: 2048. Sensitive credential or storage-adjacent value; use placeholders only.
applicationNamebodyYesstringRequired display name of the target application or portal, up to 200 characters.Minimum length: 1. Maximum length: 200.
applicationTypebodyNoEHR | PAYER_PORTAL | CLEARINGHOUSE | GOVERNMENT | LAB | PHARMACY | REGISTRY | CUSTOMOptional target application class; defaults to `CUSTOM`.Enum values are declared in the Type column. Default: CUSTOM.
modebodyNoREAD | WRITE | READ_WRITEOptional execution intent: `READ`, `WRITE`, or `READ_WRITE`; defaults to `READ`.Enum values are declared in the Type column. Default: READ.
stepsbodyYesobject[]Required ordered visual RPA step definitions. Treat as sensitive automation source.OpenAPI does not declare additional validation metadata.
steps[].typebodyYesNAVIGATE | ACT | EXTRACT | OBSERVE | WAIT | CONDITION | LOOP | APPROVAL_GATE | SUB_AGENTSupported step vocabulary: `NAVIGATE`, `ACT`, `EXTRACT`, `OBSERVE`, `WAIT`, `CONDITION`, `LOOP`, `APPROVAL_GATE`, or `SUB_AGENT`.Enum values are declared in the Type column.
steps[].instructionbodyYesstringRequired natural-language instruction for the step, 1-4000 characters. Avoid PHI, credentials, and raw portal payloads.Minimum length: 1. Maximum length: 4000. Sensitive credential or storage-adjacent value; use placeholders only.
extractionSchemabodyNoobjectOptional JSON object describing extracted fields; keep it narrow and PHI-minimal.OpenAPI does not declare additional validation metadata.
transformationMapbodyNoobjectOptional JSON object for mapping extracted values into QuickRCM structures.OpenAPI does not declare additional validation metadata.
inputVariablesbodyNoobject[]Optional declared runtime variables used by step instructions, up to 100 entries.OpenAPI does not declare additional validation metadata.
inputVariables[].namebodyYesstringRequired runtime variable name, 1-100 characters.Minimum length: 1. Maximum length: 100.
inputVariables[].typebodyNostring | number | boolean | date | selectOptional runtime variable type: `string`, `number`, `boolean`, `date`, or `select`.Enum values are declared in the Type column.
inputVariables[].requiredbodyNobooleanOptional boolean that marks whether execution callers must supply the variable.OpenAPI does not declare additional validation metadata.
defaultCredentialIdbodyNostringOptional automation credential ID owned by the same organization; credential secrets are never sent in this request.Minimum length: 1. Sensitive credential or storage-adjacent value; use placeholders only.
requiresApprovalbodyNobooleanOptional boolean approval gate for write-capable or sensitive workflow definitions; defaults to false.Default: false.
creditCostbodyNointegerOptional configured credit cost, 0-10000; defaults to 5.Minimum value: 0. Maximum value: 10000. Default: 5. File, artifact, or raw-payload adjacent; keep examples metadata-only.
tokenBudgetbodyNointegerOptional maximum LLM token budget, 1000-500000; defaults to 30000.Minimum value: 1000. Maximum value: 500000. Default: 30000. Sensitive credential or storage-adjacent value; use placeholders only.
timeoutSecondsbodyNointegerOptional maximum execution duration, 30-7200 seconds; defaults to 300.Minimum value: 30. Maximum value: 7200. Default: 300.
maxRetriesbodyNointegerOptional maximum retry count, 0-10; defaults to 3.Minimum value: 0. Maximum value: 10. Default: 3.

Generated request example

Generated examples are baseline contract aids only. They are not external publication evidence and must not include real PHI, credentials, raw vendor payloads, raw EDI, transcripts, storage keys, or signed URLs.

{
  "name": "Example agent_builder_definition",
  "applicationUrl": "https://example.quickintell.com/resource",
  "applicationName": "Example agent_builder_definition",
  "steps": [
    {
      "type": "NAVIGATE",
      "instruction": "example-instruction"
    }
  ],
  "description": "Example agent_builder_definition note",
  "icon": "example-icon",
  "category": "CUSTOM",
  "tags": [],
  "applicationType": "CUSTOM",
  "mode": "READ",
  "extractionSchema": {},
  "transformationMap": {}
}

Successful responses

Generated response examples show the baseline OpenAPI contract. Tenant identifier echo, PHI redaction, pagination, money, date/time, and enum semantics remain endpoint-specific publication checks.

201
Agent definition created for the authenticated organization.
Generated from the OpenAPI response schema.
{
  "success": true,
  "data": {
    "mode": "SAFE_WRITE_DB_ONLY",
    "agentDefinition": {
      "id": "00000000-0000-4000-8000-000000000001",
      "organizationId": "00000000-0000-4000-8000-000000000001",
      "name": "Example agent_builder_definition",
      "slug": "example-slug",
      "description": "Example agent_builder_definition note",
      "category": "ELIGIBILITY",
      "applicationUrl": "https://example.quickintell.com/resource",
      "applicationName": "Example agent_builder_definition",
      "applicationType": "EHR",
      "mode": "READ",
      "status": "DRAFT",
      "version": 1,
      "requiresApproval": true,
      "creditCost": 1,
      "tokenBudget": 1,
      "timeoutSeconds": 1,
      "maxRetries": 1,
      "createdAt": "2026-06-08T10:15:30Z",
      "updatedAt": "2026-06-08T10:15:30Z"
    }
  },
  "meta": {
    "organizationId": "00000000-0000-4000-8000-000000000001"
  }
}

Error responses

Errors must remain sanitized. Do not include raw payer, EHR, SFTP, SMTP, Stripe, LLM/OCR, browser automation, file, transcript, EDI, worker, or vendor payloads.

400
Invalid request.
Handle this response as normal integration control flow.
{
  "error": "Request validation failed",
  "statusCode": 400
}
401
Authentication required or invalid credentials.
Handle this response as normal integration control flow.
{
  "error": "Authentication required",
  "statusCode": 401
}
403
The requested organization does not match the authenticated caller or RBAC denies the action.
Handle this response as normal integration control flow.
{
  "error": "Forbidden",
  "statusCode": 403
}
404
Requested agent-builder resource was not found in the authenticated organization.
Handle this response as normal integration control flow.
{
  "error": "Resource not found",
  "statusCode": 404
}
409
Conflicting agent-builder resource already exists.
Handle this response as normal integration control flow.
{
  "error": "Resource conflict",
  "statusCode": 409
}
429
API key rate limit exceeded.
Handle this response as normal integration control flow.
{
  "error": "Rate limit exceeded",
  "statusCode": 429
}
500
Internal server error.
Handle this response as normal integration control flow.
{
  "error": "Internal server error",
  "statusCode": 500
}

Adjacent endpoints

Nearby generated endpoints in the same OpenAPI tag. Route class and side-effect labels still apply per endpoint.