LemonAgent.Types.AgentState (lemon_agent v0.1.0)

View Source

Runtime state of the agent containing all configuration and conversation data.

Fields

  • system_prompt - The system prompt for the agent
  • model - The AI model being used
  • thinking_level - Level of extended reasoning
  • tools - Available tools for the agent
  • messages - Conversation history (can include custom message types)
  • is_streaming - Whether currently streaming a response
  • stream_message - The message being streamed (if any)
  • pending_tool_calls - Set of tool call IDs awaiting execution
  • error - Error message if the agent encountered an error

Summary

Types

t()

@type t() :: %LemonAgent.Types.AgentState{
  error: String.t() | nil,
  is_streaming: boolean(),
  messages: [LemonAgent.Types.agent_message()],
  model: LemonAi.Types.Model.t(),
  pending_tool_calls: MapSet.t(String.t()),
  stream_message: LemonAgent.Types.agent_message() | nil,
  system_prompt: String.t(),
  thinking_level: LemonAgent.Types.thinking_level(),
  tools: [LemonAgent.Types.AgentTool.t()]
}