Skip to content

Commit 62bc837

Browse files
committed
Updated error analyzer tools
1 parent 82bb4c6 commit 62bc837

File tree

6 files changed

+196
-213
lines changed

6 files changed

+196
-213
lines changed

lib/idp_common_pkg/idp_common/agents/error_analyzer/agent.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515

1616
from ..common.strands_bedrock_model import create_strands_bedrock_model
1717
from .tools import (
18-
dynamodb_query,
19-
dynamodb_record,
20-
dynamodb_status,
18+
fetch_document_record,
19+
fetch_recent_records,
2120
lambda_lookup,
2221
search_cloudwatch_logs,
2322
stepfunction_details,
@@ -51,9 +50,8 @@ def create_error_analyzer_agent(
5150
# Create agent with specific tools - let LLM choose directly
5251
tools = [
5352
search_cloudwatch_logs,
54-
dynamodb_record,
55-
dynamodb_status,
56-
dynamodb_query,
53+
fetch_document_record,
54+
fetch_recent_records,
5755
lambda_lookup,
5856
stepfunction_details,
5957
xray_trace,

lib/idp_common_pkg/idp_common/agents/error_analyzer/tools/__init__.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515

1616
from .cloudwatch_tool import search_cloudwatch_logs
1717
from .dynamodb_tool import (
18-
dynamodb_query,
19-
dynamodb_record,
20-
dynamodb_status,
18+
fetch_document_record,
19+
fetch_recent_records,
2120
)
2221
from .lambda_tool import lambda_lookup
2322
from .stepfunction_tool import stepfunction_details
@@ -29,9 +28,8 @@
2928
__all__ = [
3029
"search_cloudwatch_logs",
3130
"lambda_lookup",
32-
"dynamodb_record",
33-
"dynamodb_status",
34-
"dynamodb_query",
31+
"fetch_document_record",
32+
"fetch_recent_records",
3533
"stepfunction_details",
3634
"xray_trace",
3735
"xray_performance_analysis",

lib/idp_common_pkg/idp_common/agents/error_analyzer/tools/cloudwatch_tool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from strands import tool
1616

1717
from ..config import create_error_response, safe_int_conversion
18-
from .dynamodb_tool import dynamodb_record
18+
from .dynamodb_tool import fetch_document_record
1919
from .models import LogEvent
2020
from .xray_tool import extract_lambda_request_ids
2121

@@ -238,7 +238,7 @@ def _get_document_context(document_id: str) -> Dict[str, Any]:
238238
"""
239239
Get document context from DynamoDB and extract X-Ray information.
240240
"""
241-
dynamodb_response = dynamodb_record(document_id)
241+
dynamodb_response = fetch_document_record(document_id)
242242
if not dynamodb_response.get("document_found"):
243243
return {
244244
"analysis_type": "document_not_found",

0 commit comments

Comments
 (0)