Letta Development Guide logo

Letta Development Guide

Organization
letta-ai
letta-development-guide

Comprehensive guide for developing Letta agents, including architecture selection, memory design, model selection, and tool configuration. Use when building or troubleshooting Letta agents.

Overview

Publisherletta-ai
Repositoryskills
Skill nameletta-development-guide
Stars
144
Forks
25
Bundled files
8
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 8 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by letta-ai on GitHub. Read the source before you install it.

Installation

Install the Letta Development Guide AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/letta-ai/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/letta/agent-development .claude/skills/letta-development-guide
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Letta Development Guide in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Letta Development Guide on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Letta Development Guide is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Letta Development Guide

Comprehensive guide for designing and building effective Letta agents with appropriate architectures, memory configurations, model selection, and tool setups.

When to Use This Skill

Use this skill when:

  • Starting a new Letta agent project
  • Choosing between agent architectures (letta_v1_agent vs memgpt_v2_agent)
  • Designing memory block structure and architecture
  • Selecting appropriate models for your use case
  • Planning tool configurations
  • Optimizing memory management and performance
  • Implementing shared memory between agents
  • Debugging memory-related issues

Quick Start Guide

Minimal Working Example

python
from letta_client import Letta

client = Letta()
agent = client.agents.create(
    name="my-assistant",
    model="openai/gpt-4o",
    embedding="openai/text-embedding-3-small",
    memory_blocks=[
        {"label": "persona", "value": "You are a helpful assistant."},
        {"label": "human", "value": "The user's name and preferences."},
    ],
)

# Send a message
response = client.agents.messages.create(
    agent_id=agent.id,
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.messages[-1].content)

1. Architecture Selection

Use letta_v1_agent when:

  • Building new agents (recommended default)
  • Need compatibility with reasoning models (GPT-4o, Claude Sonnet 4)
  • Want simpler system prompts and direct message generation

Use memgpt_v2_agent when:

  • Maintaining legacy agents
  • Require specific tool patterns not yet supported in v1

For detailed comparison, see references/architectures.md.

2. Memory Architecture Design

Memory is the foundation of effective agents. Letta provides three memory types:

Core Memory (in-context):

  • Always accessible in agent's context window
  • Use for: current state, active context, frequently referenced information
  • Limit: Keep total core memory under 80% of context window

Archival Memory (out-of-context):

  • Semantic search over vector database
  • Use for: historical records, large knowledge bases, past interactions
  • Access: Agent must explicitly call archival_memory_search
  • Note: NOT automatically populated from context overflow

Conversation History:

  • Past messages from current conversation
  • Retrieved via conversation_search tool
  • Use for: referencing earlier discussion, tracking conversation flow

See references/memory-architecture.md for detailed guidance.

3. Memory Block Design

Core principle: One block per distinct functional unit.

Essential blocks:

  • persona: Agent identity, behavioral guidelines, capabilities
  • human: User information, preferences, context

Add domain-specific blocks based on use case:

  • Customer support: company_policies, product_knowledge, customer
  • Coding assistant: project_context, coding_standards, current_task
  • Personal assistant: schedule, preferences, contacts

Memory block guidelines:

  • Keep blocks focused and purpose-specific
  • Use clear, instructional descriptions
  • Monitor size limits (typically 2000-5000 characters per block)
  • Design for append operations when sharing memory between agents

See references/memory-patterns.md for domain examples and references/description-patterns.md for writing effective descriptions.

4. Model Selection

Match model capabilities to agent requirements:

For production agents:

  • GPT-4o or Claude Sonnet 4 for complex reasoning
  • GPT-4o-mini for cost-efficient general tasks
  • Claude Haiku 3.5 for fast, lightweight operations
  • Gemini 2.0 Flash for balanced speed/capability

Avoid for production:

  • Small Ollama models (<7B parameters) - poor tool calling
  • Models without reliable function calling support

See references/model-recommendations.md for detailed guidance.

5. Tool Configuration

Start minimal: Attach only tools the agent will actively use.

Common starting points:

  • Memory tools (memory_insert, memory_replace, memory_rethink): Core for most agents
  • File system tools: Auto-attached when folders are connected
  • Custom tools: For domain-specific operations (databases, APIs, etc.)

Tool Rules: Use to enforce sequencing when needed (e.g., "always call search before answer")

Consult references/tool-patterns.md for common configurations.

Advanced Topics

Memory Size Management

