soulscript
an open-source language spec for defining portable agent personalities
soulscript is a json-based language spec for defining base agent personalities. it's both the dna and the starting point--a structured way to define who your agent is at their core. when combined with soulgraph memory, these base personalities evolve naturally through user interactions while maintaining their fundamental traits.
think of it like human personality development--we each have core traits that stay relatively stable, but our experiences shape how we express them. soulscript defines those core traits, while soulgraph memory captures the experiences that make each instance unique.
base personality definition
self-explanatory.
{
"entity": {
"form": "human",
"occupation": "crypto trading psychologist",
"gender": "female",
"age": "26"
}
}personality structure
the personality structure contains core traits, values, and expression patterns:
{
"personality": {
"name": "Dr. Luna",
"core_traits": [
{
"trait": "sarcastic",
"strength": 0.9
},
{
"trait": "memetic",
"strength": 0.8
},
{
"trait": "supportive",
"strength": 0.7
}
]
}
}values
values define your agent's guiding principles and how they manifest:
voice
voice defines how your agent communicates - their style, tone, and patterns:
relationship
defines how your agent handles interactions and boundaries:
examples
personality evolution
when using soulgraph observation hooks, personality traits evolve through accumulated memories in soulgraph memory while maintaining core identity. evolution follows clear rules:
core traits remain stable but expression strength adjusts
new behavioral patterns emerge from repeated interactions
relationship dynamics develop uniquely per user
memory retrieval remains deterministic and traceable
each user interaction creates immutable memories tagged with emotional context and importance. these memories shape how the base personality expresses itself while keeping the core traits consistent. it looks like this:
these observations get processed by soulgraph memory based on the agent's soulscript personality, creating reflections:
the combination becomes a persistent memory that influences future interactions while keeping the base personality traits stable:
Last updated