Chat Commands
Simplified command for chatting with LLM agents.
Basic Usage
bash
tdx chat <message> [options]Options
| Option | Description | Default |
|---|---|---|
--agent <name> | Chat with specific agent (requires --new) | default agent |
--new | Start a new chat session | - |
Examples
bash
# Simple chat (uses default agent)
tdx chat "Show me the top customers by revenue"
# Continue previous conversation (default behavior)
tdx chat "What about last quarter?"
# Start a new conversation
tdx chat --new "Tell me about data modeling best practices"
# Start new chat with specific agent (--agent requires --new)
tdx chat --new "Analyze churn" --agent "MyProject/Data Analyst"
# Set default agent for all new chats
tdx use agent "MyProject/My Agent"
tdx chat --new "Question 1"
tdx chat "Question 2" # Continues the chat started above
# Verbose mode shows chat session ID
tdx chat "Hello" --verboseHow It Works
- Default behavior: Continues last chat session automatically
- Session persistence: Last chat ID saved to
.cache/tdx/last_chat_id - --new flag: Starts a fresh chat session
- --agent: Use specific agent for new chat (requires
--new, use "Project/Agent" format) - Default agent: Use
tdx use agent <name>to set a default agent for new chats
Agent Selection Priority
When starting a new chat, the agent is selected in this order:
--agentflag: Explicitly specified agent (highest priority)- Session agent: Set via
tdx use agent "Project/Agent"ortdx use agent "AgentName"(uses current llm_project) - Cached default agent: Previously used default agent
- Default haiku agent: Auto-created default agent with claude-4.5-haiku
Setting Default Agent
bash
# Set both project and agent at once
tdx use agent "MyProject/MyAgent"
# Or set project first, then agent name only
tdx use llm_project "MyProject"
tdx use agent "MyAgent"
# Now new chats use this agent automatically
tdx chat --new "Question 1"
tdx chat "Question 2" # Continues chat with same agent
# Override with --agent for a specific new chat
tdx chat --new "Question 3" --agent "OtherProject/OtherAgent"Interactive Chat Selector
The tdx chats command provides an interactive interface for browsing and resuming chat sessions.
Usage
bash
tdx chats [options]Options
| Option | Description |
|---|---|
--last | Show the most recent chat session |
Examples
bash
# Open interactive chat selector
tdx chats
# Show the most recent chat session
tdx chats --lastThe interactive selector allows you to:
- Browse all your chat sessions
- View chat history
- Resume conversations
Related Commands
- LLM Commands - Manage projects, agents, and chat history