feat: add plugin architecture (amico-plugin crate)#126
Merged
takasaki404 merged 2 commits intomainfrom Feb 6, 2026
Merged
Conversation
Introduces a plugin system covering all aspects of the agent lifecycle: - Plugin trait: core lifecycle hooks (on_start, on_shutdown) - ToolPlugin: plugins that provide tools - EventSourcePlugin: plugins that provide event streams - EventInterceptor: middleware for event handling - PluginSet: composable plugin collections - PluginRuntime: runtime with plugin support Co-authored-by: takasaki404 <193405421+takasaki404@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add plugin architecture for handling A2A events
feat: add plugin architecture (Feb 6, 2026
amico-plugin crate)
takasaki404
approved these changes
Feb 6, 2026
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.
The framework lacks an extensibility mechanism for third-party capabilities (e.g., A2A connectors, platform integrations). Agent developers shouldn't have to rewrite protocol-level infrastructure — a plugin should provide it.
New
amico-plugincrateSits between runtime and application layers. Depends on
amico-system+amico-runtime, no circular deps.Plugin— core trait with lifecycle hooks (on_start/on_shutdown), config, and identityToolPlugin— plugins that provideToolimplementations to the agentPluginSet— composable plugin collections with unified lifecycle (start_all/shutdown_all); impls for()and single-plugin tuplesPluginRuntime— extendsRuntimewith plugin managementPluginError— error enum for plugin operationsEvent-related plugin traits (in
amicocrate)These live in
amicobecause they depend on theEventtrait defined there:EventSourcePlugin— introduces new event streams into the runtime (the A2A use case)EventInterceptor— before/after middleware for event dispatch (logging, auth, metrics)Usage pattern
Follows existing conventions: traits + generics, no
Box<dyn>,impl Futurereturns, zero-cost abstractions.ARCHITECTURE.mdupdated with the new plugin layer section.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.