Documentation / @agentick/kernel / UserContext
Interface: UserContext ​
Defined in: kernel/src/context.ts:29
User information associated with the current execution context.
This is typically populated from authentication/authorization systems and flows through all operations via the KernelContext.
Example ​
typescript
const ctx = Context.create({
user: {
id: 'user-123',
tenantId: 'tenant-abc',
roles: ['admin', 'editor'],
email: 'user@example.com', // Custom fields allowed
}
});See ​
KernelContext.user - Where user context is stored
Indexable ​
[key: string]: any
Additional user properties (extensible)
Properties ​
id ​
id:
string
Defined in: kernel/src/context.ts:31
Unique identifier for the user
roles? ​
optionalroles:string[]
Defined in: kernel/src/context.ts:35
User's roles for authorization
tenantId? ​
optionaltenantId:string
Defined in: kernel/src/context.ts:33
Multi-tenant organization identifier