Create an agent

Changed on

Create an agent in the environment. Only name and instructions are required — cadence defaults to manual, which runs only when triggered via POST /agents/{id}/runs. Scheduled cadences require their time fields: minute for hourly, plus hour for daily/weekdays, plus day_of_week for weekly.

post/agents

Request

  • Base URL
    https://api.endclose.com/v1
  • Auth
    API key in header X-API-KEY

Request body

namestring required

Unique within the environment

descriptionstring
instructionsstring required

The standing prompt every run executes

modelstring

Explicit model override. Omit to follow the platform default.

cadence'manual' | 'hourly' | 'daily' | 'weekdays' | 'weekly'
hourinteger
minuteinteger
day_of_weekinteger

0 = Sunday

timezonestring

IANA timezone the schedule is evaluated in

activeboolean
handles_file_dropsboolean

At most one active agent per environment can have this enabled

endclose_writesboolean

Whether this agent may change End Close data: matches, exceptions and findings, marking records overdue, and starting other agents. When false its runs can only read, and a write from the run is refused with 403.

delivery_enabledboolean
delivery_recipientsstring[]
delivery_file_patternstring

Response

Agent created

idstring uuid
kind'llm' | 'browser'

What executes the agent's runs. llm agents run their instructions in a sandbox. browser agents run a fixed automation against a web portal and import what it exports; they have no instructions, are set up by End Close, and cannot be created or converted through the API.

namestring required

Unique within the environment

descriptionstring nullable
instructionsstring required

The standing prompt every run executes. Empty for browser agents

modelstring nullable

The model the agent runs on — resolved to the platform default when not set explicitly. Null for browser agents, which run on no model

cadence'manual' | 'hourly' | 'daily' | 'weekdays' | 'weekly'

manual agents only run when triggered (POST /agents/{id}/runs)

hourinteger nullable

Required for daily, weekdays, and weekly cadences

minuteinteger nullable

Required for every cadence except manual

day_of_weekinteger nullable

0 = Sunday. Required for weekly cadence

timezonestring

IANA timezone the schedule is evaluated in

activeboolean

Inactive agents are never scheduled but can still be run on demand

handles_file_dropsboolean

Whether this agent processes files dropped in the app. At most one active agent per environment can have this enabled.

endclose_writesboolean

Whether this agent may change End Close data: matches, exceptions and findings, marking records overdue, and starting other agents. When false its runs can only read, and a write from the run is refused with 403.

delivery_enabledboolean

Email output files matching delivery_file_pattern to delivery_recipients after each completed run

delivery_recipientsstring[]
delivery_file_patternstring

Case-insensitive glob selecting which output files are delivered

next_run_atstring date-time nullable
last_run_atstring date-time nullable
created_atstring date-time
updated_atstring date-time

Changes

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • breaking

      the response property became nullable for the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status