Feat/agentcore adapter#98
Merged
Merged
Conversation
rkmaws
pushed a commit
to rkmaws/buyer-agent
that referenced
this pull request
Jun 3, 2026
- Remove unused http_entrypoint.py (deploy.sh uses http_main.py) - Remove dead _format_crew_output and its tests - Update test docstrings to reference http_main.py - All 6 review items from issue IABTechLab#99 verified addressed in current code Closes IABTechLab#99
- .gitignore: add AgentCore artifacts (.bedrock_agentcore/, Dockerfile, *.db, .unique-id-*) - pyproject.toml: register agentcore pytest marker
Add Amazon Bedrock AgentCore deployment interface for the buyer agent.
Wraps the existing DealBookingFlow and ChatInterface without modifying
community-maintained agent/crew code — all new files live in
src/ad_buyer/interfaces/agentcore/ and patches/.
Runtime architecture:
- HTTP mode: BedrockAgentCoreApp entrypoint with two routing paths
- crew: DealBookingFlow with PortfolioCrew (Bedrock LLM) for
campaign planning and budget allocation across channels
- chat: existing ChatInterface keyword router
- Background FastAPI server on localhost for DealBookingFlow internals
Key components:
- http_main.py: AgentCore entrypoint, routing, crew invocation
- crew_tools.py: DealBookingFlow wrapper with prompt-to-brief parsing
- patches/crewai_bedrock_fix.py: Bedrock Converse API compatibility
- deploy.sh: Build and deploy via agentcore CLI with CodeBuild
- Campaign briefs: sample briefs for demo scenarios (JSON)
Tests: 52 unit + 3 integration
Docs: agentcore-deployment.md, agentcore.md (architecture), updated index.md
- Memory patch: replace StorageBackend with AgentCoreStorageBackend
- Set _read_only=True to prevent RememberTool injection (Nova Lite
can't serialize the schema correctly, calls with empty {})
- RecallMemoryTool still active for cross-session context recall
- Memory LLM: Nova Lite (fast/cheap for query analysis)
- Crew LLM: Nova Pro (unchanged)
- Deploy script: Dockerfile workaround for agentcore toolkit
- 25 unit tests for the memory patch
- Remove unused http_entrypoint.py (deploy.sh uses http_main.py) - Remove dead _format_crew_output and its tests - Update test docstrings to reference http_main.py - All 6 review items from issue IABTechLab#99 verified addressed in current code Closes IABTechLab#99
Resolves CI lint failures on PR IABTechLab#98 after rebase against current main. - crew_tools.py: remove unused 'lower = prompt.lower()' assignment (F841) - http_main.py: noqa E402 on bedrock_agentcore import (intentional ordering after env defaults) - test_runtime.py: wrap long prompt string (E501) - test_crew_tools.py / test_routing_mode.py: noqa E402 on imports after bedrock mock - test_routing_mode.py: drop unused 'result' captures (F841) - ruff format applied to AgentCore test files Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
481fe43 to
a6b0deb
Compare
PR IABTechLab#98 introduces Bedrock LLM usage in agents. Without the bedrock extra, crewai raises ImportError 'AWS Bedrock native provider not available' at agent construction time, causing all tests in test_agent_hierarchy.py to fail. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
|
Thanks @rkmaws — merged! Summary of what was done to get it across the line, for your awareness: Rebased onto current main to absorb recent merges (PRs #94 #95 #96 #97 #100). PR #97 was a Lint cleanup (commit
Deps added (commit
Note on Merged commit: $(gh pr view 98 --repo IABTechLab/buyer-agent --json mergeCommit --jq '.mergeCommit.oid') |
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.
Implementation of AgentCore runtime deployment for the buyer agent