[Feature] flow: Agentic LLMFlow Middleware for Dynamic Tool-Driven Reasoning
@keli-wen ya está trabajando en esto.
Desde el 15/9/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
✨ Feature Summary
Introduce a new LLMFlow class: an agentic runtime that leverages LLMs for dynamic, tool-driven reasoning within QuantMind. This will allow the framework to autonomously plan and execute multi-step financial analysis tasks by orchestrating tools in response to user input, inspired by modern agent design patterns.
We will primarily take smolagents repo as base to develop our LLMFlow.
🎯 Motivation
The current BaseFlow supports only statically orchestrated task flows, limiting the framework's ability to respond adaptively to user goals or leverage external capabilities. By adding LLMFlow, QuantMind can:
- Dynamically select and use tools based on LLM-driven reasoning
- Support autonomous, multi-step task execution (e.g., query data, analyze, compare, summarize)
- Integrate tightly with the agentic ecosystem, including future third-party or open-source toolkits
📋 Detailed Description
LLMFlow will:
- Operate in an agentic loop, maintaining structured message history (not just a string scratchpad)
- Delegate action planning to the LLM, which returns either a final answer or a list of tool calls
- Execute tool calls asynchronously and append their results to the history for further reasoning
- Support configuration via
LLMFlowConfig, specifying the reasoning LLM and the set of available tools (asBaseToolinstances)
🔧 Proposed Implementation
- Add
LLMFlowConfig(inquantmind/config/flows.py) to specify the reasoning LLM and available tools - Implement
LLMFlow(inquantmind/flows/llm_flow.py), following agent middleware patterns:- Asynchronous reasoning loop with structured message history
- Tool call schema generation and execution via native LLM APIs
- Clear error handling and extensibility for new tool types
- Provide usage and extension documentation
API Design
# quantmind/config/flows.py
class LLMFlowConfig(BaseFlowConfig):
reasoning_llm_identifier: str
tools: List[BaseTool]
# quantmind/flows/llm_flow.py
class LLMFlow(BaseFlow):
async def run(self, initial_input: str, max_iterations: int = 5) -> Any:
...
Configuration
llmflow:
reasoning_llm_identifier: "gpt-4-turbo"
tools:
- name: "company_financials"
- name: "data_fetcher"
🎨 User Experience
Users can define a flow that reasons and acts using LLMs and a configurable set of tools. Complex tasks like “Summarize this report and compare key metrics with last quarter” become possible with minimal code changes.
📊 Use Cases
- Automated Report Analysis: Fetch, analyze, and summarize financial reports using multiple tools in sequence, determined at runtime.
- Conversational Data Exploration: Users ask natural language queries, and the agent dynamically selects tools to pull, process, and present data.
- Third-Party Tool Integration: Easily plug in new tools (e.g., external APIs) for domain-specific analytics.
🔗 Related Issues
- Relates to #47 (BaseTool design and implementation)
Implementation Considerations
Breaking Changes
- This feature would introduce breaking changes
- This feature is backward compatible
Dependencies
- Requires new dependencies
- Uses existing dependencies only
Checklist
- I have searched existing issues to avoid duplicates
- I have provided a clear and detailed description
- I have explained the motivation and use cases
- I have considered the implementation approach
- I have thought about potential breaking changes
- Lenguaje dominante
- Python
- Estrellas
- 3.1k
- Forks
- 492
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de LLMQuant/quant-mind
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
LLMQuant/quant-mind#155 · 2 comentarios ·
-
design(flows): structure tree drafted from truncated page text (1200 chars), diverging from PageIndex full-page constructionQuizá libre de nuevo @keli-wen la tomó hace 82 días y no hay ningún pull request abierto. Abiertoarea: flows area: preprocess type: design
LLMQuant/quant-mind#133 · 1 comentario · 1 asignado ·
-
feat(flows): surface token-usage and cost for runs and batch_runPosiblemente ocupada @dhruvraajeev la tomó hace 83 días. Abiertoarea: configs area: flows area: mind type: feature
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
LLMQuant/quant-mind#127 · 1 comentario ·
-
design(config): define ownership of typed operation inputsQuizá libre de nuevo @keli-wen la tomó hace 87 días y no hay ningún pull request abierto. Abiertoarea: flows type: feature
LLMQuant/quant-mind#121 · 1 asignado ·
-
bug: exchange-qualified multi-symbol lists are only partially capturedPosiblemente ocupada @pengpengyi92 la tomó hace 84 días. Abiertoarea: preprocess stale type: bug
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
LLMQuant/quant-mind#108 · 2 comentarios ·
Todos los issues de LLMQuant/quant-mind
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
topoteretes/cognee#5773 ·
Los mantenedores suelen responder en 1 día
-
MiKTeX: a failed build reports no errors because texify --quiet switches the log to file:line: styleAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
SublimeText/LaTeXTools#1718 ·