Skip to content

API Reference parrot_tools.research.models

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.research.models

View source

Shared Pydantic data models for AI-Parrot research toolkits (FEAT-426).

These models are the common contract between OpenDataToolkit, AcademicResearchToolkit, and ResearchRouter: every toolkit method returns a :class:ResearchResult, and every successful result carries a :class:Citation.

See sdd/specs/research-tools-for-agents.spec.md §2 "Data Models" for the normative definitions.

Class Citation

Machine-readable citation. Present on every successful result.

Fields:

Field Type Default Description
source_name str Human-readable name of the source, e.g. 'World Bank Open Data'
source_url str Direct URL to the data/paper
access_date str ISO-8601 date the API call was made
formatted_citation str Human-readable citation string
data_vintage str | None None Best-effort: source publish/update date, when exposed
doi str | None None DOI, if applicable
license str | None None Data/content license

Class DatasetResult

A single open dataset result.

Fields:

Field Type Default Description
title str
description str | None None
publisher str | None None
url str | None None
keywords list[str] | None None
format str | None None
last_modified str | None None
source str 'eu_open_data' | 'oecd'

Class IndicatorValue

A single economic/statistical indicator observation.

Fields:

Field Type Default Description
indicator_id str e.g. 'NY.GDP.MKTP.KD.ZG'
indicator_name str
country str ISO-3166 code
country_name str
year str
value float | None None None for missing observations
unit str | None None
source_note str | None None

Class PaperResult

A single academic paper/article result.

Fields:

Field Type Default Description
title str
authors list[str]
abstract str | None None
published_date str | None None
doi str | None None
url str | None None
journal str | None None
citation_count int | None None
fields_of_study list[str] | None None
open_access bool | None None
source str 'crossref' | 'pubmed' | 'semantic_scholar' | 'arxiv'

Class ResearchResult

Unified container returned by every research toolkit method.

Failures are represented here as DATA — never as an exception and never as ToolResult(status="error"). See spec §2 "Error Contract".

Fields:

Field Type Default Description
query str
source str toolkit + method identifier
result_type str 'indicators' | 'papers' | 'datasets'
status str 'success' 'success' | 'partial' | 'no_data' | 'error'
error_message str | None None
total_results int | None None
indicators list[IndicatorValue] | None None
papers list[PaperResult] | None None
datasets list[DatasetResult] | None None
citation Citation | None None
raw_metadata dict[str, Any] | None None

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally