Run agents
Agents acquire data, reason across sources, and deliver decisions. They close the loop between a Middesk report surfacing a signal and that signal being resolved.
A standard Middesk report might surface an unknown tax ID number (TIN) or a potential watchlist hit. Upon review, you must investigate each signal: pull documents, cross-reference sources, and determine the validity of a match. Working with an agent, you can delegate the work of reading the report, extracting the signals, and gathering the information necessary to move forward. An agent can manage a team of agents to take the steps necessary to resolve each signal, so that your work shifts from investigation to reviewing the outcome and making a decision.
Understanding agents
Agents plan, research, and reason to advance operational workflows.

Agents can delegate work to other agents, and on the Middesk platform are classified as two types:
- Orchestrators handle planning, coordination, and synthesis. They determine what work is needed, dispatch agents, and aggregate results to drive action.
- Specialists perform research, analysis, and tool calls within a specific domain.
Which agents are fit to run depends on the use case and nature of the operation.
Executing agents
You interact with agents through the following primitives:
- Agent is a defined set of capabilities. You can list available Agents for your account via the API. See the Agent reference.
- Thread is a container to hold context and history for agent work. Threads are commonly associated with a specific context, for example, a
business_id. See the Thread reference. - Run is an individual execution of an agent within a thread. See the Run reference.
The above example demonstrates an end-to-end workflow:
Verify a business
The business verification process is initiated and advanced through the Business Lifecycle. For more details, see Verify a business.
Run an agent
Next, when the business verification order completes, a Business may need review depending on its review insights. From here, an agent can be dispatched to develop a plan and perform the review.
Take action
Once its work is complete, the agent returns a structured response for your team. Based on subsequent input or feedback, the agent can then close the loop and complete the review. For more details, see Take action.
Viewing agent activity
As an agent performs a run, it maintains a full record of what it performed and what it found, captured through steps and artifacts. This provides a complete audit trail of the agent’s work.
Steps represent the trail of work the agent performed. Each step captures an individual action, such as researching a data source, analyzing a result, or requesting your input. Steps can be nested, reflecting how an orchestrator delegates to specialists.
Artifacts represent what the agent found. Each artifact is a structured result that includes a confidence score and source references, tracing the finding back to the specific data that informed it.
Together, steps and artifacts give you the context to understand how the agent reached its conclusion and the evidence behind it. For the full response structure, see the Run reference.