Skip to main content
The Tyler CLI provides tools for creating and interacting with Tyler agents. It includes commands for scaffolding new projects and chatting with agents interactively.

Installation

The Tyler CLI is automatically installed when you install the Tyler package:
After installation, the tyler command will be available in your terminal.

Commands

tyler init

Create a new Tyler agent project with all the necessary scaffolding:
This creates a project structure with:
  • agent.py - Main agent configuration
  • tyler-config.yaml - Chat configuration
  • .env.example - API key template
  • pyproject.toml - Project dependencies
  • tools/ - Directory for custom tools
  • README.md - Project documentation

tyler chat

Start an interactive chat session with an agent:
This launches an interactive chat where you can:
  • Type messages and see streaming responses
  • Use commands to manage your conversation
  • Switch between different conversation threads

Configuration

Tyler Chat can be configured using a YAML or JSON file to customize the agent’s behavior, tools, and parameters.

Using a configuration file

Configuration file format

Create a tyler-config.yaml file:
See the MCP Integration Guide for full MCP configuration options.

Environment variable substitution

Config files support environment variable substitution using ${VAR_NAME} syntax. This is useful for securely referencing API keys:
Never hardcode API keys in config files. Always use environment variables via ${VAR_NAME} syntax or store them in your .env file.

Command line options

Chat commands

During a chat session, you can use these special commands:

Command examples

Features

Streaming responses

Tyler Chat displays responses in real-time as they’re generated, providing immediate feedback and a more interactive experience.

Thread persistence

Conversations are automatically saved and can be resumed later. By default, threads are stored in memory during the session.

Rich formatting

  • Markdown support: Responses are rendered with proper formatting
  • Syntax highlighting: Code blocks are displayed with syntax colors
  • Structured output: Tables, lists, and other elements are properly formatted

Tool integration

When your agent uses tools, you’ll see real-time updates:

Advanced usage

Persistent storage

To enable persistent storage across sessions, set up a database:

Custom tools

Create a Python file with your custom tools:
Then reference it in your config:

Environment variables

Tyler Chat respects these environment variables:
To enable Weave tracing for observability, set WANDB_PROJECT to your desired project name. If not set, the CLI runs without tracing overhead for faster startup.

Troubleshooting

Clean output mode

Tyler Chat automatically suppresses noisy output from third-party libraries. If you need to see debug information:

Common issues

“Module not found” errors: Make sure all dependencies are installed:
API key errors: Ensure your API keys are set in environment variables or .env file Database errors: Check your NARRATOR_DATABASE_URL is correctly formatted

Examples

Research assistant

Code helper

Quick project setup

Use tyler init to scaffold a complete project:

Next steps

Build custom agents

Learn to create agents programmatically

Add custom tools

Extend agent capabilities with custom tools

Deploy to Slack

Run your agent as a Slack bot

Advanced patterns

Explore advanced agent patterns