LLM Commands
Manage LLM projects and chat sessions.
Commands
tdx llm projects [pattern] # List projects
tdx llm project list [pattern] # Same as projects
tdx llm agents [pattern] # List agents (alias for tdx agent list)Agent Commands
Agent management commands have moved to tdx agent. See Agent Commands for:
tdx agent list- List agentstdx agent show- Show agent detailstdx agent create- Create a new agenttdx agent update- Update an existing agenttdx agent delete- Delete an agent
Project Management
Set Project Context
# Set current project context (session-only)
tdx llm use "MyProject"
# Now all agent commands use "MyProject" by default
tdx agent list
tdx agent show "Data Analyst"Set Default Agent for Chat
Set a default agent for chat operations using tdx use agent, so you don't need to specify --agent each time:
# Set default agent (use "Project/Agent" format)
tdx use agent "MyProject/My Agent"
# Now new chats use this agent by default
tdx chat --new "Your question here"
tdx chat "Another question" # Continues the chat
# Override with --agent for a specific new chat
tdx chat --new "Question" --agent "OtherProject/OtherAgent"The default agent preference is:
- Stored in session context (same as
tdx use database, etc.) - Used automatically by
tdx chat --newwhen no--agentflag is specified - Overridden by explicit
--agentflag
List and Create Projects
# List available models
tdx llm models
# List all projects
tdx llm projects
# List projects matching pattern
tdx llm projects "data*"
tdx llm projects "*_prod"
# Create a new project
tdx llm project create "MyProject" --description "Data analysis project"
# Delete a project
tdx llm project delete "OldProject"Backup and Restore Projects (Deprecated)
DEPRECATED
The backup and restore commands are deprecated. Use the new tdx agent commands instead:
tdx agent pull- Export project to Git-friendly YAML/Markdown formattdx agent push- Import local files to projecttdx agent clone- Clone a project to a new project
See Agent Commands for full documentation.
Legacy backup/restore commands (click to expand)
Backup an entire LLM project to a folder, including all agents, knowledge bases, prompts, and integrations:
# Backup project to default folder ({project_name}.llm)
tdx llm project backup "MyProject"
# Backup to custom folder
tdx llm project backup "MyProject" -o ./backups/myproject
# Preview what would be backed up (dry-run)
tdx llm project backup "MyProject" --dry-run
# Overwrite existing backup without confirmation
tdx llm project backup "MyProject" -yRestore a project from a backup:
# Restore project with original name
tdx llm project restore ./MyProject.llm
# Restore with a new name
tdx llm project restore ./MyProject.llm --name "MyProject-restored"
# Preview what would be restored (dry-run)
tdx llm project restore ./MyProject.llm --dry-run
# Skip confirmation if project exists
tdx llm project restore ./MyProject.llm -yBackup Contents
The backup folder contains:
project.json- Project metadata and backup infoagents.json- All agents with full configurationknowledgebases.json- All knowledge basesprompts.json- All promptsintegrations.json- All integrations
Agent Management
Agent commands have moved to tdx agent. See Agent Commands for full documentation.
# List agents (alias kept for convenience)
tdx llm agents
# Or use the new commands
tdx agent list
tdx agent show "My Agent"
tdx agent create "New Agent"
tdx agent update "My Agent" --prompt "..."
tdx agent delete "Old Agent"Chat History
# List recent chat sessions
tdx llm history
# Show specific chat messages
tdx llm history chat456Project Resolution
Agent commands resolve projects in this order:
--llm-projectglobal option (highest priority)tdx llm use <project>context (session-only)- Default project
tdx_default_<username>(auto-created)
Claude Code Integration
See tdx claude for launching Claude Code with TD LLM backend.
LLM Proxy Server
Experimental
This feature is experimental and may have limitations.
Start a local HTTP server providing Anthropic-compatible API endpoints:
# Start proxy with defaults (port 4000)
tdx llm proxy
# Custom port
tdx llm proxy --port 8000
# Use specific project and agent
tdx llm proxy --project "MyProject" --agent "MyAgent"
# Enable debug mode
tdx llm proxy --debugProxy Configuration for Claude Code
Create .claude/settings.local.json:
{
"env": {
"ANTHROPIC_BASE_URL": "http://127.0.0.1:4000",
"ANTHROPIC_MODEL": "sonnet"
}
}Known Limitations
- Tool calls rely on prompt engineering
- Non-streaming responses not implemented
- Image inputs not supported
- TD's built-in tools not directly accessible
Options Reference
Backup Options (Deprecated)
| Option | Description | Default |
|---|---|---|
-o, --output <folder> | Output folder | {project_name}.llm |
--dry-run | Preview without creating files | false |
-y, --yes | Skip confirmation prompt | false |
Restore Options (Deprecated)
| Option | Description | Default |
|---|---|---|
--name <text> | New project name | Original name from backup |
--dry-run | Preview without making changes | false |
-y, --yes | Skip confirmation prompt | false |