A Multi-Agent System that bridges the gap between vague human intent and professional-grade research through autonomous orchestration.
This project is a submission for the Kaggle Agents Intensive Capstone.
🔗 Live Demo: Deployed on Railway
The Autonomous Research Concierge is designed to solve the "garbage-in, garbage-out" problem inherent in standard LLM interactions. Instead of hallucinating answers to vague prompts, this system enforces a structured workflow: Clarify → Research → Refine → Deliver.
It acts as a personal research assistant that interviews you to understand your specific needs (audience, depth, focus) before triggering a team of specialized autonomous agents to conduct parallel research, draft content, and rigorously critique their own work until it meets quality standards.
Manual research is laborious. It requires opening dozens of tabs, synthesizing conflicting information, and formatting it manually—a process that can take hours. Furthermore, standard LLMs often fail at deep research because users rarely provide perfect prompts on the first try. A single "monolithic" agent trying to research, write, and edit simultaneously often suffers from context overload, leading to generic or hallucinated outputs.
The Autonomous Research Concierge solves this by decomposing the research process into a Multi-Agent System.
- The Interviewer: A dedicated agent ensures requirements are clear before any work begins.
- The Specialists: Three parallel researchers (Academic, Market, Technical) gather diverse data simultaneously, reducing hallucination by grounding answers in real-time web search.
- The Editor: A refinement loop ensures the first draft is never the final draft. A Critic agent forces revisions until quality standards are met.
This system was designed and tested with a deliberate model split. The Critic role intentionally uses a more capable model than the worker agents — critique quality is the primary quality bottleneck in multi-agent research pipelines.
| Role | Designed & Tested On | Current Live Deployment |
|---|---|---|
| Worker agents (researchers, drafter) | gemini-2.5-flash |
gemini-2.5-flash ✅ |
| Critic & Formatter | gemini-2.5-pro |
gemini-2.5-flash |
⚠️ Deployment Note: The live deployment runs all roles ongemini-2.5-flashdue to free-tier API constraints —gemini-2.5-prohas no free quota via the Gemini API. Output quality is degraded from the intended design, particularly in critique depth, citation quality, and report formatting. The system will not perform as intended when the Critic is belowgemini-2.5-pro. To restore intended performance, setcritic_modelinconfig.pytogemini-2.5-prowith a paid API key.
💡 Potential Upgrade: This system was built and validated on the Gemini 2.5 series. The newer Gemini 3 series (
gemini-3-flash-previewfor workers,gemini-3.1-pro-previewfor critic) may produce better outputs given the significant benchmark improvements of the 3 series over 2.5. However, this has not been tested against the current agent instructions — behaviour may differ. Upgrade with caution and re-test locally before deploying.
To configure models, edit research_agent/config.py:
# Worker agents — free tier available
worker_model = Gemini(model="gemini-2.5-flash", ...)
# Critic & Formatter — requires paid API key for intended performance
critic_model = Gemini(model="gemini-2.5-pro", ...)The core of the system is the AutonomousPipeline, an ecosystem of specialized agents powered by Google's Agent Development Kit. It is not a monolithic script but a modular assembly of distinct intelligences.
- File:
research_agent/agent.py - Role: The front-desk interface.
- Behavior: Configured with a strict system instruction to never answer research questions directly. Instead, it acts as a requirement gatherer, interviewing the user until it has sufficient variables (Topic, Focus, Audience) to invoke the pipeline tool.
- File:
research_agent/tools.py - Functionality: A custom function tool that bridges the conversational front-end with the autonomous back-end.
- Key Feature: Session Isolation. This function explicitly instantiates a new
InMemorySessionService()for every request. This ensures that the thousands of tokens generated by sub-agents (raw HTML, internal debates) never pollute the user's main chat context.
Defined in research_agent/internal_agents.py, these agents execute the work:
IntentSynthesisAgent: A "Context Compressor" that takes the chat history and distills it into a single, high-fidelity "Master Research Directive."SecurityGuardrailAgent: A deterministicBaseAgentclass that scans the directive for malicious intent (e.g., hacking instructions) before allowing any web access.TechBackgroundResearcher: Specializes in theoretical architecture, algorithms, and academic concepts.ExistingSolutionsResearcher: Scans the market for competitors, SOTA papers, and benchmarks.ToolsAndTechResearcher: Identifies practical frameworks, libraries, and tech stacks relevant to the topic.DynamicCriticAgent: The quality gatekeeper. It compares the generated draft against the user's original intent and outputs structured critiques.
- Pattern:
LoopAgent - Logic: The system utilizes a
whileloop logic controlled by theReportValidationAgent. The drafting process continues iteratively until the Critic outputs an explicit "APPROVED" signal.
graph TD
subgraph "User Interface"
User
end
subgraph "Root Agent: The Research Concierge"
Concierge[Research Concierge Agent]
User -- "I want to research X" --> Concierge
Concierge -- "Asks Clarifying Questions" --> User
User -- "Provides Answers" --> Concierge
Concierge -- "Calls Tool with ALL info" --> Tool(run_research_pipeline)
end
subgraph "Function Tool: The Autonomous Pipeline"
Tool --> Security[Phase 1: SecurityGuardrail]
Security --> Parallel
subgraph "Phase 2: Parallel Research"
Parallel[ResearchTeam]
Parallel --> R1[TechBackgroundResearcher]
Parallel --> R2[ExistingSolutionsResearcher]
Parallel --> R3[ToolsAndTechResearcher]
end
R1 & R2 & R3 --> Findings(Raw Findings)
Findings --> Loop
subgraph "Phase 3: Refinement Loop"
Loop --> Draft[DraftingAgent]
Draft --> Critic[CriticAgent]
Critic -- "Rejection" --> Draft
Critic -- "Approval" --> Validator[Validator]
end
Validator --> Format[Phase 4: FormattingAgent]
end
Format --> Final[Final Polished Report]
Final --> Concierge
- Interview (Requirement Gathering): The Concierge Agent intercepts the user request. Instead of answering, it asks clarifying questions about Target Audience, Specific Focus, and Technical Depth.
- Context Synthesis: Once the user answers, an internal agent synthesizes the chat history into a "Master Research Directive."
- Security Check: A deterministic guardrail scans the directive for malicious intent (e.g., "how to hack") before allowing access to external tools.
- Parallel Research: The directive is sent to three specialist agents simultaneously:
- TechBackgroundResearcher: Focuses on theory and architecture.
- ExistingSolutionsResearcher: Scans for competitors and papers.
- ToolsAndTechResearcher: Recommends practical stacks.
- Drafting & Critique: The gathered data is passed to a Drafting Agent. The result is immediately reviewed by a Critic Agent. If the Critic rejects it, the Drafter must rewrite it based on feedback.
- Final Polish: Once approved, a Formatting Agent applies Markdown styling and citations before delivering the final report to the user.
This function is the bridge between the Chat and the Work. Crucially, it implements Session Isolation. It creates a fresh, temporary memory space for the sub-agents. This ensures that the thousands of tokens generated during research (raw HTML, internal debates) do not pollute the user's main chat context.
Used by all research sub-agents to ground their findings in real-time data, ensuring the report is current and not limited by the model's training cutoff.
- Sequential Agents: Used for the main pipeline flow to ensure dependencies are met.
- Parallel Agents: Used to run researchers simultaneously to reduce latency.
- Loop Agents: Used for the Draft/Critique cycle to ensure quality control.
Autonomous-Research-Concierge/
├── research_agent/
│ ├── agent.py # Entry point. Defines the Concierge and App wrapper.
│ ├── internal_agents.py # Definitions of all sub-agents (Researchers, Critic, Guardrails).
│ ├── tools.py # The custom tool logic that bridges Chat and Work.
│ ├── config.py # Model configurations and API setups.
│ └── __init__.py # Package initialization.
├── main.py # Production entry point. FastAPI app via get_fast_api_app().
├── Dockerfile # Container definition for Railway deployment.
├── .env # API Keys (Not uploaded to GitHub).
├── .gitignore # Security rules.
├── requirements.txt # Python dependencies.
├── LICENSE # Apache 2.0 License.
└── README.md # This file.This project is containerised and deployed on Railway using Docker.
# Build the image locally
docker build -t arc .
# Run locally via Docker
docker run -e GOOGLE_API_KEY=your_key -p 8080:8080 arcThe main.py file uses get_fast_api_app() from the ADK library to serve the agent as a production FastAPI application. adk web is a development-only tool and is not used in the deployed container.
Environment variables (API keys) are injected at runtime via Railway's Variables tab — never stored in the image or repository.
# 1. Clone and set up environment
git clone https://github.com/Waqas01CP/Autonomous-Research-Concierge.git
cd Autonomous-Research-Concierge
python -m venv venv
# Windows
.\venv\Scripts\activate
# macOS/Linux
source venv/bin/activate
# 2. Install dependencies
pip install -r requirements.txt
# 3. Configure credentials
# Create .env in root directory:
# GOOGLE_API_KEY=your_actual_gemini_api_key_here
# 4. Run development server
adk webOpen your browser at http://127.0.0.1:8000
Note: Run
adk webfrom the root folder containing theresearch_agentdirectory.
This agent reduces the time required for deep technical research by 90%. Instead of spending hours searching, reading, and summarizing, a user can simply answer three clarifying questions. The Parallel Execution architecture ensures speed, while the Refinement Loop guarantees that the final output is structured, cited, and professional, making it immediately usable for academic or business reports.
This project is submitted for the Kaggle Agents Intensive Capstone.
- Track: Concierge Agents
- Google Agent Development Kit (ADK): Official Repository
- Model Provider: Google AI Studio (Gemini)
- Inspiration: The "Agent Shutton" sample provided by the Kaggle team was a reference for the multi-agent architectural style.
- Visualization: Architecture diagrams created using Mermaid.js.
This project is licensed under the Apache 2.0 License.
