agenix library

Classes

Agent
Agent is the main class that represents the AI agent. Define the agent with all background knowledge and tools.
AgentMessage
Represents a message in a conversation, either from the agent or the user. It can optionally contain an image (as binary data or a URL).
Conversation
Represents a chat conversation summary, typically shown in a conversation list. Stores the last message exchanged, the time it occurred, and a unique ID for identification.
DataStore
DataStore is an abstract class that defines the contract for data storage and retrieval in the agent's memory management system. It provides methods to save messages, retrieve messages, delete conversations, and get conversations. This allows for easy swapping of data stores (e.g., Firestore, SQLite, Hive) without changing the core logic of the agent's memory management. To implement a new data store, simply extend this class and provide the necessary methods.
LLM
The LLM interface defines the contract for all large language models used in the agent. It provides a method to generate responses based on a prompt and optional raw data. This allows for flexibility in using different LLM implementations while maintaining a consistent API. To add a new LLM, simply implement this interface and provide the necessary methods.
ParameterSpecification
ParameterSpecifications are provided when a tool is defined and are used to validate the parameters passed to the tool. They are also used to generate the prompt for the LLM. The ParamSpec class defines the structure of a parameter specification. It includes the name, type, description, whether it is required, You can pass a complete API payload as the parameter value,
Tool
The Tool class is an abstract class that defines the structure and behavior of a tool. It includes the name, description, and parameters of the tool.
ToolResponse
Represents the response from a tool executed by the agent.