Skip to main content
The Agent class defines an agent that can be run on the Ardent platform.

Constructor

The Agent constructor accepts a configuration object with the following properties:
Model
required
The Model to use for the agent’s operations.
string
Instructions that guide the agent’s behavior, often called a system prompt or role prompt.
Prompt[]
An array of prompts that the agent can call.
Tool[]
An array of tools that the agent can call.
Workflow[]
An array of workflows that the agent can execute.

Methods

In addition to passing Tools, Prompts, and Workflows into the Agent constructor, you can also add them after the fact:
There’s no difference between passing these objects to the Agent constructor, or by calling a method like addTool(). It’s up to you and your preferred style.

See also

Agents

Read more about agents