Agents allow you to declare and reuse settings for Runs. This is particularly useful when you want to standardize run behavior across multiple invocations or share configurations between different parts of your application.

Agents are created via the Playground UI. An agent can specify all options available to a run.

When triggering a run, the agent value can be provided.

Options on the Run invocation are merged with those defined in the Agent.

Values defined directly in the Run take precedence over those defined in the Agent.

const run = await inferable.run({
  agentId: "XXXXXXXX",
  initialPrompt: `Help this customer: ${customerQuery}`,
});

Structured Input

You can optionally provide an inputSchema when defining an Agent. This will be validated when creating runs with the agent.

const run = await inferable.run({
  agentId: "XXXXXXXX",
  input: {
    userName: "John Smith",
  },
});