Stop Predicate
A stop predicate is the rule that decides when Theo should end a multi-step generation — e.g. stop after the calendar tool runs, or after N tool calls in research mode.
In depth
Stop predicates are how OpenCharts keeps long-running modes scoped without truncating useful work. Each mode declares its own predicate: smart (default), video (stop after a video tool), calendar (stop after Phase A then resume on follow-up).
They’re defined once in src/lib/ai/stopPredicates.ts and shared across web chat, Telegram, and the Theo Desk loop so behavior stays consistent everywhere Theo runs.
Examples
- Stop after start_calendar_code in social mode
- Stop after the first video tool in video mode
Also known as
Want to put this concept to work in OpenCharts?
Read moreRelated terms
Intent Classifier
The Intent Classifier is the layer that decides which Theo mode a message belongs to — fast, think, code, image, video, social, learn, research, or others — using regex patterns plus a small AI scorer.
Tool Call
A tool call is a structured action Theo invokes during a response — like create_flowchart, send_email, or db_run_sql — that produces a real artifact or side effect, not just text.
Social & Calendar Mode
Social Mode is Theo’s calendar-and-content-planning agent — it builds interactive HTML calendars, content schedules, Gantt timelines, and Kanban structure boards in one go.