AgentExecutionContext
NexusLabs.Needlr.AgentFramework¶
NexusLabs.Needlr.AgentFramework.Context¶
AgentExecutionContext Class¶
Default implementation of IAgentExecutionContext. Immutable record that carries user identity, orchestration ID, an optional workspace, and an extensible property bag.
public sealed record AgentExecutionContext : NexusLabs.Needlr.AgentFramework.Context.IAgentExecutionContext, System.IEquatable<NexusLabs.Needlr.AgentFramework.Context.AgentExecutionContext>
Inheritance System.Object 🡒 AgentExecutionContext
Implements IAgentExecutionContext, System.IEquatable<AgentExecutionContext>
Constructors¶
AgentExecutionContext(string, string, IReadOnlyDictionary<string,object>, IWorkspace) Constructor¶
Default implementation of IAgentExecutionContext. Immutable record that carries user identity, orchestration ID, an optional workspace, and an extensible property bag.
public AgentExecutionContext(string UserId, string OrchestrationId, System.Collections.Generic.IReadOnlyDictionary<string,object>? Properties=null, NexusLabs.Needlr.AgentFramework.Workspace.IWorkspace? Workspace=null);
Parameters¶
UserId System.String
The user identity for the current orchestration.
OrchestrationId System.String
Correlation ID for the current orchestration run.
Properties System.Collections.Generic.IReadOnlyDictionary<System.String,System.Object>
Extensible property bag for consumer-specific data.
Workspace IWorkspace
Optional workspace for agent file operations. Stored in Properties under the IWorkspace type key so it is accessible via GetWorkspace(this IAgentExecutionContext).
Properties¶
AgentExecutionContext.OrchestrationId Property¶
Correlation ID for the current orchestration run.
Implements OrchestrationId
Property Value¶
AgentExecutionContext.Properties Property¶
Extensible property bag for consumer-specific data.
Implements Properties
Property Value¶
System.Collections.Generic.IReadOnlyDictionary<System.String,System.Object>
AgentExecutionContext.UserId Property¶
The user identity for the current orchestration.
Implements UserId
Property Value¶
AgentExecutionContext.Workspace Property¶
Optional workspace for agent file operations. Stored in Properties under the IWorkspace type key so it is accessible via GetWorkspace(this IAgentExecutionContext).
Property Value¶
Explicit Interface Implementations¶
NexusLabs.Needlr.AgentFramework.Context.IAgentExecutionContext.Properties Property¶
Gets an extensible property bag for consumer-specific data (workspace, tenant, etc.).
System.Collections.Generic.IReadOnlyDictionary<string,object> NexusLabs.Needlr.AgentFramework.Context.IAgentExecutionContext.Properties { get; }
Implements Properties
Remarks¶
Framework code never reads from this bag. It exists so consumers can attach domain-specific data to the context without creating a custom IAgentExecutionContext implementation.
Implementations should return a read-only dictionary. Mutability (if needed) should be handled by creating a new context with updated properties.