#!/usr/bin/env python """List all available agents in the Letta project.""" from letta_client import Letta from config_loader import get_letta_config # Get configuration letta_config = get_letta_config() # Create client client = Letta( token=letta_config['api_key'], timeout=letta_config['timeout'] ) # List all agents print("Available agents:") print("-" * 50) try: agents = client.agents.list() if not agents: print("No agents found in this project.") else: for agent in agents: print(f"Name: {agent.name}") print(f"ID: {agent.id}") if hasattr(agent, 'description'): print(f"Description: {agent.description}") print("-" * 50) except Exception as e: print(f"Error listing agents: {e}")