New: Kith open-sources its ATS.Read why
Skip to Content
Objects

AgentRun

One piece of work an agent did, or is doing. A sourcing run also keeps a timeline of what happened and the full log of the process.

type AgentRun {
  agent: Agent!
  completedAt: DateTime
  createdAt: DateTime!
  error: String
  events(
    after: String
    before: String
    first: Int
    last: Int
  ): AgentRunEventConnection!
  id: ID!
  logFiles: [AgentRunLogFile!]!
  outcome: AgentRunOutcome!
  sourcedCandidateCount: Int
  sourcingMethod: SourcingMethod
  startedAt: DateTime
  status: AgentRunStatus!
  trigger: String!
}

Fields

AgentRun.agent · Agent! non-null object

The agent that ran.

AgentRun.completedAt · DateTime scalar

When the run finished or failed. Null until then.

AgentRun.createdAt · DateTime! non-null scalar

When the run was created. It may wait before it starts.

AgentRun.error · String scalar

Why the run failed, as recorded. Null unless status is FAILED.

AgentRun.events · AgentRunEventConnection! non-null object

What happened during the run, oldest first. While the run is going, pass the last cursor you hold as after to read only what is new. Only sourcing runs record events.

AgentRun.events.after · String scalar

Return the rows that follow this cursor.

AgentRun.events.before · String scalar

Return the rows that come before this cursor.

AgentRun.events.first · Int scalar

How many rows to return, from the start or from after. 50 when left out, 200 at most.

AgentRun.events.last · Int scalar

How many rows to return, counting back from the end or from before. 200 at most.

AgentRun.id · ID! non-null scalar

The run's id.

AgentRun.logFiles · [AgentRunLogFile!]! non-null object

The full, redacted log of the process, newest first: the latest 20 files. Empty until the run finishes or fails, when log storage was unavailable, and for a run that is not a sourcing run, whose files the download routes refuse.

AgentRun.outcome · AgentRunOutcome! non-null enum

What the run came to, in one word. For a sourcing run this separates finding nobody from finding people.

AgentRun.sourcedCandidateCount · Int scalar

How many candidates a sourcing run added. Null for other runs, and until the run has finished.

AgentRun.sourcingMethod · SourcingMethod enum

Which way of sourcing the run used. Null when the run is not a sourcing run.

AgentRun.startedAt · DateTime scalar

When work began. Null while the run is waiting.

AgentRun.status · AgentRunStatus! non-null enum

How far the run has got. Poll while it is PENDING or RUNNING.

AgentRun.trigger · String! non-null scalar

What started it: manual when a person asked, scheduled, event: and the event's name (such as event:candidate.created), or sourcing: or context: and the task for a sourcing run.

Returned By

agentRun query

Member Of

AgentRunEdge object · RunAgentPayload object