Something went wrong. Try again.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132#!/usr/bin/env python"""List all available agents in the Letta project."""
from letta_client import Lettafrom config_loader import get_letta_config
# Get configurationletta_config = get_letta_config()
# Create clientclient = Letta( token=letta_config['api_key'], timeout=letta_config['timeout'])
# List all agentsprint("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}")