TeamAgent

class TeamAgent(val name: String, val description: String, val model: ChatModel, val tools: List<Tool> = emptyList(), val system: String? = null, val inOrder: Boolean = false, val retry: Retry? = null, val shorten: (List<ChatMessage>) -> List<ChatMessage>? = null)

An agent of a team: what it is good at, and the model, tools and instructions it works with.

Constructors

Link copied to clipboard
constructor(name: String, description: String, model: ChatModel, tools: List<Tool> = emptyList(), system: String? = null, inOrder: Boolean = false, retry: Retry? = null, shorten: (List<ChatMessage>) -> List<ChatMessage>? = null)

Properties

Link copied to clipboard

tells the other models of the team what this agent does and when to use it.

Link copied to clipboard

true to run the tool calls of an answer one after the other. See toolLoop. In a handoffTeam they always do.

Link copied to clipboard

the model of this agent. A team can use a fast model for simple work and a better one for hard work.

Link copied to clipboard

how the team refers to the agent. It is the name of its node in the graph, and the other models of the team reach it with a tool that has the name in it: letters, digits, _ and -.

Link copied to clipboard
val retry: Retry?

how this agent's model is asked again when a call to it fails. See toolLoop.

Link copied to clipboard

returns the part of this agent's conversation its model reads. See toolLoop.

Link copied to clipboard

the instructions of this agent.

Link copied to clipboard

the tools of this agent.