Skip to content

Refactors agent activity system#107

Merged
sfmskywalker merged 6 commits intorelease/3.6.0from
feat/activity-host
Dec 28, 2025
Merged

Refactors agent activity system#107
sfmskywalker merged 6 commits intorelease/3.6.0from
feat/activity-host

Conversation

@sfmskywalker
Copy link
Member

Refactors the agent activity system for simplification and consistency:

  • Renames classes and dependencies (e.g., ConfiguredAgentActivity to AgentActivity, ConfigurationAgentActivityProvider to AgentActivityProvider).
  • Removes code-first agent system and related abstractions, simplifying agent registration and resolution.
  • Updates Elsa package versions to 3.6.0-preview builds.
  • Adds DistributedLock dependencies.

…nce `CodeFirstAgentActivityProvider` with improved input/output handling and attributes, and simplify agent resolution and registration.
…ver`, `CodeFirstAgentActivityProvider`, `ConfigurationAgentActivityProvider`), simplifying agent registration and resolution.
…figuredAgentActivity` → `AgentActivity`, `ConfigurationAgentActivityProvider` → `AgentActivityProvider`) for simplification and consistency.
Reworked `HostMethodActivity` to support resumable workflows, improved parameter handling with pluggable value providers, and removed obsolete `AgentExecutionContext`. Enhanced method resolution, async handling, and input/output descriptor logic for better flexibility and maintainability.
Included `DistributedLock`, `DistributedLock.Postgres`, and `DistributedLock.Redis` packages in the project to support distributed locking mechanisms.
Copilot AI review requested due to automatic review settings December 28, 2025 19:43
@sfmskywalker sfmskywalker merged commit 9722da9 into release/3.6.0 Dec 28, 2025
9 of 10 checks passed
@sfmskywalker sfmskywalker deleted the feat/activity-host branch December 28, 2025 19:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the agent activity system for improved simplification and consistency. The changes modernize the agent infrastructure by removing complex code-first agent abstractions and consolidating activity providers under clearer naming conventions.

  • Removes the code-first agent system (IAgent, AgentResolver, CodeFirstAgentActivity, etc.) simplifying agent registration
  • Renames key classes for clarity: ConfiguredAgentActivityAgentActivity, ConfigurationAgentActivityProviderAgentActivityProvider, ConfigurationKernelConfigProviderKernelConfigProvider
  • Updates Elsa package versions to 3.6.0-preview builds and adds DistributedLock dependencies for Postgres and Redis

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Directory.Build.props Updates Elsa and ElsaStudio package versions to preview builds
Directory.Packages.props Adds DistributedLock.Postgres and DistributedLock.Redis package versions
src/workbench/Elsa.Server.Web/Elsa.Server.Web.csproj Adds DistributedLock package references for Postgres and Redis providers
src/modules/agents/Elsa.Agents/AgentsFeature.cs Removes AddAgent<TAgent> method that supported code-first agent registration
src/modules/agents/Elsa.Agents.Core/Services/KernelConfigProvider.cs Renames class from ConfigurationKernelConfigProvider to KernelConfigProvider
src/modules/agents/Elsa.Agents.Core/Services/AgentResolver.cs Deletes file containing code-first agent resolution logic
src/modules/agents/Elsa.Agents.Core/Options/AgentsOptions.cs Removes AgentTypes dictionary and AddAgentType method supporting code-first agents
src/modules/agents/Elsa.Agents.Core/Models/AgentExecutionContext.cs Deletes file containing context class for code-first agent execution
src/modules/agents/Elsa.Agents.Core/Features/AgentsCoreFeature.cs Updates references to renamed KernelConfigProvider and removes IAgentResolver registration
src/modules/agents/Elsa.Agents.Core/Contracts/IAgentResolver.cs Deletes interface for code-first agent resolution
src/modules/agents/Elsa.Agents.Core/Contracts/IAgent.cs Deletes interface defining code-first agent abstraction
src/modules/agents/Elsa.Agents.Activities/Handlers/RefreshActivityRegistry.cs Updates parameter name from configurationAgentActivityProvider to agentActivityProvider
src/modules/agents/Elsa.Agents.Activities/Features/AgentActivitiesFeature.cs Removes CodeFirstAgentActivityProvider and renames ConfigurationAgentActivityProvider to AgentActivityProvider
src/modules/agents/Elsa.Agents.Activities/ActivityProviders/CodeFirstAgentActivityProvider.cs Deletes file containing activity provider for code-first agents
src/modules/agents/Elsa.Agents.Activities/ActivityProviders/AgentActivityProvider.cs Renames class from ConfigurationAgentActivityProvider and updates references to AgentActivity
src/modules/agents/Elsa.Agents.Activities/Activities/CodeFirstAgentActivity.cs Deletes file containing activity implementation for code-first agents
src/modules/agents/Elsa.Agents.Activities/Activities/AgentActivity.cs Renames class from ConfiguredAgentActivity and updates XML documentation reference

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +40 to +41
<ElsaVersion>3.6.0-preview.4162</ElsaVersion>
<ElsaStudioVersion>3.6.0-preview.1345</ElsaStudioVersion>
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Elsa package versions have been changed from release candidate (3.6.0-rc1) to preview builds (3.6.0-preview.4162 and 3.6.0-preview.1345). This appears to be a downgrade in version stability, moving from a release candidate back to preview builds. Verify that this is intentional and that these specific preview builds exist and are compatible with the refactored code.

Suggested change
<ElsaVersion>3.6.0-preview.4162</ElsaVersion>
<ElsaStudioVersion>3.6.0-preview.1345</ElsaStudioVersion>
<ElsaVersion>3.6.0-rc1</ElsaVersion>
<ElsaStudioVersion>3.6.0-rc1</ElsaStudioVersion>

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants