For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Contact SalesGet Support
HomeGuidesAPI reference
HomeGuidesAPI reference
  • Middesk API
        • Agent
        • Thread
        • Run
LogoLogo
Contact SalesGet Support
On this page
  • Run object
  • Run attributes
  • Status values
  • Step attributes
  • Step types
  • Artifact attributes
  • Source attributes
Middesk APIAgentsObject reference

Run object

Was this page helpful?
Previous

Autocomplete business identities

Next
Built with

A run is a single execution of an agent within a thread. You create a run by specifying an agent type and an input prompt. The run progresses through a lifecycle and produces steps and artifacts that capture the agent’s work.

Run object

Example JSON response
1{
2 "object": "run",
3 "id": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
4 "created_at": "2026-01-15T12:00:00.000Z",
5 "updated_at": "2026-01-15T12:05:00.000Z",
6 "status": "completed",
7 "started_at": "2026-01-15T12:00:01.000Z",
8 "ended_at": "2026-01-15T12:05:00.000Z",
9 "steps": [],
10 "interrupts": []
11}

Run attributes

AttributeTypeDescription
objectstringObject type identifier. Always run.
idstring (uuid)Unique identifier for the run.
created_atstring (date-time)ISO 8601 timestamp of when the run record was created.
updated_atstring (date-time)ISO 8601 timestamp of when the run record was last updated.
statusstringCurrent lifecycle status. One of running, completed, error, or interrupted.
started_atstring (date-time) | nullISO 8601 timestamp of when the run started execution.
ended_atstring (date-time) | nullISO 8601 timestamp of when the run finished execution.
stepsStep[]Top-level execution steps for this run. Only included when requesting run details with step state. See Step attributes.
interruptsarrayPending interrupt requests awaiting input. Empty when the run is not interrupted.

Status values

StatusDescription
runningThe run is actively executing.
completedThe run finished successfully.
errorThe run encountered an error.
interruptedThe run has paused and is waiting for input. See Take action.

Step attributes

Each step represents an individual unit of work within a run. Steps can be nested, reflecting how an orchestrator delegates to specialists.

Example step
1{
2 "id": "d1e2f3a4-5678-90ab-cdef-1234567890ab",
3 "run_id": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
4 "agent": "cip_orchestrator",
5 "type": "activity",
6 "name": "research_tin",
7 "label": "Researching TIN verification",
8 "parent_step_id": null,
9 "status": "completed",
10 "started_at": "2026-01-15T12:01:00.000Z",
11 "completed_at": "2026-01-15T12:02:30.000Z",
12 "steps": [],
13 "result": {},
14 "artifacts": []
15}
AttributeTypeDescription
idstringUnique identifier for the step.
run_idstringIdentifier of the run that produced the step.
agentstringAgent identifier that generated this step.
typestringCategory of step output. One of activity, output, interrupt, or error.
namestringInternal step name.
labelstringHuman-readable step label.
parent_step_idstring | nullParent step identifier for nested steps.
statusstringCurrent execution status. One of running, completed, or error.
started_atstringISO 8601 timestamp of when the step started.
completed_atstring | nullISO 8601 timestamp of when the step completed.
stepsStep[]Nested child steps.
resultobjectStructured result payload for the step.
artifactsArtifact[]Artifacts produced by the step. See Artifact attributes.

Step types

TypeDescription
activityAn action the agent performed, such as researching a data source or analyzing a result.
outputA final output produced by the agent.
interruptThe agent has paused and is requesting input. See Take action.
errorThe step encountered an error during execution.

Artifact attributes

Each artifact is a structured result produced by a step. Artifacts include confidence indicators and source references that trace findings back to the data that informed them.

Example artifact
1{
2 "title": "TIN Verification Result",
3 "type": "tin_verification",
4 "confidence": "high",
5 "summary": "TIN matches IRS records for the registered business name.",
6 "sources": [
7 {
8 "url": "https://irs.gov/tin-matching",
9 "source_name": "IRS TIN Matching",
10 "source_tier": "government",
11 "source_type": "tin_match"
12 }
13 ]
14}
AttributeTypeDescription
titlestringHuman-readable title for the artifact.
typestringArtifact type identifier.
confidencestring | nullConfidence label for artifact quality.
summarystring | nullSummary of the artifact contents.
sourcesSource[]Source references used to produce the artifact. See Source attributes.

Source attributes

Each source identifies where an artifact’s data originated.

AttributeTypeDescription
urlstringCanonical source URL.
source_namestringHuman-readable source name.
source_tierstringSource quality or trust tier.
source_typestringSource category.
Get a demo
Contact your account manager or contact sales to inquire about access.