github letta-ai/letta 0.3.18
v0.3.18

latest releases: 0.16.2, 0.16.1, 0.16.0...
19 months ago

This release introduces tool creation from inside Python scripts, returning usage statistics, and many bug fixes.

🔧 Tool creation in the Python Client

We added support for directly creating tools in Python:

def print_tool(message: str):
    """ 
    Args: 
        message (str): The message to print.
        
    Returns:
        str: The message that was printed.
        
    """
    print(message)
    return message

tool = client.create_tool(print_tool, tags=["extras"])
agent_state = client.create_agent(tools=[tool.name]))

📊 Usage Statistics

Sending a message to an agent now also returns usage statistics for computing cost metrics:

class MemGPTUsageStatistics(BaseModel):
    completion_tokens: int
    prompt_tokens: int
    total_tokens: int
    step_count: int

What's Changed

New Contributors

Full Changelog: 0.3.17...0.3.18

Don't miss a new letta release

NewReleases is sending notifications on new releases.