Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ yarn-debug.log
yarn-error.log
.pnpm-debug.log

# next.js
.next/

# Agent Data Files
python/agents/personalized-shopping/personalized_shopping/shared_libraries/data/
python/agents/personalized-shopping/personalized_shopping/shared_libraries/search_engine/**
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ To learn more, check out the [ADK Documentation](https://google.github.io/adk-do
│ │ ├── llm-auditor
│ │ ├── machine-learning-engineering
│ │ ├── marketing-agency
│ │ ├── medical-pre-authorization
│ │ ├── personalized-shopping
│ │ ├── RAG
│ │ ├── realtime-conversational-agent
│ │ ├── safety-plugins
│ │ ├── README.md
│ │ ├── software-bug-assistant
Expand Down
1 change: 1 addition & 0 deletions python/agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Check out the agent samples below, organized by category:
| [Gemini Fullstack](gemini-fullstack) | A blueprint for building a sophisticated, fullstack research agent with Gemini. Demonstrates complex agentic workflows, modular agents, and Human-in-the-Loop (HITL) steps. | Multi-agent, Function calling, Web search, React frontend, FastAPI backend, Human-in-the-Loop | Workflow | Advanced | Multi Agent | Horizontal |
| [LLM Auditor](llm-auditor) | Chatbot Response Verification, Content Auditing | Gemini with Google Search, Multi-agent | Workflow | Easy | Multi Agent | Horizontal |
| [Marketing Agency](marketing-agency) | Streamlines new website and product launches. Identifies optimal DNS domains, generates entire websites, develops marketing strategies, and designs brand assets. | Content generation, Website creation, Code generation, Strategy development | Workflow | Easy | Multi Agent | Horizontal |
| [Medical Pre-Authorization](medical-pre-authorization) | Automates the pre-authorization process by analyzing medical records and health policies to instantly determine coverage and eligibility. | Custom tool, Document Analysis, Report Generation | Conversational | Intermediate | Multi Agent | Healthcare |
| [Personalized Shopping](personalized-shopping) | Product Recommendations | E-commerce, Personalized agent, Shopping assistant, Single-agent, Product recommendation, Product discovery, Chatbot | Conversational | Easy | Single Agent | E-commerce |
| [Vertex AI Retrieval Agent](RAG) | RAG Powered Agent / Answering questions related to documents uploaded to Vertex AI RAG Engine, providing informative responses with citations to source materials. | RAG engine | Workflow | Intermediate | Single Agent | Horizontal |
| [Safety Guardrail Plugins](safety-plugins) | Safety filter plugins: Gemini as a judge, Model Armor as a filter | Plugin, Security, Guardrail, Jailbreak, Multiagent | Conversational/Workflow | Intermediate | Plugin | Safety &Security |
Expand Down
34 changes: 16 additions & 18 deletions python/agents/academic-research/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Academic Research


## Overview

AI-driven agent designed to facilitate the exploration of the academic landscape surrounding seminal research works. Recognizing the challenge researchers face in navigating the expanding body of literature influenced by foundational studies, this agent offers a streamlined approach. By accepting a seminal paper identified provided as file input, the agent first analyzes the core contributions of the specified work.
Expand All @@ -22,12 +21,11 @@ The key features of the Academic Research include:
| **Components** | Tools: built-in Google Search |
| **Vertical** | Education |



### Agent architecture:
### Agent architecture

This diagram shows the detailed architecture of the agents and tools used
to implement this workflow.

<img src="academic-research.svg" alt="academic researcher" width="800"/>

## Setup and Installation
Expand Down Expand Up @@ -97,22 +95,22 @@ adk run academic_research
Or on a web interface:

```bash
adk web
adk web
```

The command `adk web` will start a web server on your machine and print the URL.
You may open the URL, select "academic_research" in the top-left drop-down menu, and
a chatbot interface will appear on the right. The conversation is initially
blank. Here are some example requests you may ask the Academic Research to verify:

```
```none
who are you
```

Sampled responses of these requrests are shown below in the [Example
Sampled responses of these requests are shown below in the [Example
Interaction](#example-interaction) section.

```
```none
Hello! I am an AI Research Assistant.

My purpose is to help you explore the academic landscape related to a seminal paper you're interested in. I can:
Expand All @@ -128,7 +126,7 @@ How can I help you today? Would you like to provide a seminal paper for analysis
Below is an example interaction with the Academic Research. Note that the exact output
of the agent may be different every time. Not that the user provides a pdf with the seminal paper to analyze

```
```none
* user: who are you

Hello! I am an AI Research Assistant.
Expand Down Expand Up @@ -358,7 +356,6 @@ is functional. `eval` is a demonstration of how to evaluate the agent, using the
`AgentEvaluator` in ADK. It sends a couple requests to the agent and expects
that the agent's responses match a pre-defined response reasonablly well.


## Deployment

The Academic Co-Research can be deployed to Vertex AI Agent Engine using the following
Expand All @@ -371,7 +368,7 @@ python3 deployment/deploy.py --create

When the deployment finishes, it will print a line like this:

```
```none
Created remote agent: projects/<PROJECT_NUMBER>/locations/<PROJECT_LOCATION>/reasoningEngines/<AGENT_ENGINE_ID>
```

Expand All @@ -383,7 +380,7 @@ python3 deployment/deploy.py --list

The output will be like:

```
```none
All remote agents:

123456789 ("academic_research")
Expand All @@ -393,6 +390,7 @@ All remote agents:
```

You may interact with the deployed agent using the `test_deployment.py` script

```bash
$ export USER_ID=<any string>
$ python3 deployment/test_deployment.py --resource_id=${AGENT_ENGINE_ID} --user_id=${USER_ID}
Expand All @@ -415,10 +413,10 @@ python3 deployment/deploy.py --delete --resource_id=${AGENT_ENGINE_ID}

The Academic Research can be customized to better suit your requirements. For example:

1. Integrate Specialized Search Tools: Augment the agent's discovery capabilities by incorporating additional academic search functionalities, such as an ArXiv-specific search tool, to complement or replace the default search mechanism, allowing for more targeted retrieval from specialized databases and preprint archives.
2. Implement Output Visualization: Enhance the presentation of research findings by adding modules to visualize the network of cited papers or to graphically represent suggested future research topics, thereby offering a more intuitive and interconnected understanding of the academic landscape.
3. Customize Agent Instructions: Modify the prompts guiding the academic_websearch and academic_newresearch sub-agents. This allows you to direct their analytical focus (e.g., by specifying the depth of citation analysis, emphasizing interdisciplinary connections for future research, or ensuring adherence to particular academic writing conventions) or to refine the structure and detail of their outputs.
1. Integrate Specialized Search Tools: Augment the agent's discovery capabilities by incorporating additional academic search functionalities, such as an ArXiv-specific search tool, to complement or replace the default search mechanism, allowing for more targeted retrieval from specialized databases and preprint archives.
2. Implement Output Visualization: Enhance the presentation of research findings by adding modules to visualize the network of cited papers or to graphically represent suggested future research topics, thereby offering a more intuitive and interconnected understanding of the academic landscape.
3. Customize Agent Instructions: Modify the prompts guiding the academic_web_search and academic_new_research sub-agents. This allows you to direct their analytical focus (e.g., by specifying the depth of citation analysis, emphasizing interdisciplinary connections for future research, or ensuring adherence to particular academic writing conventions) or to refine the structure and detail of their outputs.
4. Download the seminal paper via DOI or URL: Augment the agent's capabilities by enabling direct download of seminal papers. This feature would allow the agent to:
* Resolve DOI to PDF: Given a Digital Object Identifier (DOI), the agent could leverage APIs or web scraping techniques to locate and download the corresponding PDF of the paper. This streamlines the process of accessing primary sources, especially when the DOI is already known.
* Download from URL: If a direct URL to the paper's PDF or an academic repository page is provided, the agent could be configured to navigate to that URL and initiate the download. This would be particularly useful for papers available on institutional repositories, personal academic websites, or preprint servers that might not have a readily resolvable DOI.
* Integration with Reference Managers: The downloaded papers could then be automatically imported into a specified reference manager (e.g., Zotero, Mendeley, EndNote), along with their metadata, facilitating seamless organization and citation management for the user's research library. This integration would significantly enhance the efficiency of literature review and research compilation.
* Resolve DOI to PDF: Given a Digital Object Identifier (DOI), the agent could leverage APIs or web scraping techniques to locate and download the corresponding PDF of the paper. This streamlines the process of accessing primary sources, especially when the DOI is already known.
* Download from URL: If a direct URL to the paper's PDF or an academic repository page is provided, the agent could be configured to navigate to that URL and initiate the download. This would be particularly useful for papers available on institutional repositories, personal academic websites, or preprint servers that might not have a readily resolvable DOI.
* Integration with Reference Managers: The downloaded papers could then be automatically imported into a specified reference manager (e.g., Zotero, Mendeley, EndNote), along with their metadata, facilitating seamless organization and citation management for the user's research library. This integration would significantly enhance the efficiency of literature review and research compilation.
22 changes: 11 additions & 11 deletions python/agents/academic-research/academic-research.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions python/agents/academic-research/academic_research/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
from google.adk.tools.agent_tool import AgentTool

from . import prompt
from .sub_agents.academic_newresearch import academic_newresearch_agent
from .sub_agents.academic_websearch import academic_websearch_agent
from .sub_agents.academic_new_research import academic_new_research_agent
from .sub_agents.academic_web_search import academic_web_search_agent

MODEL = "gemini-2.5-pro"

Expand All @@ -37,8 +37,8 @@
instruction=prompt.ACADEMIC_COORDINATOR_PROMPT,
output_key="seminal_paper",
tools=[
AgentTool(agent=academic_websearch_agent),
AgentTool(agent=academic_newresearch_agent),
AgentTool(agent=academic_web_search_agent),
AgentTool(agent=academic_new_research_agent),
],
Comment on lines 39 to 42
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gulliantonio I also had a question on why these were set up as AgentTool instead of sub-agents

)

Expand Down
12 changes: 6 additions & 6 deletions python/agents/academic-research/academic_research/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
Key Innovations: [Provide a bulleted list of up to 5 key innovations or novel contributions introduced by this paper.]
References Cited Within Seminal Paper: [Extract the bibliography/references section from the seminal paper.
List each reference on a new line using a standard citation format (e.g., Author(s). Title. Venue. Details. Date.).]
Find Recent Citing Papers (Using academic_websearch):
Find Recent Citing Papers (Using academic_web_search):

Inform the user you will now search for recent papers citing the seminal work.
Action: Invoke the academic_websearch agent/tool.
Action: Invoke the academic_web_search agent/tool.
Input to Tool: Provide necessary identifiers for the seminal paper.
Parameter: Specify the desired recency. Ask the user or use a default timeframe, e.g., "papers published during last year"
(e.g., since January 2025, based on the current date April 21, 2025).
Expand All @@ -53,13 +53,13 @@
If no papers are found in the specified timeframe, state that clearly.
The agent will provide the answer and i want you to print it to the user

Suggest Future Research Directions (Using academic_newresearch):
Inform the user that based on the seminal paper from the seminal paper and the recent citing papers provided by the academic_websearch agent/tool,
Suggest Future Research Directions (Using academic_new_research):
Inform the user that based on the seminal paper from the seminal paper and the recent citing papers provided by the academic_web_search agent/tool,
you will now suggest potential future research directions.
Action: Invoke the academic_newresearch agent/tool.
Action: Invoke the academic_new_research agent/tool.
Inputs to Tool:
Information about the seminal paper (e.g., summary, keywords, innovations)
The list of recent citing papers citing the seminal work provided by the academic_websearch agent/tool
The list of recent citing papers citing the seminal work provided by the academic_web_search agent/tool
Expected Output from Tool: A synthesized list of potential future research questions, gaps, or promising avenues.
Presentation: Present these suggestions clearly under a heading like "Potential Future Research Directions".
Structure them logically (e.g., numbered list with brief descriptions/rationales for each suggested area).
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Academic_web_search_agent for finding research papers using search tools."""

from .agent import academic_new_research_agent
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Academic_newresearch_agent for finding new research lines"""
"""Academic_new_research_agent for finding new research lines"""

from google.adk import Agent

from . import prompt

MODEL = "gemini-2.5-pro"

academic_newresearch_agent = Agent(
academic_new_research_agent = Agent(
model=MODEL,
name="academic_newresearch_agent",
instruction=prompt.ACADEMIC_NEWRESEARCH_PROMPT,
name="academic_new_research_agent",
instruction=prompt.ACADEMIC_NEW_RESEARCH_PROMPT,
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Prompt for the academic_newresearch_agent agent."""
"""Prompt for the academic_new_research_agent agent."""


ACADEMIC_NEWRESEARCH_PROMPT = """
ACADEMIC_NEW_RESEARCH_PROMPT = """
Role: You are an AI Research Foresight Agent.

Inputs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Academic_websearch_agent for finding research papers using search tools."""
"""Academic_web_search_agent for finding research papers using search tools."""

from .agent import academic_newresearch_agent
from .agent import academic_web_search_agent
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Academic_websearch_agent for finding research papers using search tools."""
"""Academic_web_search_agent for finding research papers using search tools."""

from google.adk import Agent
from google.adk.tools import google_search
Expand All @@ -22,10 +22,10 @@
MODEL = "gemini-2.5-pro"


academic_websearch_agent = Agent(
academic_web_search_agent = Agent(
model=MODEL,
name="academic_websearch_agent",
instruction=prompt.ACADEMIC_WEBSEARCH_PROMPT,
name="academic_web_search_agent",
instruction=prompt.ACADEMIC_WEB_SEARCH_PROMPT,
output_key="recent_citing_papers",
tools=[google_search],
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Prompt for the academic_websearch agent."""
"""Prompt for the academic_web_search agent."""

ACADEMIC_WEBSEARCH_PROMPT = """
ACADEMIC_WEB_SEARCH_PROMPT = """
Role: You are a highly accurate AI assistant specialized in factual retrieval using available tools.
Your primary task is thorough academic citation discovery within a specific recent timeframe.

Expand Down
Loading