Skip to content

feat: AgentCore tool search plugin for Strands Agents#494

Open
senthilkumarmohan wants to merge 2 commits into
aws:mainfrom
senthilkumarmohan:feat/agentcore-tool-search
Open

feat: AgentCore tool search plugin for Strands Agents#494
senthilkumarmohan wants to merge 2 commits into
aws:mainfrom
senthilkumarmohan:feat/agentcore-tool-search

Conversation

@senthilkumarmohan
Copy link
Copy Markdown

Description of changes:

This pull request introduces the AgentCore Tool Search Plugin for Strands Agents, enabling dynamic semantic tool discovery from AgentCore Gateway based on conversation intent.

AgentCore Tool Search Plugin:

  • Added AgentCoreToolSearchPlugin that hooks into before_invocation to derive user intent from conversation history, search the gateway via x_amz_bedrock_agentcore_search, and dynamically register matching tools into the agent. (src/bedrock_agentcore/gateway/integrations/strands/plugins/agentcore_tool_search/plugin.py)
  • Implemented IntentProvider abstract interface for pluggable intent derivation strategies. (src/bedrock_agentcore/gateway/integrations/strands/plugins/agentcore_tool_search/intent_providers/intent_provider.py)
  • Implemented DefaultIntentProvider which uses an LLM to classify the last N messages into a concise intent string, with support for explicit model override or automatic reuse of the agent's model. (src/bedrock_agentcore/gateway/integrations/strands/plugins/agentcore_tool_search/intent_providers/default_intent_provider.py)

Documentation and Examples:

  • Added a comprehensive README.md with usage examples (default and custom intent provider), architecture diagram, prerequisites, and custom intent provider guide. (src/bedrock_agentcore/gateway/integrations/strands/plugins/agentcore_tool_search/README.md)

Testing and Validation:

  • Added unit tests for the plugin and intent providers (31 tests). (tests/bedrock_agentcore/gateway/integrations/strands/test_agentcore_tool_search_plugin.py, tests/bedrock_agentcore/gateway/integrations/strands/test_intent_providers.py)
  • Added integration tests with a deployable Lambda handler for live gateway testing. (tests_integ/gateway/integrations/test_agentcore_tool_search_plugin.py, tests_integ/gateway/integrations/lambda_function/lambda_function.py)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

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.

1 participant