Agent Team v2: Self-Improving Closed Loop, Performance Optimization & Deploy Pipeline#10
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rever Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a new method that resolves agent interfaces by their AgentDisplayName static virtual property (case-insensitive), enabling lookup by human-readable names like "Shell" or "dotnet". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…to Orchestrate Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- IThread instructions now explicitly route dotnet build/run/publish to Shell - DotNet reserved for structured operations (test with filters, format) - DotNetAgent.BuildAsync resolves directory paths to .csproj/.sln automatically - FindSolutionPath now falls back to .csproj when no .sln exists - Reverted DotNet from [Llm<Fast>] to default — Nano too weak for tool reasoning Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…oop, prompt engineering Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…s for all agents Add System.ComponentModel [Description] attributes to all tool methods on IDotNet, IShell, IGit, and IFileSystem interfaces so the LLM receives precise per-tool context. Replace flat AgentInstructions strings with Identity → Rules → Reference three-layer structure on all four interfaces. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extends IDotNet interface with RunAsync (120s timeout, kills process tree on timeout) and ListProjectsAsync (synchronous directory enumeration of .csproj/.sln/.slnx). Adds using IAW.Agents.System to both files to resolve CommandResult. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds RestartResourceAsync, ListResourcesAsync, GetTracesAsync, and GetLogsAsync typed interface methods to IAspire/AspireAgent, backed by Aspire MCP CallToolAsync calls. Switches agent to Sonnet46 model and updates AgentInstructions with deployment-focused rules. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ent, self-improvement flow Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…inutes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…strator Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New agent in IAW.Agents.Fun namespace:
- IEmoji interface with TranslateAsync method
- EmojiAgent uses Claude 4.5 Haiku for fast emoji translation
- Registered and discoverable via AgentInterfaceResolver
- Thread routes to it via SendToAgent("Emoji", ...)
Verified: ☕💻🌅😍✨🎉
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This reverts commit c4537f5.
…rdcoded pipeline Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… logic Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds POST /deploy to IAW.MCP that runs dotnet build IAW.slnx, parses output via DeployVerifier, and reverts via git checkout on failure. 5-minute timeout. Stop/start of the assistant is handled by the Aspire agent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- DeployAsync stops assistant, POSTs to MCP /deploy to rebuild, then starts with fresh binary - deploy-verify DurableJob fires 60s after activation to check all resources are Running - Added Microsoft.Extensions.Http package reference to Agents.csproj for IHttpClientFactory - Updated IAspire instructions: Deploy for code changes, RestartResource for simple restarts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Updated SelfImproveAsync prompt to direct the agent to call Aspire Deploy (which stops, rebuilds, and starts fresh) rather than RestartResource when deploying code changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…oji agent Remaining changes from IAW self-improvement testing: - EmojiAgent created by IAW (IEmoji.cs + EmojiAgent.cs in src/Agents/Fun/) - DeployEndpoint.cs fixed by IAW to build assistant project only - IAW-modified files from self-improvement iterations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…oint Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…spire SDK
Removed:
- /deploy endpoint in MCP server (wrong approach)
- DeployVerifier + tests (only needed for endpoint)
- EmojiAgent files (IAW-created, will be recreated via proper deploy)
- Deploy plans (superseded by Aspire SDK approach)
Cleaned:
- AspireAgent.DeployAsync → TODO stub (will use Aspire WithCommand)
- Removed IHttpClientFactory dependency from AspireAgent
- Removed Microsoft.Extensions.Http package from Agents.csproj
- MCP Program.cs cleaned of deploy endpoint registration
- SelfImprove prompt simplified
The self-improving deploy will be redesigned using:
- Aspire SDK WithCommand("deploy") in AppHost
- ResourceCommandService for stop→build→start
- WithExplicitStart() for shadow test instances
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…scriptions Critical: - C1: Cache AgentInterfaceResolver.ScanInterfaces() to avoid full assembly scan on every SendToAgent call - C2: Fix misleading CleanLogsAsync description (it reads logs, doesn't clean) Important: - I1: Fix DeployAsync description to not claim rebuild capability (TODO stub) - I3: Remove deploy-verify job from OnActivateAsync (only schedule from DeployAsync) - I4: Add Aspire to error message's available agents list Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
Code reviewFound 3 issues:
IAW/src/Agents/Orchestration/CodeOrchestratorAgent.cs Lines 542 to 557 in f00dedd
IAW/src/Agents.CSharp/DotNet/DotNetAgent.cs Lines 112 to 118 in f00dedd
IAW/src/Agents/Orchestration/ThreadAgent.cs Lines 114 to 117 in f00dedd 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
…, remove dead code Review fixes: - Remove SelfImprove tool from ThreadAgent — self-improvement will be a separate agent - Remove self-improvement references from IThread instructions - Fix DotNetAgent.RunAsync stdout/stderr deadlock — use Task.WhenAll for concurrent reads - Fix TryDeterministicFix dead "add_using_system" — return null to trigger LLM retry - Cache AgentInterfaceResolver scan results (from earlier commit) Self-improvement loop will be properly designed as a dedicated agent with Aspire SDK. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Agent team redesign with performance optimization. 88% token reduction for simple tasks via direct agent routing that bypasses CodeOrchestrator.
Agent Team Redesign
[Description]attributes on all 15+ interface methodsPerformance Optimization
Bug Fixes
Self-Improvement Foundation (partial — deploy via Aspire SDK planned separately)
WithCommand("deploy")+ResourceCommandServicePerformance Impact
Test plan
dotnet build IAW.slnx— 0 errorsdotnet test test/Core.Tests— 409 passed (2 pre-existing failures)🤖 Generated with Claude Code