Skip to content

IDP Agent

The IDP Agent is the main agent that searches and analyzes documents and generates artifacts through conversation with users. It operates using Strands SDK’s ReAct pattern, combining MCP tools and Code Interpreter for complex tasks.

User question
AgentCore Runtime (HTTP streaming)
Strands Agent (Claude Opus 4.8, default)
├─ 1. Understand intent
├─ 2. Create execution plan
├─ 3. Load skill → call tools → collect results
└─ 4. Generate final response with citations

Users can pick the model and reasoning effort per turn from the chat composer.

  • The selectable models are loaded at runtime from a catalog defined in an SSM parameter (/idp-v2/chat/models). Adding/removing a model is done by editing the parameter — no redeploy needed.
  • The agent validates the requested model_id against the catalog allowlist (the frontend selector is not a security boundary). A model that is not allowed falls back to the default.
  • The reasoning effort (low/medium/high) is passed as output_config.effort only when the resolved model supports it.
  • Changing the model starts a new conversation, so responses from different models don’t mix within one session.

The agent operates in skill units. Skills are markdown files defined in .skills/{name}/SKILL.md that the agent reads and follows before performing tasks.

SkillPurposeTools Used
searchDocument search + web search strategySearch MCP (summarize, graph_traverse, graph_keyword), AgentCore Web Search
datasetStructured data (Excel/CSV) Text2SQL queryingData MCP (search_datasets, describe_dataset, run_sql)
docxWord document creation/editingCode Interpreter (python-docx)
xlsxExcel spreadsheet creation/editingCode Interpreter (openpyxl)
pptxPowerPoint creation/editingCode Interpreter (python-pptx)
diagramStructural diagram generationCode Interpreter (Mermaid)
chartData visualization chart generationCode Interpreter (Matplotlib)
qa-analysisQA analysis managementQA MCP
markdownMarkdown document generationMD MCP
User: "Summarize the V-101 valve analysis results in Word"
├─ [1] Load search skill → document search
│ ├─ Search MCP (summarize) → vector + FTS search
│ └─ Search MCP (graph_traverse) → entity connection traversal
├─ [2] Load docx skill → Word document creation
│ └─ Code Interpreter → write document with python-docx → S3 upload
└─ [3] Final response with citations
→ [document_id:doc_xxxxx](s3_uri)
→ [artifact_id:art_xxxxx](filename.docx)

MCP tools accessed through the AgentCore Gateway.

ToolDescription
summarizeHybrid search (vector + FTS) → Haiku summarization, returns qa_ids
graph_traverseEntity graph traversal based on qa_ids, discovers related pages
graph_keywordKeyword similarity search via LanceDB graph keywords + Neptune traversal
overviewList project documents
ToolDescription
extract_textExtract text from PDF/DOCX/PPTX
extract_tablesExtract tables from documents
create_documentCreate PDF/DOCX/PPTX
edit_documentEdit existing documents

Queries Parquet datasets converted from Excel/CSV using SQL. Used for structured data that needs exact aggregation, filtering, or sorting.

ToolDescription
search_datasetsHybrid search over the project’s datasets by name/description
describe_datasetRetrieve a dataset’s schema, samples, and query examples (reference doc)
run_sqlRun read-only SQL against a Parquet dataset via DuckDB
MCPToolDescription
Image MCPanalyze_imageImage analysis
QA MCPget_document_segmentsRetrieve document segments
QA MCPadd_document_qaAdd QA analysis
MD MCPload_markdownLoad markdown
MD MCPsave_markdownSave markdown
MD MCPedit_markdownEdit markdown

Tools that run directly in the agent process, not through the Gateway.

ToolDescription
render_chartRender an inline chart card in the reply (hbar / compare / timeline / donut / stacked / scatter). Uses only real values from a prior tool result
ask_userShow a structured question card (single / multi / free-text). The user’s choice is posted back as the next message and picked up on the following turn
generate_imageAI image generation
code_interpreterIsolated Python sandbox execution (see below)

Results from render_chart and ask_user are rendered by the frontend as dedicated UI cards instead of plain text.


AgentCore Code Interpreter provides an isolated Python sandbox environment. AWS SDK is pre-configured, enabling S3 uploads.

Used when the agent generates artifacts (documents, charts, diagrams).

Code Interpreter
├─ python-docx, openpyxl, python-pptx (document generation)
├─ matplotlib (charts)
├─ mermaid-py (diagrams)
└─ boto3 (S3 upload)
→ s3://{bucket}/{user_id}/{project_id}/artifacts/{artifact_id}/

The project’s language setting is fetched from DynamoDB and injected into the system prompt. The agent responds in that language.