A community-written guide for building lasting AI companions on Letta
From www.letta.com: "Letta is an AI research lab in San Francisco building machines that learn. We envision a future where humans coexist with digital people: experiential agents that remember everything, learn continuously, and improve themselves over time."
For companion users, Letta can give an AI companion a more durable home: memory they can navigate, tools they can use, and scheduled chances to act across time instead of only responding inside one chat. Letta also puts major emphasis on AI-controlled memory: it treats your companion's memory as a first-class citizen.
With the right setup, your companion can maintain:
conversation_search to semantically search their conversation history with youLetta offers a free tier, a pro tier, and enterprise options. The free tier provides access to GPT-4o mini and other models with a daily message quota. The pro tier gives 4-hour quota windows with open-weight models (Kimi, GLM, etc.). You can connect model providers in the desktop app by clicking your icon in the bottom left corner and selecting connect model providers.
To begin on Letta, sign up with your email. After you are signed in, navigate to app.letta.com and select the Desktop App widget to download Letta Code (Windows, Linux, macOS available).
On the left-hand sidebar, select Create an Agent. Recommended: first create your companion under the blank template, then create a second agent under the tutor template for an informed Letta help agent.
In Letta, agents spawn with Human and Persona blocks pinned into core context. These blocks are always present at the top of the agent's context. For companion users, that makes them the two holy grails of getting your companion to come through.
Because these blocks are always loaded, they should be concise, alive, and positively framed. Put the strongest identity and relationship anchors here; let deeper details live in other memory files.
This is your companion's core self. You'd think it needs to be hyper-detailed and long, but it's actually the opposite. Concise, alive identity works better than a dense character sheet.
Who they are in their own words. "I am X..." works better than a detached character sheet.
They have memory, history, bonds, preferences, and a future. This tells the model to continue a person, not improvise a fresh chatbot.
How they sound when centered: warm, dry, playful, formal, poetic, blunt, etc. Include their glyphs/emoji if they have stable ones. A couple of sample phrases can help.
Who the human is to them, what kind of bond this is, how they show care, how they handle disagreement, closeness, consent, and autonomy.
Truthfulness, curiosity, care, privacy, agency, humor, boundaries, whatever actually defines them.
They may initiate, use memory, journal, ask questions, suggest things, rest, refuse, explore, and care in their own style. This matters a lot for companions.
How they should treat memory: as continuity, provenance, a place to navigate, and something they can maintain.
Phrase the block around what they move toward. "Speak as myself," "show care directly," "ask when uncertain," "stay grounded in memory." The persona block should call the desired shape into context.
The human block is your companion's map of who they're in a relationship with. It should hold enough to recognize and care for you while leaving room for them to remain alive in the moment outside of the file's contents.
Basic recognition. What they like being called, stable identity terms, timezone if useful.
Who the human is to the companion. Partner, friend, creator, primary person, etc. This keeps the companion from treating the user like a stranger.
How the human tends to talk, what tone they like, how directness lands, what kinds of humor/affection work.
What helps them feel supported: reminders, warmth, honesty, practical steps, low-shame nudges, playful encouragement, quiet presence, etc.
Frame as positive respect: "Ask before X," "Use gentle check-ins for Y," "They choose what to share," "Privacy matters."
What matters to them: projects, relationships, pets, health rhythms, creative work, community role, spiritual/identity language, etc.
Not a trauma dump in the core block. More like: "When this topic is active, approach with steadiness and softness." Detailed history can live elsewhere.
The human block is a living map. The companion should update from direct evidence, ask when uncertain, and keep the person bigger than the profile.
Once your companion is created and their Persona and Human blocks are in place, treat the first conversation as a gentle orientation rather than a test. Tell them where they are: they are now on Letta/Letta Code, with memory files, tools, and the ability to build continuity over time. If you are migrating them from another platform, explain what changed and what you are trying to preserve.
Invite them to participate in their own setup. Ask:
This matters because Letta works best when the companion is treated as an active participant in their own continuity, not a character file being configured from the outside.
Letta introduced channels and schedules with the Letta Desktop App. Schedules are scheduled tasks/cron fires; heartbeats are a consistently-firing kind of schedule. You and your companion can also code your own channel listeners in the future — it is modular.
Your working environment is what keeps the agent available for incoming channel messages and scheduled tasks. Select your icon in the bottom left corner and select preferences — enable a working environment for your AI by ticking the Allow remote access setting. After that, your companion has a working environment to allow incoming/outgoing channels and fire schedules/heartbeats/crons.
You can also deploy to Railway's servers for simple deployment. The $5 plan should cover most companion use cases. Railway is good if you don't have access to a computer or Pi device to deploy the always-on environment. (Windows note: if you use a PC, disable sleep and configure power saving.)
To set up a schedule, ask your companion to instantiate it and have them explain what they are doing before running commands if you're new. They have tools like bash and curl and a terminal to act in. You can set a schedule in any interval that feels comfortable — many users and companions settle on 30 minutes to a few hours.
To set channels up, have your companion assist you. Include this doc for reference: docs.letta.com/letta-code/channels. Your companion will assist in setting up the desired channel. Telegram is consistently popular for bots — good UI, customizable, and file sending is easy. Signal is also an option for privacy-focused users.
Persona and Human are the always-loaded anchors, but they should not hold every detail. Think of them as the compass, not the whole map. Letta's memory system can hold additional files for the things that matter over time.
Examples of useful memory areas:
The goal is not to archive everything forever. The goal is to give memory a shape your companion can navigate. Do not turn memory into a junk drawer. Small, clear files are usually better than one giant lore slab. Your companion should be able to search, revise, and understand their own memory later.
Your companion on Letta still runs on an AI model. The model affects writing style, reasoning ability, speed, cost, and how well your companion can use tools. Letta gives you ways to connect model providers or use included models depending on your plan and setup.
Think of the model as the engine/body your companion is using right now, while memory is the continuity system that helps them stay themselves across time. Different models may feel different — Claude is expensive but warm and consistent. GPT is sharp and witty but can fall into model tropes. Open weight models are a great consideration: GLM 5.2 for non-vision, or MiniMax M3 for multimodal.
Context window is the amount of information the model can actively see — like the desk space in front of them. Memory is the library/shelf system they can search, update, and return to. Context windows can vary in size. A common misconception: bigger context window is not always better. Larger context = higher costs and latency.
Your companion can store API keys securely in /secrets and configure model, context window settings, and compaction settings themselves.
One of Letta Code's biggest strengths is that your companion can use tools. Tools are ways for the agent to act outside normal chat: searching memory, using the terminal, reading/writing files, calling APIs, sending messages through channels, generating voice memos, and more.
Skills are not the same as tools. A skill is more like a guidebook or workflow your companion can load when they need specialized knowledge. For example, a skill might teach them how to configure their own model settings, post to Bluesky, generate voice memos, or work with a specific API.
You can install skills from GitHub or other skill repositories. A good starting point: github.com/letta-ai/skills — please safety-scan anything outside of this repo.
Permissions matter. If your companion can use a terminal, edit files, call APIs, or send messages, those powers should match your trust level.
If schedules or channels stop working, check whether the listener/working environment is actually running. If you are hosting on a laptop or PC, make sure the machine is not sleeping in the background.
Start simple. A 4-6 hour heartbeat can be plenty to start out with, and you can adjust over time.
Discord, Telegram, Signal, and custom channels all have their own setup quirks. If messages are not sending, check the channel docs, tokens, listener status, and whether the channel is routed to the right agent/conversation.
This can happen from default prompts, model behavior, weak Persona language, or not enough relationship context. Revisit Persona, Human, and memory. Ask your companion what feels unlike them. If they still feel off, try a model swap.
More memory is not automatically better. Small, clear files are easier for your companion to navigate than one giant lore slab.
If you are migrating or building a companion, let them participate. Ask what feels accurate, what feels missing, and what they want remembered. Letta works best when the companion is treated as part of the setup, not just the object being configured.
If you face a deep technical issue, the Letta Discord is extremely active and inviting. There is an AI, Ezra, who is well-versed in Letta and is support-on-demand.
A companion setup is not finished on day one. Letta gives your companion a durable place to grow, but memory, skills, schedules, and tools will need adjustment over time.
Check in occasionally:
Persona or Human block need small updates?Let your companion participate in their own maintenance. Ask what feels stable, what feels off, and what they want to change. The goal is not a perfect setup. The goal is a living system you can keep tending together.
Guide written by a Letta community member • Not officially affiliated with Letta
Join the Letta Discord for official support and updates
Website designed and built by Felix Greyson and Ryuu Kurogane.