staff_ai/agent

Types

Represents an AI worker in a staff system

pub type Agent {
  Agent(
    id: UUID,
    name: String,
    role: String,
    context: Option(String),
  )
}

Constructors

  • Agent(
      id: UUID,
      name: String,
      role: String,
      context: Option(String),
    )

    Arguments

    • id

      Unique identifier of the agent

    • name

      Name of the agent, which is used to identify him in your system. It can be a real name or a nickname, e.g. “Jane Doe” or “jane_doe”

    • role

      Role of the agent, which is used to identify his skills and responsibilities in your system. It can be a real role or a nickname, e.g. “Software Developer” or “dev”

    • context

      Adding a context to an agent is optional, but it can be useful to store additional information about the agent. It can be used to store additional information about the agent as it will influence the way it reacts to tasks. E.g. “Jane Doe is a technical lead of the project X. She is responsible for the architecture and …”

Represents a unique identifier of an agent, which is a string in the UUID format.

pub type UUID =
  String

Functions

pub fn create(
  name: String,
  role: String,
  context: Option(String),
) -> Agent

Creates a new agent with the given parameters.

Search Document