Skip to content

Commit 6838280

Browse files
authored
docs(oct10): add papers and update log for missing tools (#70)
* add papers and update index * to pass lint and add log support for multiple tools * add ruff check * test ruff * update ruff * add paper tool universe
1 parent 648f6cf commit 6838280

18 files changed

+194
-47
lines changed

.github/workflows/check-leaks.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ permissions:
1515

1616
jobs:
1717
scan:
18-
if: github.repository_owner == 'MiroMindAI'
1918
name: gitleaks
2019
runs-on: ubuntu-latest
2120
steps:

.github/workflows/check-pr-title.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ name: check-pr-title
22

33
on:
44
pull_request:
5-
types: [opened, synchronize]
5+
types: [opened, synchronize, edited]
66

77
jobs:
88
check-pr-title:
9-
if: github.repository_owner == 'MiroMindAI'
109
name: Check PR Title
1110
runs-on: ubuntu-latest
1211
steps:

.github/workflows/run-ruff.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,40 @@ name: lint
22

33
on:
44
pull_request:
5+
types: [opened, synchronize, edited]
6+
push:
57
branches: [ "main" ]
68

79
jobs:
810
lint:
9-
if: github.repository_owner == 'MiroMindAI'
1011
name: lint pull request
1112
runs-on: ubuntu-latest
1213
steps:
14+
- name: Debug workflow trigger
15+
run: |
16+
echo "Workflow triggered by: ${{ github.event_name }}"
17+
echo "PR number: ${{ github.event.pull_request.number }}"
18+
echo "PR title: ${{ github.event.pull_request.title }}"
19+
echo "Repository: ${{ github.repository }}"
20+
echo "Branch: ${{ github.head_ref }}"
21+
1322
- name: checkout code
1423
uses: actions/checkout@v4
1524

1625
- name: Install uv
1726
uses: astral-sh/setup-uv@v5
1827

28+
- name: Install dependencies
29+
run: uv sync
30+
1931
- name: Check static error
2032
run: |
21-
uv tool run ruff@0.8.0 check --show-fixes --output-format=github
33+
uv run ruff check --show-fixes --output-format=github
2234
2335
- name: Reformat code style
2436
run: |
2537
echo '## Reformat summary' >> $GITHUB_STEP_SUMMARY
26-
if diff_output="$(uv tool run ruff@0.8.0 format --diff 2>&1)"; then
38+
if diff_output="$(uv run ruff format --diff 2>&1)"; then
2739
echo "$diff_output"
2840
echo '✅ Format check passed.' >> "$GITHUB_STEP_SUMMARY"
2941
else

common_benchmark.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,20 @@
1919
from omegaconf import DictConfig, OmegaConf
2020

2121
from utils.eval_utils import verify_answer_for_datasets
22-
from src.logging.logger import bootstrap_logger, task_logging_context, init_logging_for_benchmark_evaluation
22+
from src.logging.logger import (
23+
bootstrap_logger,
24+
task_logging_context,
25+
init_logging_for_benchmark_evaluation,
26+
)
2327
from config import config_name, config_path
2428
from src.core.pipeline import (
2529
create_pipeline_components,
2630
execute_task_pipeline,
2731
)
32+
2833
init_logging_for_benchmark_evaluation(print_task_logs=False)
2934

35+
3036
class TaskStatus(StrEnum):
3137
PENDING = "pending"
3238
RUN_FAILED = "run_failed"
@@ -373,7 +379,7 @@ async def run_parallel_inference(
373379
async def run_with_semaphore(task):
374380
async with semaphore:
375381
with task_logging_context(task.task_id, self.get_log_dir()):
376-
result = await self.run_single_task(task)
382+
result = await self.run_single_task(task)
377383
return result
378384

379385
# Shuffle tasks to avoid order bias and improve balancing

docs/mkdocs/docs/all_about_agents.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,68 @@ Welcome to our comprehensive resource collection for AI agents. This page curate
155155
**P045** - Stratified GRPO: Handling Structural Heterogeneity in Reinforcement Learning of LLM Search Agents
156156
- [:material-file-document: Paper](https://arxiv.org/abs/2510.06214)
157157

158-
**P046** - In-the-Flow Agentic System Optimization: Effective Planning and Tool Use
158+
**P046** - AgentFlow: In-the-Flow Agentic System Optimization: Effective Planning and Tool Use
159159
- [:material-file-document: Paper](https://arxiv.org/abs/2510.05592) · [:material-github: GitHub](https://github.com/lupantech/AgentFlow)
160160

161161
**P047** - ARM: Discovering Agentic Reasoning Modules for Generalizable Multi-Agent Systems
162162
- [:material-file-document: Paper](https://arxiv.org/abs/2510.05746)
163163

164+
**P048** - Customer-R1: Personalized Simulation of Human Behaviors via RL-based LLM Agent in Online Shopping
165+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.07230)
166+
167+
**P049** - CoMAS: Co-Evolving Multi-Agent Systems via Interaction Rewards
168+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.08529)
169+
170+
**P050** - Beyond Turn Limits: Training Deep Search Agents with Dynamic Context Window
171+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.08276)
172+
173+
**P051** - Learning on the Job: An Experience-Driven Self-Evolving Agent for Long-Horizon Tasks
174+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.08002)
175+
176+
**P052** - MATRIX: Multimodal Agent Tuning for Robust Tool-Use Reasoning
177+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.08567)
178+
179+
**P053** - Agent Learning via Early Experience
180+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.08558)
181+
182+
**P054** - CaRT: Teaching LLM Agents to Know When They Know Enough
183+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.08517)
184+
185+
**P055** - AutoMLGen: Navigating Fine-Grained Optimization for Coding Agents
186+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.08511)
187+
188+
**P056** - Opponent Shaping in LLM Agents
189+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.08255)
190+
191+
**P057** - NavSpace: How Navigation Agents Follow Spatial Intelligence Instructions
192+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.08173)
193+
194+
**P058** - VoiceAgentBench: Are Voice Assistants ready for agentic tasks?
195+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.07978)
196+
197+
**P059** - Self-Improving LLM Agents at Test-Time
198+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.07841)
199+
200+
**P060** - AgentRL: Scaling Agentic Reinforcement Learning with a Multi-Turn, Multi-Task Framework
201+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.04206)
202+
203+
**P061** - Adaptive Tool Generation with Models as Tools and Reinforcement Learning
204+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.06825)
205+
206+
**P062** - TinyScientist: An Interactive, Extensible, and Controllable Framework for Building Research Agents
207+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.06579)
208+
209+
**P063** - A Survey on Agentic Security: Applications, Threats and Defenses
210+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.06445)
211+
212+
**P064** - A Multi-Agent Framework for Stateful Inference-Time Search
213+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.07147)
214+
215+
**P065** - AlphaApollo: Orchestrating Foundation Models and Professional Tools into a Self-Evolving System for Deep Agentic Reasoning
216+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.06261)
217+
218+
**P066** - Democratizing AI Scientists using ToolUniverse
219+
- [:material-file-document: Paper](https://arxiv.org/abs/2509.23426) · [:material-github: GitHub](https://github.com/mims-harvard/ToolUniverse)
164220

165221

166222
---
@@ -277,6 +333,9 @@ Welcome to our comprehensive resource collection for AI agents. This page curate
277333
**E027** - ACEBench: Who Wins the Match Point in Tool Usage?
278334
- [:material-file-document: Paper](https://arxiv.org/abs/2501.12851)
279335

336+
**E028** - Haystack Engineering: Context Engineering for Heterogeneous and Agentic Long-Context Evaluation
337+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.07414) · [:material-github: GitHub](https://github.com/Graph-COM/HaystackCraft)
338+
280339

281340
---
282341

@@ -327,6 +386,9 @@ Welcome to our comprehensive resource collection for AI agents. This page curate
327386
**M014** - A-MemGuard: A Proactive Defense Framework for LLM-Based Agent Memory
328387
- [:material-file-document: Paper](https://www.arxiv.org/abs/2510.02373)
329388

389+
**M015** - ToolMem: Enhancing Multimodal Agents with Learnable Tool Capability Memory
390+
- [:material-file-document: Paper](https://arxiv.org/abs/2510.06664)
391+
330392

331393
---
332394

docs/mkdocs/docs/index.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,23 @@ Explore the complete MiroMind AI ecosystem:
5353
| **MiroTrain** | Complete training recipes and tools | [GitHub](https://github.com/MiroMindAI/MiroTrain) :material-arrow-right: |
5454

5555

56+
## 📝 Recent Updates
57+
58+
!!! success "Latest Changes & Improvements"
59+
60+
**Oct 2025** -
61+
62+
- 📊 Added support for FinSearchComp evaluation benchmark [#51](https://github.com/MiroMindAI/MiroFlow/pull/51)
63+
- 🔍 Added support for XBench-DS (Deep Search) evaluation [#47](https://github.com/MiroMindAI/MiroFlow/pull/47)
64+
- 🧠 Updated o3 hints and summary to more models [#58](https://github.com/MiroMindAI/MiroFlow/pull/58)
65+
- ✨ Added support for GPT-5 integration [#52](https://github.com/MiroMindAI/MiroFlow/pull/52)
66+
- 🔧 Improved tool logs and per-task log storage [#69](https://github.com/MiroMindAI/MiroFlow/pull/69)
67+
- 🤖 Added support for single agent mode [#67](https://github.com/MiroMindAI/MiroFlow/pull/67)
68+
- 📚 Added comprehensive collection of agentic AI research papers [#65](https://github.com/MiroMindAI/MiroFlow/pull/65)
69+
70+
71+
72+
5673

5774
---
5875

src/logging/logger.py

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@
88
import logging
99
from functools import lru_cache
1010
from pathlib import Path
11-
from typing import Literal, Dict
11+
from typing import Literal
1212
from contextvars import ContextVar
1313
import hydra
1414
from rich.console import Console
1515
from rich.logging import RichHandler
1616
import asyncio
1717
import threading
1818
from contextlib import contextmanager
19+
1920
TASK_CONTEXT_VAR: ContextVar[str | None] = ContextVar("CURRENT_TASK_ID", default=None)
2021

22+
2123
class ZMQLogHandler(logging.Handler):
2224
def __init__(self, addr="tcp://127.0.0.1:6000", tool_name="unknown_tool"):
2325
super().__init__()
@@ -34,6 +36,7 @@ def emit(self, record):
3436
except Exception:
3537
self.handleError(record)
3638

39+
3740
async def zmq_log_listener(bind_addr="tcp://127.0.0.1:6000"):
3841
ctx = zmq.asyncio.Context()
3942
sock = ctx.socket(zmq.PULL)
@@ -47,23 +50,30 @@ async def zmq_log_listener(bind_addr="tcp://127.0.0.1:6000"):
4750
task_id, tool_name, msg = raw.split("||", 2)
4851

4952
record = root_logger.makeRecord(
50-
name=f'[TOOL] {tool_name}',
53+
name=f"[TOOL] {tool_name}",
5154
level=logging.INFO,
52-
fn="", lno=0, msg=msg, args=(),
53-
exc_info=None
55+
fn="",
56+
lno=0,
57+
msg=msg,
58+
args=(),
59+
exc_info=None,
5460
)
5561
record.task_id = task_id
5662

5763
root_logger.handle(record)
5864
else:
5965
root_logger.info(raw)
6066

67+
6168
def start_zmq_listener():
6269
loop = asyncio.new_event_loop()
6370
asyncio.set_event_loop(loop)
6471
loop.run_until_complete(zmq_log_listener())
6572

66-
def setup_mcp_logging(level="INFO", addr="tcp://127.0.0.1:6000", tool_name="unknown_tool"):
73+
74+
def setup_mcp_logging(
75+
level="INFO", addr="tcp://127.0.0.1:6000", tool_name="unknown_tool"
76+
):
6777
root = logging.getLogger()
6878
root.setLevel(level)
6979

@@ -78,29 +88,36 @@ def setup_mcp_logging(level="INFO", addr="tcp://127.0.0.1:6000", tool_name="unkn
7888
for h in logger.handlers[:]:
7989
logger.removeHandler(h)
8090
h.close()
81-
logger.propagate = True # 确保冒泡到 root
91+
logger.propagate = True # Ensure bubbling to root
8292

8393
# Re-add the ZMQ handler
8494
handler = ZMQLogHandler(addr=addr, tool_name=tool_name)
85-
handler.setFormatter(logging.Formatter("[TOOL] %(asctime)s %(levelname)s: %(message)s"))
95+
handler.setFormatter(
96+
logging.Formatter("[TOOL] %(asctime)s %(levelname)s: %(message)s")
97+
)
8698
root.addHandler(handler)
8799

100+
88101
def setup_log_record_factory():
89102
old_factory = logging.getLogRecordFactory()
103+
90104
def record_factory(*args, **kwargs):
91105
record = old_factory(*args, **kwargs)
92106
record.task_id = TASK_CONTEXT_VAR.get()
93107
return record
108+
94109
logging.setLogRecordFactory(record_factory)
95110

111+
96112
class TaskFilter(logging.Filter):
97113
def __init__(self, task_id: str):
98114
super().__init__()
99115
self.task_id = task_id
100-
116+
101117
def filter(self, record: logging.LogRecord) -> bool:
102118
return getattr(record, "task_id", None) == self.task_id
103119

120+
104121
def make_task_logger(task_id: str, log_dir: Path) -> logging.Handler:
105122
log_dir.mkdir(parents=True, exist_ok=True)
106123
file_path = log_dir / f"task_{task_id}.log"
@@ -111,9 +128,10 @@ def make_task_logger(task_id: str, log_dir: Path) -> logging.Handler:
111128
logging.getLogger().addHandler(fh)
112129
return fh
113130

131+
114132
def remove_all_console_handlers():
115133
"""
116-
移除当前进程中所有 logger 上的 console handler (StreamHandler/RichHandler)
134+
Remove all console handlers (StreamHandler/RichHandler) from all loggers in the current process.
117135
"""
118136
for name, logger in logging.Logger.manager.loggerDict.items():
119137
if isinstance(logger, logging.Logger):
@@ -134,6 +152,7 @@ def remove_all_console_handlers():
134152
root_logger.removeHandler(h)
135153
h.close()
136154

155+
137156
@contextmanager
138157
def task_logging_context(task_id: str, log_dir: Path):
139158
token = TASK_CONTEXT_VAR.set(task_id)
@@ -145,21 +164,25 @@ def task_logging_context(task_id: str, log_dir: Path):
145164
logging.getLogger().removeHandler(handler)
146165
handler.close()
147166

167+
148168
def init_logging_for_benchmark_evaluation(print_task_logs=False):
149-
threading.Thread(target=start_zmq_listener, daemon=True).start() #monitoring tool logs
150-
logging.basicConfig(handlers=[])
169+
threading.Thread(
170+
target=start_zmq_listener, daemon=True
171+
).start() # monitoring tool logs
172+
logging.basicConfig(handlers=[])
151173
setup_log_record_factory()
152174
if not print_task_logs:
153-
remove_all_console_handlers()
175+
remove_all_console_handlers()
176+
154177

155178
@lru_cache
156179
def bootstrap_logger(
157180
level: Literal["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] | int = "INFO",
158181
logger_name: str = "miroflow",
159182
logger: logging.Logger | None = None,
160-
log_dir: str | Path | None = None, # 日志存储目录
161-
log_filename: str = "miroflow.log", # 默认日志文件名
162-
to_console: bool = True, # 是否显示到 console
183+
log_dir: str | Path | None = None, # Log storage directory
184+
log_filename: str = "miroflow.log", # Default log filename
185+
to_console: bool = True, # Whether to display to console
163186
) -> logging.Logger:
164187
"""Configure only this logger, not the root logger"""
165188
if logger is None:
@@ -173,7 +196,7 @@ def bootstrap_logger(
173196
console=Console(
174197
stderr=True,
175198
width=200,
176-
color_system=None,
199+
color_system=None,
177200
force_terminal=False,
178201
legacy_windows=False,
179202
),
@@ -191,9 +214,9 @@ def bootstrap_logger(
191214
log_dir.mkdir(parents=True, exist_ok=True)
192215
file_path = log_dir / log_filename
193216
file_handler = logging.FileHandler(file_path, encoding="utf-8")
194-
file_handler.setFormatter(logging.Formatter(
195-
"%(asctime)s [%(levelname)s] %(name)s: %(message)s"
196-
))
217+
file_handler.setFormatter(
218+
logging.Formatter("%(asctime)s [%(levelname)s] %(name)s: %(message)s")
219+
)
197220
logger.addHandler(file_handler)
198221

199222
logger.setLevel(level)

0 commit comments

Comments
 (0)