Wardrik. Operations. Lifecycle
(wardrik v0.1.0-rc.1)
Copy Markdown
Operations on an agent's lifecycle: defining, starting, stopping, clearing and forgetting it, and killing its tool calls.
Summary
Functions
Lists the tool calls the agent is running, with how long each has run.
Clears the agent's conversation, and restarts it from its definition.
Defines an agent. Starts it, or reconfigures it if it's running.
Returns the agent's definition, the tools it names that aren't available yet, and when each trigger runs next.
Stops the agent, and deletes its conversation and definition.
Stops the agent and deletes all its data, including its conversations.
Kills one of the agent's running tool calls. The model gets an error as its result.
Starts the agent from its definition, unless it's running.
Stops the agent but keeps its conversation. It sleeps until something asks it.
Returns :ok, or a conflict error if the agent id is declared outside the API.
Functions
@spec calls(Wardrik.Scope.t(), map()) :: {:ok, map()} | {:error, Wardrik.Error.t()}
Lists the tool calls the agent is running, with how long each has run.
@spec clear(Wardrik.Scope.t(), map()) :: {:ok, map()} | {:error, Wardrik.Error.t()}
Clears the agent's conversation, and restarts it from its definition.
@spec define(Wardrik.Scope.t(), map()) :: {:ok, map()} | {:error, Wardrik.Error.t()}
Defines an agent. Starts it, or reconfigures it if it's running.
@spec definition(Wardrik.Scope.t(), map()) :: {:ok, map()} | {:error, Wardrik.Error.t()}
Returns the agent's definition, the tools it names that aren't available yet, and when each trigger runs next.
@spec forget(Wardrik.Scope.t(), map()) :: {:ok, nil} | {:error, Wardrik.Error.t()}
Stops the agent, and deletes its conversation and definition.
@spec forgotten(Wardrik.t(), String.t()) :: :ok | {:error, Wardrik.Error.t()}
Stops the agent and deletes all its data, including its conversations.
@spec kill(Wardrik.Scope.t(), map()) :: {:ok, nil} | {:error, Wardrik.Error.t()}
Kills one of the agent's running tool calls. The model gets an error as its result.
@spec spawn(Wardrik.Scope.t(), map()) :: {:ok, map()} | {:error, Wardrik.Error.t()}
Starts the agent from its definition, unless it's running.
@spec stop(Wardrik.Scope.t(), map()) :: {:ok, map()} | {:error, Wardrik.Error.t()}
Stops the agent but keeps its conversation. It sleeps until something asks it.
@spec undeclared(Wardrik.t(), String.t()) :: :ok | {:error, Wardrik.Error.t()}
Returns :ok, or a conflict error if the agent id is declared outside the API.