When approaching character limits:

  1. Split by topic: customer_profilecustomer_business, customer_preferences
  2. Split by time: interaction_historyrecent_interactions, archive older to archival memory
  3. Archive historical data: Move old information to archival memory
  4. Consolidate with memory_rethink: Summarize and rewrite block

See references/size-management.md for strategies.

Concurrency Patterns

When multiple agents share memory blocks or an agent processes concurrent requests:

Safest operations:

  • memory_insert: Append-only, minimal race conditions
  • Database uses PostgreSQL row-level locking

Risk of race conditions:

  • memory_replace: Target string may change before write
  • memory_rethink: Last-writer-wins, no merge

Best practices:

  • Design for append operations when possible
  • Use memory_insert for concurrent writes
  • Reserve memory_rethink for single-agent exclusive access

Consult references/concurrency.md for detailed patterns.

Validation Checklist

Before finalizing your agent design:

Architecture:

  • Does the architecture match the model's capabilities?
  • Is the model appropriate for expected workload and latency requirements?

Memory:

  • Is core memory total under 80% of context window?
  • Is each block focused on one functional area?
  • Are descriptions clear about when to read/write?
  • Have you planned for size growth and overflow?
  • If multi-agent, are concurrency patterns considered?

Tools:

  • Are tools necessary and properly configured?
  • Are memory blocks granular enough for effective updates?

Common Antipatterns

Too few memory blocks:

yaml
# Bad: Everything in one block
agent_memory: "Agent is helpful. User is John..."

Split into focused blocks instead.

Too many memory blocks: Creating 10+ blocks when 3-4 would suffice. Start minimal, expand as needed.

Poor descriptions:

yaml
# Bad
data: "Contains data"

Provide actionable guidance instead. See references/description-patterns.md.

Ignoring size limits: Letting blocks grow indefinitely until they hit limits. Monitor and manage proactively.

Implementation Steps

1. Design Phase

  • Choose architecture based on requirements
  • Design memory block structure
  • Select appropriate model
  • Plan tool configuration

2. Creation Phase (SDK)

Python:

python
from letta_client import Letta

client = Letta()  # Uses LETTA_API_KEY env var

# Create agent with custom memory blocks
agent = client.agents.create(
    name="my-agent",
    model="openai/gpt-4o",  # or "anthropic/claude-sonnet-4-20250514"
    embedding="openai/text-embedding-3-small",
    memory_blocks=[
        {"label": "persona", "value": "You are a helpful assistant..."},
        {"label": "human", "value": "User preferences and context..."},
        {"label": "project", "value": "Current project details..."},
    ],
    description="Agent for helping with X",
)
print(f"Created agent: {agent.id}")

TypeScript:

typescript
import Letta from "letta-client";

const client = new Letta();

const agent = await client.agents.create({
  name: "my-agent",
  model: "openai/gpt-4o",
  embedding: "openai/text-embedding-3-small",
  memoryBlocks: [
    { label: "persona", value: "You are a helpful assistant..." },
    { label: "human", value: "User preferences and context..." },
    { label: "project", value: "Current project details..." },
  ],
  description: "Agent for helping with X",
});
console.log(`Created agent: ${agent.id}`);

Note: Letta Code CLI (letta command) creates agents interactively. Use letta --new-agent to start fresh, then /rename and /description to configure.

3. Testing Phase

  • Test with representative queries
  • Monitor memory tool usage patterns
  • Verify tool calling behavior

4. Iteration Phase

  • Refine memory block structure based on actual usage
  • Optimize system instructions
  • Adjust tool configurations

References

For detailed information on specific topics, consult the reference materials:

  • references/architectures.md - Architecture comparison and selection
  • references/memory-architecture.md - Memory types and when to use them
  • references/memory-patterns.md - Domain-specific memory block examples
  • references/description-patterns.md - Writing effective block descriptions
  • references/size-management.md - Managing memory block size limits
  • references/concurrency.md - Multi-agent memory sharing patterns
  • references/model-recommendations.md - Model selection guidance
  • references/tool-patterns.md - Common tool configurations

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Letta Development Guide AI skill do?

Comprehensive guide for developing Letta agents, including architecture selection, memory design, model selection, and tool configuration. Use when building or troubleshooting Letta agents.

Why use Letta Development Guide on TypingMind?

Because you install it once and use it with any model. Letta Development Guide is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Letta Development Guide in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/letta-ai/skills/tree/main/letta/agent-development. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Letta Development Guide?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Letta Development Guide?

As many as you like. As long as a model supports skills, you can use Letta Development Guide with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Letta Development Guide AI skill free?

Yes. It is published on GitHub by letta-ai under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