Overview
Theagent command provides direct interaction with the PicoClaw AI agent. It supports both interactive chat mode and single-message mode, allowing you to have conversations with the AI or send one-off commands.
Usage
Flags
string
Send a single message in non-interactive mode. When provided, the agent processes the message and returns the response without entering interactive mode.
string
default:"cli:default"
Session key for maintaining conversation context. Use different session keys to maintain separate conversation histories.
string
Override the default model specified in config. Allows you to use a specific model for this interaction.
boolean
default:"false"
Enable debug logging to see detailed information about the agent’s operation, including tool usage and internal processing.
Interactive Mode
When run without the-m flag, the agent enters interactive mode:
- Type your message and press Enter to send
- The agent maintains conversation context within the session
- Command history is saved (use Up/Down arrows to navigate)
- Type
exitorquitto leave interactive mode - Press Ctrl+C to exit immediately
Non-Interactive Mode
Send a single message and receive a response:Examples
Basic Chat
Using a Different Session
Maintain separate conversation contexts:Override Model
Debug Mode
See what’s happening under the hood:Interactive Session with Custom Model
Tips
- Session Management: Use descriptive session keys to organize different conversation threads
- Model Selection: Choose models based on task complexity and speed requirements
- Debug Mode: Enable debug mode when troubleshooting or understanding agent behavior
- History: In interactive mode, command history is preserved in
/tmp/.picoclaw_history - Long Conversations: The agent maintains context within a session, so you can refer to previous messages
Common Use Cases
-
Quick Queries: Use non-interactive mode for one-off questions
-
Extended Conversations: Use interactive mode for back-and-forth dialogue
-
Task-Specific Sessions: Create dedicated sessions for different projects
-
Model Experimentation: Try different models for comparison
Exit Codes
0: Success1: Error (configuration issue, provider error, or processing failure)
See Also
- picoclaw gateway - Start the gateway server for channel integrations
- picoclaw status - Check configuration and authentication status
- Configuration - Configure models and providers