Simplify Data Processing with
a PDF Data Extraction Agent
Built Using ADK
See code: [Link]/data-extraction-agent-code
A PDF Data Extraction Agent That…
● Processes data from PDFs into structured format
○ Creates appropriate schema for output
schema (iterative process with user)
○ Extracts data from PDF into that schema
● Relies heavily on using structured output
(controlled generation) with Gemini
● Is useful for turning “unstructured” PDF data into
CSV or JSON format for use in applications,
analysis, etc.
Built Using Google Agent Development Kit (ADK)
What is ADK? Key features:
● Open-source flexible and modular ● Rich tool ecosystem
framework for developing and ● Code-first development
deploying AI agents ● Multi-agent architecture
● Model-agnostic ● Built-in evaluation
● Deployment-agnostic ● Deploy anywhere
● Compatible with other frameworks
PDF Data Extraction Agent Setup with ADK
Root Agent
PDF Data Extraction Agent
Tool Tool
Get Table Schema from PDF Generate Data from PDF and Schema
“Reasons” about format of data to be extracted Actually extracts data in desired format,
(with user input) outputs final result as CSV or JSON
Setup, tool definitions, agent logic and orchestration (including long text
instructions) - all in ~300 lines of Python code!
[Link]/data-extraction-agent-code
Example: World Figure Skating Championships
Various “levels” of results for each skater - e.g. Agent suggests schema based on
total scores, scores by element, program structure of skater results in PDF - user
components, etc. - “reading-friendly” format can suggest modifications
Example: World Figure Skating Championships
Various “levels” of results for each skater - e.g. Individual skater results as JSON with
total scores, scores by element, program appropriate structure, levels of nesting, etc.
components, etc. - “reading-friendly” format - “analysis-friendly” format
Example: 46th Sports Emmy Award Winners
41-page PDF with Emmy Award winners
Awards listed out in tabular form (with
listed by category (including many names
limited names per award), exported to CSV
per award), no tabular structure