agent command provides direct access to Weaver’s AI agent through the command line, supporting both single-message and interactive modes.
Usage
Modes
Single Message Mode
Send a single message and receive a response:Interactive Mode
Start a conversational session:Options
Single message to send to the agentWhen provided, agent runs in single-message mode and exits after response.
Session key for conversation historyUse different session keys to maintain separate conversation contexts.
Enable debug mode with verbose loggingDisplays detailed log output to help troubleshoot issues.Output includes:
- Tool loading details
- Skill availability
- Provider API calls
Interactive Mode Features
Command History
Interactive mode uses readline with persistent history:- Location:
/tmp/.weaver_history - Limit: 100 entries
- Navigation: Up/Down arrows
Exit Commands
Multiple ways to exit interactive mode:Fallback Mode
If readline initialization fails, agent falls back to simple input mode:Startup Information
Agent displays initialization details:Examples
Session Management
Sessions persist conversation history across commands:cli:default
Exit Codes
| Code | Reason |
|---|---|
| 0 | Success - message processed |
| 1 | Config loading failed |
| 1 | Provider creation failed |
| 1 | Message processing error (in single-message mode) |
Error Handling
Configuration Errors
weaver onboard first.
Provider Errors
~/.weaver/config.json:
Processing Errors (Interactive Mode)
Processing Errors (Message Mode)
Performance Notes
- Startup time: ~1-2 seconds (loads tools and skills)
- Response time: Varies by model and complexity
- Memory usage: ~50-100 MB baseline
Related Commands
weaver gateway- Run agent as persistent serviceweaver skills- Manage agent capabilitiesweaver status- Check agent configuration