Creating an Agent
You can quickly create a new agent using themake:agent
command:
app/AiAgents
directory with the basic structure and methods needed to get started. The generated agent includes:
- Default model configuration
- In-memory chat history
- Default provider setting
- Empty tools array
- Placeholder for instructions and prompt methods
Interactive Chat
You can start an interactive chat session with any of your agents using theagent:chat
command:
- Send messages to your agent
- Get responses in real-time
- Use any tools configured for the agent
- Type ‘exit’ to end the chat session
Clear Chat History
You can clear all chat histories for a specific agent using theagent:chat:clear
command:
Remove Chat History
You can completely remove all chat histories and keys for a specific agent using theagent:chat:remove
command:
Both,
remove
and clear
commands will affect the current type of chat
history. For example, if you were using session
chat history, and later
switched to file
, both commands will remove from the file
(current type of
chat history) storage.Planned Commands
LarAgent has plans to add more commands in the future to enhance developer experience:make:agent:tool
- Generate tool classes with ready-to-use stubsmake:agent:chat-history
- Scaffold custom chat history implementations