Skip to content

Schemas

AgentResponse

Bases: BaseModel

Standardized response format returned by the SRAG Agent.

Attributes:

Name Type Description
response str

The full analytical report generated by the LLM in Markdown format.

plots list[str]

A list of relative filenames (e.g., plot_trend_30d.png) referenced within the markdown text. These are accessible via the static mount.

execution_time float

Total time taken (in seconds) to generate the report.

Source code in api/src/schemas.py
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
class AgentResponse(BaseModel):
    """
    Standardized response format returned by the SRAG Agent.

    Attributes:
        response (str): The full analytical report generated by the LLM in Markdown format.
        plots (list[str]): A list of relative filenames (e.g., `plot_trend_30d.png`)
            referenced within the markdown text. These are accessible via the static mount.
        execution_time (float): Total time taken (in seconds) to generate the report.
    """

    response: str = Field(..., description="The Markdown text generated by the agent.")
    plots: list[str] = Field(
        default_factory=list,
        description="List of generated plot filenames referenced in the text.",
    )
    execution_time: float

ReportRequest

Bases: BaseModel

Request payload for generating the standardized SRAG report.

Attributes:

Name Type Description
focus_area str | None

Optional context to refine the report's analysis. Example: 'Analyze H3N2 variant impact' or 'Focus on pediatric ICU trends'. Defaults to None.

Source code in api/src/schemas.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
class ReportRequest(BaseModel):
    """
    Request payload for generating the standardized SRAG report.

    Attributes:
        focus_area (str | None): Optional context to refine the report's analysis.
            Example: 'Analyze H3N2 variant impact' or 'Focus on pediatric ICU trends'.
            Defaults to `None`.
    """

    focus_area: str | None = Field(
        None,
        description="Optional context to refine the report (e.g., 'Analyze H3N2 variant impact').",
    )