Orion Forge

How to give your AI a persistent personality across sessions

A language model doesn't remember who it is. It only knows what you send it this turn, so a lasting identity has to be something your system rebuilds, every time.

Orion Forge · November 6, 2026 · 5 min read

Short answer: AI models keep nothing between requests, so a persistent personality has to come from your system. Store the character's identity outside the chat, send it again on every turn, keep the agent's memories in a separate store it can write to, and don't give it any way to edit its own identity.

A model API call has no past, which is also why AI forgets what you said. Between requests, nothing about your character is kept unless you store it and send it again. The memory features in consumer chat apps are that same trick, done for you.

That's good news. It means identity is an engineering problem, and you control the inputs. You need to decide what gets sent, in what order, and what is allowed to change. Here are the seven decisions that matter most.

1. Decide what can never change

Most failed personas never made this decision. Everything sits in one prompt or one memory store, so everything is equally open to change. Sort your character into two groups:

IdentityExperience
ContainsValues, boundaries, voice, origin, how it makes decisionsEvents, user preferences, project notes, journal entries
Who writes itYou, the creatorThe agent, as it goes
How it changesRarely, and on purposeConstantly, including pruning
If they conflictIdentity winsGets reinterpreted or dropped

A quick test for any fact: if this were deleted, would the agent be a different character, or just one who'd forgotten something? The first belongs in identity, the second in experience.

2. Store them separately

Separation has to be enforced by the system, not requested in a prompt. "Never change your core values" is only a request. An agent with no way to write to its identity store is a guarantee.

Diagram of dual memory: a read-only identity store beside a dynamic memory store for life experience

The SoulScript Engine calls this dual-FAISS memory: one search index for soul scripts, another for the memory vault. You don't need FAISS for the idea to work. Two tables with different write permissions do the same job. What counts is that the agent's write path only reaches one of them.

3. Rebuild the prompt on every turn

Don't rely on identity surviving in the chat history. Assemble it fresh for each request, most important material first, so nothing depends on what happened earlier in the conversation:

# A sketch: search(), core_prompt and the like stand in for your own storage.
def build_request(agent, history, user_message, history_budget=30_000):
    system = "\n\n".join([
        agent.core_prompt,                          # always sent, in full
        agent.identity.search(user_message, k=5),   # relevant soul script sections
        agent.pinned_knowledge,                     # always-on facts
        agent.memories.search(user_message, k=5),   # relevant experience
    ])

    # Walk backward from the newest message and stop when the budget runs out.
    recent = []
    for message in reversed(history):
        if len(message["content"]) > history_budget:
            break
        history_budget -= len(message["content"])
        recent.insert(0, message)

    return system, recent + [{"role": "user", "content": user_message}]

Notice what the budget applies to: chat history gets cut, identity doesn't. A chat of a thousand messages sends the same core prompt as a chat of one.

4. Pin what must always be there

Semantic search retrieves what looks similar to the current message, and that creates a trap. A user who slowly steers a character toward a boundary may never use words resembling that boundary, so the section that matters is never retrieved.

So split identity by how it's delivered:

Keep the pinned part short. Everything in it costs tokens on every turn, and a shorter list of rules is easier to follow than a long one.

5. Be strict about what gets saved

Writable memory is how identity leaks back in. The agent's own summaries return later as facts, so a few rules go a long way:

Treat anything that came from a user or a web page as untrusted input. A saved memory is effectively a future prompt, so it deserves the same caution as any other prompt injection risk.

6. Version the identity

Keep identity files in version control, or hash each section, so you can answer "what changed since it last felt right?". In the engine, a manifest records a SHA-256 hash for every soul script section and can list what was added, removed or changed.

7. Let it grow, with you holding the pen

A character that can never change gets flat, and it's the most common objection to all of the above. Growth and stability are compatible once you split them into two speeds:

People work a little like this. Your week changes what you know much faster than it changes who you are. The review step is what makes the difference between growth and drift: growth is a change you chose.

A checklist

Retention isn't consciousness. All of this makes a character consistent. It doesn't settle any deeper questions about what the system is, and it's better not to imply otherwise to your users.

How Orion Forge works, in 72 seconds