Auto-maintained entity profiles aggregated from memory and knowledge.
A profile is a computed view over the memory store for a given entity – typically a user. It aggregates the entity's most relevant attributes, preferences, and active instructions into a structured object that can be injected directly into an LLM system prompt.
Profiles are not a separate store. They are assembled on demand from the same attribute, instruction, and knowledge tables that back all other Spectron operations. There is no synchronisation lag and no risk of a profile drifting out of step with the underlying data.
Sections
A profile is divided into four sections, each drawing from a different category of memory.
static contains the entity's stable biographical and organisational facts – identity-category attributes and any resolved authoritative knowledge. These change rarely and carry no decay.
dynamic contains the entity's recent situational context – context-category attributes from the current and recent sessions. This section reflects what the entity is doing right now.
preferences contains knowledge-category attributes that describe how the entity likes things to work. Editor preferences, communication style, tool choices, and opinion-based attributes appear here.
instructions contains all active instruction records scoped to this entity. These are directives the entity or a managing principal has given about how the agent should behave.
print(profile.static)# list of {"key": ..., "value": ...} print(profile.dynamic)# list of {"key": ..., "value": ...} print(profile.preferences)# list of {"key": ..., "value": ...} print(profile.instructions)# list of {"label": ..., "description": ...}
constsystemPrompt=`You are a helpful assistant.\n\n${formatProfile(profile)}`;
Scope filtering
Scope controls which attributes and instructions appear in the profile. A profile requested at org scope will include attributes scoped to the org but not those scoped to individual users within it. A profile requested at user scope includes both.
# Org-level profile – no user-specific memory org_profile=awaitmemory.profile(scope={"org": "acme"})
This means you can build different profile shapes for different agent roles. A customer-facing agent that works with a specific user receives a full user profile. An org-level administrative agent receives only org-scoped context without any individual user's personal data.
Profile versus context
Profiles and context queries serve overlapping but distinct purposes.
memory.context() is query-driven: you describe what you need to know and Spectron retrieves the most relevant attributes for that query. Use it when the agent's question determines what memory is relevant.
memory.profile() is entity-driven: you request everything Spectron knows about an entity, organised by category. Use it when you want a comprehensive briefing on a user at the start of a session, before any specific query has been issued.
In practice, many integrations combine both: inject the profile at the start of the system prompt for background context, then call memory.context() at query time to surface specific relevant memories.