Skip to content
Open
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
10 changes: 8 additions & 2 deletions quantmind/flows/paper.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from typing import Any, TypeVar

from agents import Agent, RunHooks, Tool
from agents import Agent, AgentOutputSchema, RunHooks, Tool

from quantmind.configs import PaperFlowCfg
from quantmind.configs.paper import (
Expand Down Expand Up @@ -42,6 +42,12 @@
title and a short summary; leaf nodes additionally carry the section
markdown content. Cite supporting passages on each node.

CRITICAL: All id, node_id, root_node_id, parent_id, children_ids, and
tree_id fields MUST be valid UUID4 strings (e.g.
"550e8400-e29b-41d4-a716-446655440000"). Do NOT use human-readable names
like "root" or "introduction". Generate a fresh UUID4 for each node and
reference them consistently.

Honour these flags from the run config:
- extract_methodology={extract_methodology}: when true, every methodology
section becomes its own subtree with a per-step summary.
Expand Down Expand Up @@ -98,7 +104,7 @@ async def paper_flow(
),
"model": cfg.model,
"tools": list(extra_tools or []),
"output_type": out_type,
"output_type": AgentOutputSchema(out_type, strict_json_schema=False),
"input_guardrails": list(extra_input_guardrails or []),
"output_guardrails": list(extra_output_guardrails or []),
}
Expand Down