Repository navigation
Expand file tree
/
Copy pathprocessing.toml
More file actions
101 lines (86 loc) · 5.09 KB
/
Copy pathprocessing.toml
File metadata and controls
101 lines (86 loc) · 5.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Processing pipeline configuration
#
# Project-level settings for model selection, safety limits, behavior,
# and tracing. This file is version-controllable (not secrets).
#
# Secrets (API keys) and machine-specific paths (binary locations) stay
# in .env or shell environment (~/.zshrc).
#
# Values here can be overridden via environment variables (same key names
# as before, e.g. LLM_MODEL, RECURSION_LIMIT). The Gradio app overrides
# these at runtime via the UI.
# ── Model ─────────────────────────────────────────────────────────────────────
# Per-model defaults (temperature, thinking, provider) are configured in
# _MODEL_DEFAULTS in config.py. This just selects which model to use.
[model]
default = "moonshotai/Kimi-K2.6"
# ── Safety limits ─────────────────────────────────────────────────────────────
# These prevent runaway tool loops and excessive resource usage.
[limits]
# Max LangGraph node transitions per stream() call.
#
# Steady-state tool-call cost: ~4 ticks per call
# (action → variant_snapshot → hitl_check → agent).
# HITL round cost: ~6–10 additional ticks per gate
# (pass-1 prompt injection → agent analysis → optional present_images
# tool call → pass-2 interrupt → resume → agent). Each human feedback
# round inside an active HITL chat burns another ~4 ticks.
#
# Rough budgets including HITL overhead for a typical run with 4–6 gates:
# 150 ≈ 25 tool calls (tight — single-pass nonlinear only)
# 200 ≈ 35 tool calls (comfortable — iteration + a few HITL exchanges)
# 300 ≈ 55 tool calls (roomy — heavy iteration + multiple feedback rounds)
#
# Root-cause fixes for HITL tick burn are tracked separately (hitl_check
# pass 1 could inline the present_images call instead of prompting the
# agent to make it, saving ~4 ticks per gate). Until then, the safe
# default is 200 so the agent does not hit the ceiling mid-conversation.
recursion_limit = 200
# Global default for per-phase tool call limits (0 = disabled)
max_tools_per_phase = 30
# Hard fail if agent calls the same tool N times in a row (0 = disabled)
max_consecutive_same_tool = 3
# Max consecutive text-only responses before failing
max_autonomous_nudges = 2
# Force a HITL interrupt after the agent has run this many HITL-mapped tools
# during an active HITL conversation without ever pausing to narrate. The
# default re-run behavior is to wait for the agent to take a "narration breath"
# (a text-only AIMessage) before firing the interrupt — that lets the agent
# run a multi-variant comparison and present them all in one go. But an agent
# that never narrates can string together dozens of tools while the human is
# locked out. This counter is the safety net.
#
# Set to 0 to disable. 3 is a sensible default: enough headroom for a typical
# 3-variant comparison to fit in one breath, but tight enough to catch the
# runaway pattern within a few extra calls.
max_silent_hitl_tools = 3
# ── Per-phase tool limits ─────────────────────────────────────────────────────
# Override the global default for specific phases. 0 = use global default.
#
# Preprocessing phases have strict tool gating (few tools per phase), so these
# are safety nets against loops, not workflow tuning. Post-preprocessing phases
# (linear, stretch, nonlinear) legitimately need higher limits for iteration.
[limits.per_phase]
ingest = 5 # safety net — only resolve_target + advance_phase
calibration = 10 # 3 masters + convert + calibrate + possible retries
registration = 5 # safety net — single tool (siril_register)
analysis = 5 # safety net — single tool (analyze_frames)
stacking = 10 # select + stack + crop + iteration loop
linear = 20 # gradient, color, denoise, decon + iteration
stretch = 25 # variant creation + analysis per variant
nonlinear = 25 # fluid experimentation with checkpoints
export = 5 # safety net — single tool (export_final)
# ── Behavior ──────────────────────────────────────────────────────────────────
[behavior]
# Delete previous run folders (runs/*) when starting a new session.
# Each run writes ALL outputs to runs/<thread_id>/ — raw files are never touched.
cleanup_previous_runs = true
# Remove analyze_image/analyze_frames outputs from completed phases to save
# context window. The model's reasoning captures the conclusions; raw JSON is
# dead weight after a phase ends. Full data stays in state.
prune_phase_analysis = true
# ── LangSmith tracing ────────────────────────────────────────────────────────
# Requires LANGCHAIN_API_KEY in shell environment or .env.
[tracing]
enabled = false
project = "muphrid"