User Info (NextGen Plugin)
User Info (NextGen Plugin)
⚠️ Deprecated in favour of
MemoryPluginNextGen. This plugin keeps working unchanged; the memory plugin supersedes it with facts-over-KV, supersession-preserved history, LLM-synthesised profiles, three-principal permissions, and semantic recall.
Store user-specific preferences and context that persist across sessions and agents. Unlike other plugins, user info is user-scoped (not agent-scoped) — different agents share the same user's data.
User info entries are automatically injected into the LLM system message as markdown, so the LLM always knows the user's preferences without needing to call store_get("user_info") each turn.
Setup
import { Agent } from 'oneringai';
// Single-user app — no userId needed
const agent = Agent.create({
connector: 'openai',
model: 'gpt-4.1',
context: {
model: 'gpt-4.1',
features: { userInfo: true },
},
});
// Multi-user app — opt-in per-user isolation
const agentVariant2 = Agent.create({
connector: 'openai',
model: 'gpt-4.1',
userId: 'alice',
context: {
model: 'gpt-4.1',
features: { userInfo: true },
},
});
How It Works
- Lazy Loading — On first access (tool call or
getContent()), entries are loaded from storage into an in-memory cache - Context Injection —
getContent()renders entries as markdown in the system message. Regular user info and TODOs are shown in separate sections:### theme dark ### language en ## Current TODOs - [ ] todo_a1b2c3: Review PR for auth module (due: 2026-03-01, people: Alice) [work] Check the error handling changes - [x] todo_d4e5f6: Buy groceries (due: 2026-02-25) [personal] - Write-Through — Tool mutations (set/remove/clear) update both the in-memory cache and persist to storage immediately
- Session Persistence —
getState()/restoreState()serialize/deserialize entries for session save/load
User Info Tools
| Tool Call | Description | Permission |
|---|---|---|
store_set("user_info", key, { value, description? }) |
Store/update entry by key | Always allowed |
store_get("user_info", key?) |
Retrieve one entry by key, or all entries (key optional) | Always allowed |
store_delete("user_info", key) |
Remove a specific entry by key | Always allowed |
store_action("user_info", "clear", { confirm: true }) |
Clear all entries | Requires approval |
TODO Tools
TODOs are stored as user info entries with a todo_ key prefix. They are rendered in a dedicated "Current TODOs" checklist section in context, separate from regular user info.
| Tool | Description | Permission |
|---|---|---|
todo_add |
Create a TODO (title, description?, people?, dueDate?, tags?) |
Always allowed |
todo_update |
Update a TODO — partial updates (id, title?, description?, people?, dueDate?, tags?, status?) |
Always allowed |
todo_remove |
Delete a TODO by id | Always allowed |
TODO fields:
title(required) — short description of the taskdescription(optional) — additional detailspeople(optional) — other people involved besides the current userdueDate(optional) — deadline inYYYY-MM-DDformattags(optional) — categorization tags (e.g.["work", "urgent"])status—'pending'or'done'
Agent behavior (built into plugin instructions):
- Proactive creation — When conversation implies an action item, the agent suggests creating a TODO. Explicit requests like "remind me" or "track this" create one immediately.
- Daily reminders — Once per day, the agent reminds about overdue and soon-due items (within 2 days). Uses a
_todo_last_remindedinternal entry to avoid repeating. - Auto-cleanup — Completed TODOs older than 48 hours are automatically removed. Pending TODOs overdue by more than 7 days prompt the user: "Still relevant or should I remove it?"
Storage
- Default path:
~/.oneringai/users/<userId>/user_info.json(defaults to~/.oneringai/users/default/user_info.json) - Custom storage: Implement
IUserInfoStorageand pass via config orStorageRegistry
// Via StorageRegistry
StorageRegistry.set('userInfo', (context?: StorageContext) => {
return new MongoUserInfoStorage(collection);
});
Configuration
interface UserInfoPluginConfig {
storage?: IUserInfoStorage; // Custom storage backend
maxTotalSize?: number; // Default: 100000 (~100KB)
maxEntries?: number; // Default: 100
userId?: string; // Auto-set from AgentContextNextGen._userId
}
Differences from Other Plugins
| PersistentInstructions | UserInfo | InContextMemory | |
|---|---|---|---|
| Scope | Agent-scoped | User-scoped | Session only |
| Storage key | agentId |
userId |
None (in memory) |
| Persists to disk | Yes | Yes | No |
| In system message | Yes | Yes | Yes |
| Value type | string |
unknown (any JSON) |
unknown (any JSON) |
Use Cases
- User preferences: theme, language, timezone, notification settings
- User context: role, location, department
- Accumulated knowledge about the user
- Profile information the LLM should always have access to
- TODO tracking: tasks with deadlines, involved people, and tags — with proactive reminders and auto-cleanup
⚠️ Deprecated in favour of the Self-Learning Memory plugin below.
UserInfoPluginNextGenkeeps working unchanged; the memory plugin supersedes it with append-only facts (history preserved via supersession), LLM-synthesised profiles that evolve with new observations, three-principal permissions, and semantic recall.