swarms chat command provides an interactive chat agent with optimized defaults for conversational interactions. The agent runs with max_loops="auto" for continuous interaction, similar to Claude Code.
Features
- Interactive Mode: Automatically enabled for continuous conversation
- Auto Loops: Runs with
max_loops="auto"for autonomous operation - Dynamic Context Window: Automatically adjusts context window (100,000 tokens)
- Dynamic Temperature: Adapts temperature based on conversation
- Optional Initial Task: Start with a task or begin with a prompt
Basic Usage
Start Chat Without Initial Task
Start Chat With Initial Task
Advanced Usage
Custom Agent Name
Custom System Prompt
Full Customization
Using Python Module Directly
You can also run the chat command directly with Python:How It Works
-
The chat agent initializes with optimized settings:
interactive=True- Enables continuous interactionmax_loops="auto"- Autonomous loop executiondynamic_context_window=True- Adaptive context managementdynamic_temperature_enabled=True- Adaptive response generationcontext_length=100000- Large context window
-
If you provide a
--task, the agent processes it first - After processing, the agent continues to prompt for input
- You can continue the conversation interactively
- Exit by typing ‘exit’, ‘quit’, or pressing Ctrl+C
Examples
Quick Question
Extended Conversation
Code Review Session
Tips
- Use
--system-promptto customize the agent’s behavior and expertise - Provide a
--taskto start with context before interactive mode - The agent remembers conversation history within the session
- All standard agent parameters are available for customization
Troubleshooting
If you encounter the errorauto_chat_agent() got an unexpected keyword argument 'interactive', ensure you’re using the latest version of Swarms where this has been fixed.