[READ-ONLY] Mirror of https://github.com/just-cameron/letta-examples.
letta-examples basic-agent-conversation
2 files

README.md

Basic Agent Conversation #

This example demonstrates the fundamentals of creating a Letta agent and having a conversation with memory.

What This Example Shows #

  • Creating an agent with Letta Cloud API
  • Setting up initial memory blocks (human and persona)
  • Sending messages to the agent
  • Agent's ability to remember information across messages

Key Concepts #

  1. Agent Creation: Every agent needs a name, model, and embedding model
  2. Memory Blocks: Initial context that shapes the agent's behavior
  3. Stateful Conversations: The agent remembers previous messages
  4. Message API: Simple request-response pattern for conversations

Running the Example #

python basic_agent.py

Expected Output #

The agent will:

  1. Introduce itself and explain how it can help
  2. Remember your preference for Python examples
  3. Recall that preference when asked

This demonstrates Letta's core value: agents that truly remember and maintain context across conversations.