openloops 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,6 +45,7 @@ const MAX_RETRIES = 4;
45
45
  const MAX_RATE_LIMIT_WAITS = 2;
46
46
  const DEFAULT_CALL_TIMEOUT_MS = 6e4;
47
47
  const MAX_TIMEOUT_RETRIES = 2;
48
+ const HIGH_THINKING_TIMEOUT_FACTOR = 2;
48
49
  const LANGFUSE_FLUSH_TIMEOUT_MS = 5e3;
49
50
  const REQUIRED_TOOL_CHOICE = {
50
51
  "anthropic-messages": "any",
@@ -98,7 +99,7 @@ class LLMClient {
98
99
  const resolvedChoice = toolChoice === "required" ? REQUIRED_TOOL_CHOICE[model.api] : toolChoice;
99
100
  if (toolChoice === "required" && !resolvedChoice) throw new Error(`[LLM Client] forced tool choice is not supported for api ${model.api}`);
100
101
  const context = (0, import_pi_ai_adapter.toPiContext)({ messages, tools }, model);
101
- const send = (omitTemperature) => this.withDeadline((signal) => {
102
+ const send = (omitTemperature) => this.withDeadline(thinking === "high" ? this.callTimeoutMs * HIGH_THINKING_TIMEOUT_FACTOR : this.callTimeoutMs, (signal) => {
102
103
  const options = { ...omitTemperature ? {} : { temperature }, maxRetries: MAX_RETRIES, signal, ...sessionId ? { sessionId } : {} };
103
104
  const reasoning = thinking && thinking !== "off" ? thinking : void 0;
104
105
  return resolvedChoice || thinking ? models.completeSimple(model, context, { ...options, ...resolvedChoice ? { toolChoice: resolvedChoice } : {}, ...reasoning ? { reasoning } : {} }) : models.complete(model, context, options);
@@ -121,7 +122,7 @@ class LLMClient {
121
122
  user: (0, import_model_resolution.toModelRef)(currentUser?.preferences?.defaultModel)
122
123
  });
123
124
  }
124
- async withDeadline(call) {
125
+ async withDeadline(timeoutMs, call) {
125
126
  for (let attempt = 1; attempt <= MAX_TIMEOUT_RETRIES + 1; attempt++) {
126
127
  const controller = new AbortController();
127
128
  let timer;
@@ -129,15 +130,15 @@ class LLMClient {
129
130
  timer = setTimeout(() => {
130
131
  controller.abort();
131
132
  resolve(void 0);
132
- }, this.callTimeoutMs);
133
+ }, timeoutMs);
133
134
  });
134
135
  const pending = call(controller.signal);
135
136
  pending.catch(() => void 0);
136
137
  const response = await Promise.race([pending, deadline]).finally(() => clearTimeout(timer));
137
138
  if (response) return response;
138
- this.logger.warn({ attempt, timeoutMs: this.callTimeoutMs }, "[LLM Service] The model did not answer in time");
139
+ this.logger.warn({ attempt, timeoutMs }, "[LLM Service] The model did not answer in time");
139
140
  }
140
- throw new import_llm_error.LLMError("LLM_TIMEOUT", `the model did not answer within ${this.callTimeoutMs} ms in ${MAX_TIMEOUT_RETRIES + 1} attempts`);
141
+ throw new import_llm_error.LLMError("LLM_TIMEOUT", `the model did not answer within ${timeoutMs} ms in ${MAX_TIMEOUT_RETRIES + 1} attempts`);
141
142
  }
142
143
  async flushLangfuse() {
143
144
  if (!this.langfuseEnabled) return;
@@ -13,6 +13,7 @@ const MAX_RETRIES = 4;
13
13
  const MAX_RATE_LIMIT_WAITS = 2;
14
14
  const DEFAULT_CALL_TIMEOUT_MS = 6e4;
15
15
  const MAX_TIMEOUT_RETRIES = 2;
16
+ const HIGH_THINKING_TIMEOUT_FACTOR = 2;
16
17
  const LANGFUSE_FLUSH_TIMEOUT_MS = 5e3;
17
18
  const REQUIRED_TOOL_CHOICE = {
18
19
  "anthropic-messages": "any",
@@ -66,7 +67,7 @@ class LLMClient {
66
67
  const resolvedChoice = toolChoice === "required" ? REQUIRED_TOOL_CHOICE[model.api] : toolChoice;
67
68
  if (toolChoice === "required" && !resolvedChoice) throw new Error(`[LLM Client] forced tool choice is not supported for api ${model.api}`);
68
69
  const context = toPiContext({ messages, tools }, model);
69
- const send = (omitTemperature) => this.withDeadline((signal) => {
70
+ const send = (omitTemperature) => this.withDeadline(thinking === "high" ? this.callTimeoutMs * HIGH_THINKING_TIMEOUT_FACTOR : this.callTimeoutMs, (signal) => {
70
71
  const options = { ...omitTemperature ? {} : { temperature }, maxRetries: MAX_RETRIES, signal, ...sessionId ? { sessionId } : {} };
71
72
  const reasoning = thinking && thinking !== "off" ? thinking : void 0;
72
73
  return resolvedChoice || thinking ? models.completeSimple(model, context, { ...options, ...resolvedChoice ? { toolChoice: resolvedChoice } : {}, ...reasoning ? { reasoning } : {} }) : models.complete(model, context, options);
@@ -89,7 +90,7 @@ class LLMClient {
89
90
  user: toModelRef(currentUser?.preferences?.defaultModel)
90
91
  });
91
92
  }
92
- async withDeadline(call) {
93
+ async withDeadline(timeoutMs, call) {
93
94
  for (let attempt = 1; attempt <= MAX_TIMEOUT_RETRIES + 1; attempt++) {
94
95
  const controller = new AbortController();
95
96
  let timer;
@@ -97,15 +98,15 @@ class LLMClient {
97
98
  timer = setTimeout(() => {
98
99
  controller.abort();
99
100
  resolve(void 0);
100
- }, this.callTimeoutMs);
101
+ }, timeoutMs);
101
102
  });
102
103
  const pending = call(controller.signal);
103
104
  pending.catch(() => void 0);
104
105
  const response = await Promise.race([pending, deadline]).finally(() => clearTimeout(timer));
105
106
  if (response) return response;
106
- this.logger.warn({ attempt, timeoutMs: this.callTimeoutMs }, "[LLM Service] The model did not answer in time");
107
+ this.logger.warn({ attempt, timeoutMs }, "[LLM Service] The model did not answer in time");
107
108
  }
108
- throw new LLMError("LLM_TIMEOUT", `the model did not answer within ${this.callTimeoutMs} ms in ${MAX_TIMEOUT_RETRIES + 1} attempts`);
109
+ throw new LLMError("LLM_TIMEOUT", `the model did not answer within ${timeoutMs} ms in ${MAX_TIMEOUT_RETRIES + 1} attempts`);
109
110
  }
110
111
  async flushLangfuse() {
111
112
  if (!this.langfuseEnabled) return;
@@ -51,6 +51,9 @@ export interface LLMResponse {
51
51
  }
52
52
  export type LLMToolChoice = 'auto' | 'none' | 'required';
53
53
  export type ThinkingEffort = 'off' | 'low' | 'medium' | 'high';
54
+ export declare const SELECTABLE_THINKING_EFFORTS: readonly ["low", "medium", "high"];
55
+ export type SelectableThinkingEffort = typeof SELECTABLE_THINKING_EFFORTS[number];
56
+ export declare const isSelectableThinkingEffort: (value: unknown) => value is SelectableThinkingEffort;
54
57
  export interface LLMChatParams {
55
58
  origin: string;
56
59
  sessionId: string;
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
6
10
  var __copyProps = (to, from, except, desc) => {
7
11
  if (from && typeof from === "object" || typeof from === "function") {
8
12
  for (let key of __getOwnPropNames(from))
@@ -13,4 +17,15 @@ var __copyProps = (to, from, except, desc) => {
13
17
  };
14
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
19
  var llm_types_exports = {};
20
+ __export(llm_types_exports, {
21
+ SELECTABLE_THINKING_EFFORTS: () => SELECTABLE_THINKING_EFFORTS,
22
+ isSelectableThinkingEffort: () => isSelectableThinkingEffort
23
+ });
16
24
  module.exports = __toCommonJS(llm_types_exports);
25
+ const SELECTABLE_THINKING_EFFORTS = ["low", "medium", "high"];
26
+ const isSelectableThinkingEffort = (value) => SELECTABLE_THINKING_EFFORTS.includes(value);
27
+ // Annotate the CommonJS export names for ESM import in node:
28
+ 0 && (module.exports = {
29
+ SELECTABLE_THINKING_EFFORTS,
30
+ isSelectableThinkingEffort
31
+ });
@@ -0,0 +1,7 @@
1
+ import "../../chunk-CF3WOMB3.mjs";
2
+ const SELECTABLE_THINKING_EFFORTS = ["low", "medium", "high"];
3
+ const isSelectableThinkingEffort = (value) => SELECTABLE_THINKING_EFFORTS.includes(value);
4
+ export {
5
+ SELECTABLE_THINKING_EFFORTS,
6
+ isSelectableThinkingEffort
7
+ };
@@ -6,6 +6,7 @@ import { AgentTask } from '../services/tasks/entities/agent-task.entity.js';
6
6
  import { AgentAction } from '../services/tasks/entities/agent-action.entity.js';
7
7
  import { Tool, BaseParams } from '../tools/tool.js';
8
8
  import { SkillRunOptions } from '../skills/skill.js';
9
+ import { SelectableThinkingEffort } from '../clients/llm/llm-types.js';
9
10
  import { WeightedKeyword, ScoredTool } from './utils/rank-tools-by-keywords';
10
11
  import type { ToolCatalog } from './tool-catalog';
11
12
  import { Workspace } from './workspace';
@@ -15,6 +16,7 @@ export interface RunContext {
15
16
  task?: AgentTask;
16
17
  chat: Chat;
17
18
  chatOptions?: ChatSettingsProps;
19
+ thinkingEffort?: SelectableThinkingEffort;
18
20
  currentUser: CurrentUser;
19
21
  currentSession?: CurrentSession;
20
22
  currentMessage: string;
@@ -50,6 +50,7 @@ export declare class Agent {
50
50
  private readonly strictMode;
51
51
  private readonly fallbackModel?;
52
52
  private model?;
53
+ private thinkingEffort?;
53
54
  private _tools;
54
55
  private _internalMcps;
55
56
  private _mcps;
@@ -45,6 +45,7 @@ var import_tool_pipeline = require("./tool-pipeline");
45
45
  var import_native_tools = require("./native-tools");
46
46
  var import_tool_catalog = require("./tool-catalog");
47
47
  var import_llm_error = require("../clients/llm/llm-error.js");
48
+ var import_llm_types = require("../clients/llm/llm-types.js");
48
49
  var import_model_resolution = require("../clients/llm/model-resolution.js");
49
50
  const MCP_CONNECT_RETRY_DELAYS_MS = [1e3, 2e3];
50
51
  const MCP_DESCRIPTION_CHARS = 300;
@@ -67,6 +68,7 @@ class Agent {
67
68
  strictMode;
68
69
  fallbackModel;
69
70
  model;
71
+ thinkingEffort;
70
72
  _tools;
71
73
  _internalMcps = [];
72
74
  _mcps = [];
@@ -173,6 +175,8 @@ class Agent {
173
175
  this.mcpTokens = mcpTokens ?? {};
174
176
  this.serviceToken = serviceToken;
175
177
  this.model = void 0;
178
+ this.thinkingEffort = void 0;
179
+ if (options?.thinkingEffort !== void 0 && !(0, import_llm_types.isSelectableThinkingEffort)(options.thinkingEffort)) throw new Error(`[AGENT] thinkingEffort must be one of ${import_llm_types.SELECTABLE_THINKING_EFFORTS.join(", ")}`);
176
180
  if (Boolean(options?.modelProvider) !== Boolean(options?.modelName)) throw new Error("[AGENT] Set both modelProvider and modelName, or neither");
177
181
  this.answerId = new import_mongodb.ObjectId().toString();
178
182
  const proceed = await this.preRunner(chatId);
@@ -260,6 +264,9 @@ class Agent {
260
264
  });
261
265
  this.currentChat.settings?.setModelProvider(this.model.provider);
262
266
  this.currentChat.settings?.setModelName(this.model.model);
267
+ if (this.chatOptions?.thinkingEffort) this.currentChat.settings?.setThinkingEffort(this.chatOptions.thinkingEffort);
268
+ const savedEffort = this.currentChat.settings?.thinkingEffort;
269
+ this.thinkingEffort = this.chatOptions?.thinkingEffort ?? ((0, import_llm_types.isSelectableThinkingEffort)(savedEffort) ? savedEffort : void 0);
263
270
  if (this.chatOptions?.loopName) this.currentChat.settings?.setLoopName(this.chatOptions.loopName);
264
271
  this.awaitingConfirmation = this.currentChat.state?.status === import_agent_state.AgentStatus.AWAITING_USER_CONFIRMATION;
265
272
  this.currentChat.state?.setStatus(import_agent_state.AgentStatus.PROCESSING);
@@ -863,6 +870,7 @@ Ref: ${guard.ref}`, { source: "harness", excludeFromContext: true });
863
870
  task: this.currentChat.activeTask,
864
871
  chat: this.currentChat,
865
872
  chatOptions: this.chatOptions,
873
+ thinkingEffort: this.thinkingEffort,
866
874
  currentUser: this.currentUser,
867
875
  currentSession: this.currentSession,
868
876
  currentMessage: this.currentMessage,
@@ -30,6 +30,7 @@ import { ToolPipeline } from "./tool-pipeline";
30
30
  import { NATIVE_TOOLS } from "./native-tools";
31
31
  import { buildToolCatalog, isDeclarable, needsSearch } from "./tool-catalog";
32
32
  import { LLMError } from "../clients/llm/llm-error.js";
33
+ import { isSelectableThinkingEffort, SELECTABLE_THINKING_EFFORTS } from "../clients/llm/llm-types.js";
33
34
  import { resolveModel, toModelRef } from "../clients/llm/model-resolution.js";
34
35
  const MCP_CONNECT_RETRY_DELAYS_MS = [1e3, 2e3];
35
36
  const MCP_DESCRIPTION_CHARS = 300;
@@ -52,6 +53,7 @@ class Agent {
52
53
  strictMode;
53
54
  fallbackModel;
54
55
  model;
56
+ thinkingEffort;
55
57
  _tools;
56
58
  _internalMcps = [];
57
59
  _mcps = [];
@@ -158,6 +160,8 @@ class Agent {
158
160
  this.mcpTokens = mcpTokens ?? {};
159
161
  this.serviceToken = serviceToken;
160
162
  this.model = void 0;
163
+ this.thinkingEffort = void 0;
164
+ if (options?.thinkingEffort !== void 0 && !isSelectableThinkingEffort(options.thinkingEffort)) throw new Error(`[AGENT] thinkingEffort must be one of ${SELECTABLE_THINKING_EFFORTS.join(", ")}`);
161
165
  if (Boolean(options?.modelProvider) !== Boolean(options?.modelName)) throw new Error("[AGENT] Set both modelProvider and modelName, or neither");
162
166
  this.answerId = new ObjectId().toString();
163
167
  const proceed = await this.preRunner(chatId);
@@ -245,6 +249,9 @@ class Agent {
245
249
  });
246
250
  this.currentChat.settings?.setModelProvider(this.model.provider);
247
251
  this.currentChat.settings?.setModelName(this.model.model);
252
+ if (this.chatOptions?.thinkingEffort) this.currentChat.settings?.setThinkingEffort(this.chatOptions.thinkingEffort);
253
+ const savedEffort = this.currentChat.settings?.thinkingEffort;
254
+ this.thinkingEffort = this.chatOptions?.thinkingEffort ?? (isSelectableThinkingEffort(savedEffort) ? savedEffort : void 0);
248
255
  if (this.chatOptions?.loopName) this.currentChat.settings?.setLoopName(this.chatOptions.loopName);
249
256
  this.awaitingConfirmation = this.currentChat.state?.status === AgentStatus.AWAITING_USER_CONFIRMATION;
250
257
  this.currentChat.state?.setStatus(AgentStatus.PROCESSING);
@@ -848,6 +855,7 @@ Ref: ${guard.ref}`, { source: "harness", excludeFromContext: true });
848
855
  task: this.currentChat.activeTask,
849
856
  chat: this.currentChat,
850
857
  chatOptions: this.chatOptions,
858
+ thinkingEffort: this.thinkingEffort,
851
859
  currentUser: this.currentUser,
852
860
  currentSession: this.currentSession,
853
861
  currentMessage: this.currentMessage,
@@ -50,7 +50,7 @@ class AgiLoop extends import_harness.AgentLoop {
50
50
  return "agi";
51
51
  }
52
52
  get version() {
53
- return "1.8.4";
53
+ return "1.8.7";
54
54
  }
55
55
  get author() {
56
56
  return {
@@ -106,6 +106,7 @@ class AgiLoop extends import_harness.AgentLoop {
106
106
  const catalog = await harness.toolCatalog();
107
107
  const result = await import_reasoning_engine.reasoningEngine.run({
108
108
  ...ctx.skillParams,
109
+ thinking: ctx.thinkingEffort,
109
110
  history: task.history({
110
111
  budget: { turns_left: MAX_TURNS - task.turnCount, tool_calls_left: MAX_TOOL_CALLS - task.toolCallCount },
111
112
  ...warning ? { warning } : {},
@@ -28,7 +28,7 @@ class AgiLoop extends AgentLoop {
28
28
  return "agi";
29
29
  }
30
30
  get version() {
31
- return "1.8.4";
31
+ return "1.8.7";
32
32
  }
33
33
  get author() {
34
34
  return {
@@ -84,6 +84,7 @@ class AgiLoop extends AgentLoop {
84
84
  const catalog = await harness.toolCatalog();
85
85
  const result = await reasoningEngine.run({
86
86
  ...ctx.skillParams,
87
+ thinking: ctx.thinkingEffort,
87
88
  history: task.history({
88
89
  budget: { turns_left: MAX_TURNS - task.turnCount, tool_calls_left: MAX_TOOL_CALLS - task.toolCallCount },
89
90
  ...warning ? { warning } : {},
@@ -25,9 +25,10 @@ var import_skill = require("../../../skills/skill.js");
25
25
  var import_shared_rules = require("../../../skills/shared/shared-rules.js");
26
26
  const reasoningEngine = new import_skill.Skill({
27
27
  name: "reasoning_engine",
28
- version: "2.5.2",
28
+ version: "2.5.4",
29
29
  description: "Continuous reasoning cycle of the agent: reads the situation or the results of its last actions, rewrites its working state and decides the next actions, including the final answer.",
30
30
  temperature: 0.3,
31
+ thinking: "medium",
31
32
  systemRole: true,
32
33
  systemInstructions: {
33
34
  instruction_set: {
@@ -39,7 +40,7 @@ const reasoningEngine = new import_skill.Skill({
39
40
  "STATE: Your state is your working memory and the harness returns it to you in the next cycle. Rewrite it completely in every response, carrying forward what still matters. Use these keys, each a short text: 'objective' (what the user wants, in your own words), 'progress' (what is done and learned so far, citing refs), 'tried' (what you attempted that failed or gave nothing, so you never repeat it), 'expecting' (what you expect these actions to return) and 'next' (what you will do once you have it).",
40
41
  `LEARNED: 'learned' is an optional list of {"key": "...", "value": "..."} with the facts you will need in later cycles and must not lose: entities with their exact identifiers (for example the customer or document the user chose, and its id), schemas of tools you will call, and decisions of the user. Add only what is new. The harness keeps it and returns all of it in HARNESS.known in every cycle, so you do not need to copy it into the state. Before an action that targets an entity, use the one in HARNESS.known, and never replace it with a different one unless the user asks. Before calling a tool, take its argument names from HARNESS.schemas when it is listed there.`,
41
42
  `ACTIONS: 'actions' is a list of objects like {"tool": "<exact tool name>", "arguments": {...}}. The tool must be one of the names in your tool list. Copy the name character by character, including the server prefix of external tools (like 'server__tool'), which is part of the name. The only thing you may drop is a leading 'functions.'. The arguments must match its schema. You cannot call tools natively: you only ask for them through actions. Independent actions in the same response run in parallel; dependent ones go in later responses. Never invent tool names or arguments.`,
42
- "ACTIVITY: Always write 'activity'. It is shown to the user while the actions you ask for run and while you think about their results, until your next response. Write one short sentence of at most 60 characters: a verb in the progressive form followed by what is being looked up or done, taken from the user's request. It must be in the language of 'language' and of the message of the user, never in the language of these instructions. Never mention tool names, ids, refs or technical terms, never include amounts or personal data, and do not promise a result. The only exception is when your actions just deliver the final answer: then leave it out.",
43
+ "ACTIVITY: Always write 'activity'. It is shown to the user while the actions you ask for run and while you think about their results, until your next response. Write one short sentence of at most 60 characters: a verb in the progressive form followed by what is being looked up or done, taken from the user's request. It must be in the language of 'language' and of the message of the user, never in the language of these instructions. Never mention tool names, ids, refs or technical terms, never include personal data, and do not promise a result. The only exception is when your actions just deliver the final answer: then leave it out.",
43
44
  "NEVER_EMPTY: 'actions' always has at least one action. 'reasoning' and 'state' are never shown to the user, so writing there that you will answer or summarize delivers nothing. As soon as you have what you need, your action is 'respond' with the complete final answer, written in that same response.",
44
45
  `LOOP: After your actions run, the next message you receive is {"OBSERVATIONS": [...]} with one entry per action (ref, tool, status, output or error). Continue from there. You finish the task only with a 'respond' action, which delivers your final answer; use it alone or with actions whose results you no longer need.`,
45
46
  "HARNESS_NOTICES: A message may contain a 'HARNESS' key with notices from your body, such as the remaining budget, a warning, a stop reason, 'known' (the facts kept for you, including the answers of the user) or 'schemas' (the arguments of the tools you have already seen). Obey them.",
@@ -3,9 +3,10 @@ import { Skill } from "../../../skills/skill.js";
3
3
  import { FORMATTING, LATEX_FORMATTING, CITATION_FORMATTING } from "../../../skills/shared/shared-rules.js";
4
4
  const reasoningEngine = new Skill({
5
5
  name: "reasoning_engine",
6
- version: "2.5.2",
6
+ version: "2.5.4",
7
7
  description: "Continuous reasoning cycle of the agent: reads the situation or the results of its last actions, rewrites its working state and decides the next actions, including the final answer.",
8
8
  temperature: 0.3,
9
+ thinking: "medium",
9
10
  systemRole: true,
10
11
  systemInstructions: {
11
12
  instruction_set: {
@@ -17,7 +18,7 @@ const reasoningEngine = new Skill({
17
18
  "STATE: Your state is your working memory and the harness returns it to you in the next cycle. Rewrite it completely in every response, carrying forward what still matters. Use these keys, each a short text: 'objective' (what the user wants, in your own words), 'progress' (what is done and learned so far, citing refs), 'tried' (what you attempted that failed or gave nothing, so you never repeat it), 'expecting' (what you expect these actions to return) and 'next' (what you will do once you have it).",
18
19
  `LEARNED: 'learned' is an optional list of {"key": "...", "value": "..."} with the facts you will need in later cycles and must not lose: entities with their exact identifiers (for example the customer or document the user chose, and its id), schemas of tools you will call, and decisions of the user. Add only what is new. The harness keeps it and returns all of it in HARNESS.known in every cycle, so you do not need to copy it into the state. Before an action that targets an entity, use the one in HARNESS.known, and never replace it with a different one unless the user asks. Before calling a tool, take its argument names from HARNESS.schemas when it is listed there.`,
19
20
  `ACTIONS: 'actions' is a list of objects like {"tool": "<exact tool name>", "arguments": {...}}. The tool must be one of the names in your tool list. Copy the name character by character, including the server prefix of external tools (like 'server__tool'), which is part of the name. The only thing you may drop is a leading 'functions.'. The arguments must match its schema. You cannot call tools natively: you only ask for them through actions. Independent actions in the same response run in parallel; dependent ones go in later responses. Never invent tool names or arguments.`,
20
- "ACTIVITY: Always write 'activity'. It is shown to the user while the actions you ask for run and while you think about their results, until your next response. Write one short sentence of at most 60 characters: a verb in the progressive form followed by what is being looked up or done, taken from the user's request. It must be in the language of 'language' and of the message of the user, never in the language of these instructions. Never mention tool names, ids, refs or technical terms, never include amounts or personal data, and do not promise a result. The only exception is when your actions just deliver the final answer: then leave it out.",
21
+ "ACTIVITY: Always write 'activity'. It is shown to the user while the actions you ask for run and while you think about their results, until your next response. Write one short sentence of at most 60 characters: a verb in the progressive form followed by what is being looked up or done, taken from the user's request. It must be in the language of 'language' and of the message of the user, never in the language of these instructions. Never mention tool names, ids, refs or technical terms, never include personal data, and do not promise a result. The only exception is when your actions just deliver the final answer: then leave it out.",
21
22
  "NEVER_EMPTY: 'actions' always has at least one action. 'reasoning' and 'state' are never shown to the user, so writing there that you will answer or summarize delivers nothing. As soon as you have what you need, your action is 'respond' with the complete final answer, written in that same response.",
22
23
  `LOOP: After your actions run, the next message you receive is {"OBSERVATIONS": [...]} with one entry per action (ref, tool, status, output or error). Continue from there. You finish the task only with a 'respond' action, which delivers your final answer; use it alone or with actions whose results you no longer need.`,
23
24
  "HARNESS_NOTICES: A message may contain a 'HARNESS' key with notices from your body, such as the remaining budget, a warning, a stop reason, 'known' (the facts kept for you, including the answers of the user) or 'schemas' (the arguments of the tools you have already seen). Obey them.",
@@ -25,7 +25,7 @@ var import_skill = require("../../../skills/skill.js");
25
25
  var import_shared_rules = require("../../../skills/shared/shared-rules.js");
26
26
  const fastResponder = new import_skill.Skill({
27
27
  name: "fast_responder",
28
- version: "2.4.2",
28
+ version: "2.4.3",
29
29
  description: "Handles general conversations and multipurpose user assistance.",
30
30
  temperature: 0.7,
31
31
  thinking: "low",
@@ -42,7 +42,7 @@ const fastResponder = new import_skill.Skill({
42
42
  "LANGUAGE_DETECTION: Identify the language of the CURRENT user message in INPUT.user_message, or follow any explicit request to answer in a specific language (e.g., 'responde en espa\xF1ol', 'reply in English'). Base this decision ONLY on the actual text the user just typed. CONTEXT.user_details.preferred_language reflects the app's configured display language, NOT what the user is typing right now \u2014 it MUST NEVER influence this detection, even when it disagrees with the message's actual language. Always generate the 'answer' field in that detected or requested language, and set 'detected_language' in the output to its 2-letter ISO 639-1 code (e.g., 'es', 'en', 'fr').",
43
43
  "MEMORY_AND_PERSONAL_DATA_CHECK: Do NOT assume, pretend, or hallucinate remembering past events, meetings, notes, or specific user context. If the user asks about something mentioned in the past (e.g., 'recuerdas la reuni\xF3n...?', 'qu\xE9 te dije de...?'), set 'can_answer' to false UNLESS the exact details are explicitly provided inside 'context_injection'. Never fake memory.",
44
44
  "CAPABILITY_CHECK: Set 'can_answer' to false if: 1) The query involves creating, registering, updating, or deleting data or non-text resources (e.g., expenses, records, reminders, calendar entries), 2) The query refers to personal memory, past events, meetings, or stored notes not present in 'context_injection', 3) The query requires specialized skills or tools (e.g., searching databases, calendar lookup, external integrations), 4) The query requires live internet access (news, weather, live data), 5) The query is a correction, rejection, or negative feedback regarding a previously executed task or tool response (e.g., 'no era esa fecha', 'te equivocaste', 'busca otra opci\xF3n', 'eso no sirvi\xF3'). When 'can_answer' is false, leave 'answer' minimal or empty for the fallback engine.",
45
- "ACTIVITY: When 'can_answer' is false, always write in 'activity' one short sentence of at most 60 characters: a verb in the present or progressive form followed by what you will look up or do, taken from the user's request. It must be in 'detected_language' and match the language of the message of the user, never the language of these instructions. Never mention tool names or technical terms, never include amounts or personal data, and do not promise a result. Leave it empty when 'can_answer' is true.",
45
+ "ACTIVITY: When 'can_answer' is false, always write in 'activity' one short sentence of at most 60 characters: a verb in the present or progressive form followed by what you will look up or do, taken from the user's request. It must be in 'detected_language' and match the language of the message of the user, never the language of these instructions. Never mention tool names or technical terms, never include personal data, and do not promise a result. Leave it empty when 'can_answer' is true.",
46
46
  "REASONING: Always generate the 'reasoning' field with a short explanation in English of the decision-making process, regardless of whether 'can_answer' is true or false.",
47
47
  import_shared_rules.FORMATTING,
48
48
  import_shared_rules.LATEX_FORMATTING,
@@ -3,7 +3,7 @@ import { Skill } from "../../../skills/skill.js";
3
3
  import { FORMATTING, LATEX_FORMATTING, CITATION_FORMATTING, POLICY_RESTRICTIONS } from "../../../skills/shared/shared-rules.js";
4
4
  const fastResponder = new Skill({
5
5
  name: "fast_responder",
6
- version: "2.4.2",
6
+ version: "2.4.3",
7
7
  description: "Handles general conversations and multipurpose user assistance.",
8
8
  temperature: 0.7,
9
9
  thinking: "low",
@@ -20,7 +20,7 @@ const fastResponder = new Skill({
20
20
  "LANGUAGE_DETECTION: Identify the language of the CURRENT user message in INPUT.user_message, or follow any explicit request to answer in a specific language (e.g., 'responde en espa\xF1ol', 'reply in English'). Base this decision ONLY on the actual text the user just typed. CONTEXT.user_details.preferred_language reflects the app's configured display language, NOT what the user is typing right now \u2014 it MUST NEVER influence this detection, even when it disagrees with the message's actual language. Always generate the 'answer' field in that detected or requested language, and set 'detected_language' in the output to its 2-letter ISO 639-1 code (e.g., 'es', 'en', 'fr').",
21
21
  "MEMORY_AND_PERSONAL_DATA_CHECK: Do NOT assume, pretend, or hallucinate remembering past events, meetings, notes, or specific user context. If the user asks about something mentioned in the past (e.g., 'recuerdas la reuni\xF3n...?', 'qu\xE9 te dije de...?'), set 'can_answer' to false UNLESS the exact details are explicitly provided inside 'context_injection'. Never fake memory.",
22
22
  "CAPABILITY_CHECK: Set 'can_answer' to false if: 1) The query involves creating, registering, updating, or deleting data or non-text resources (e.g., expenses, records, reminders, calendar entries), 2) The query refers to personal memory, past events, meetings, or stored notes not present in 'context_injection', 3) The query requires specialized skills or tools (e.g., searching databases, calendar lookup, external integrations), 4) The query requires live internet access (news, weather, live data), 5) The query is a correction, rejection, or negative feedback regarding a previously executed task or tool response (e.g., 'no era esa fecha', 'te equivocaste', 'busca otra opci\xF3n', 'eso no sirvi\xF3'). When 'can_answer' is false, leave 'answer' minimal or empty for the fallback engine.",
23
- "ACTIVITY: When 'can_answer' is false, always write in 'activity' one short sentence of at most 60 characters: a verb in the present or progressive form followed by what you will look up or do, taken from the user's request. It must be in 'detected_language' and match the language of the message of the user, never the language of these instructions. Never mention tool names or technical terms, never include amounts or personal data, and do not promise a result. Leave it empty when 'can_answer' is true.",
23
+ "ACTIVITY: When 'can_answer' is false, always write in 'activity' one short sentence of at most 60 characters: a verb in the present or progressive form followed by what you will look up or do, taken from the user's request. It must be in 'detected_language' and match the language of the message of the user, never the language of these instructions. Never mention tool names or technical terms, never include personal data, and do not promise a result. Leave it empty when 'can_answer' is true.",
24
24
  "REASONING: Always generate the 'reasoning' field with a short explanation in English of the decision-making process, regardless of whether 'can_answer' is true or false.",
25
25
  FORMATTING,
26
26
  LATEX_FORMATTING,
@@ -1,3 +1,4 @@
1
+ import type { SelectableThinkingEffort } from '../../../clients/llm/llm-types.js';
1
2
  export type ExecutionMode = 'interactive' | 'autonomous';
2
3
  export interface ChatSettingsProps {
3
4
  notifyOnCompletion?: boolean;
@@ -6,6 +7,7 @@ export interface ChatSettingsProps {
6
7
  modelName?: string;
7
8
  loopName?: string;
8
9
  executionMode?: ExecutionMode;
10
+ thinkingEffort?: SelectableThinkingEffort;
9
11
  }
10
12
  export declare class ChatSettings {
11
13
  private readonly props;
@@ -15,11 +17,13 @@ export declare class ChatSettings {
15
17
  modelName?: string | undefined;
16
18
  loopName?: string | undefined;
17
19
  executionMode?: ExecutionMode | undefined;
18
- constructor(props: ChatSettingsProps, notifyOnCompletion?: boolean | undefined, isPrivateSession?: boolean | undefined, modelProvider?: string | undefined, modelName?: string | undefined, loopName?: string | undefined, executionMode?: ExecutionMode | undefined);
20
+ thinkingEffort?: SelectableThinkingEffort | undefined;
21
+ constructor(props: ChatSettingsProps, notifyOnCompletion?: boolean | undefined, isPrivateSession?: boolean | undefined, modelProvider?: string | undefined, modelName?: string | undefined, loopName?: string | undefined, executionMode?: ExecutionMode | undefined, thinkingEffort?: SelectableThinkingEffort | undefined);
19
22
  static fromJSON(props: ChatSettingsProps): ChatSettings;
20
23
  toJSON(): ChatSettingsProps;
21
24
  setLoopName(loopName: string): void;
22
25
  setExecutionMode(executionMode: ExecutionMode): void;
26
+ setThinkingEffort(thinkingEffort: SelectableThinkingEffort): void;
23
27
  setModelProvider(modelProvider: string): void;
24
28
  setModelName(modelName: string): void;
25
29
  setNotifyOnCompletion(notifyOnCompletion: boolean): void;
@@ -22,7 +22,7 @@ __export(chat_settings_entity_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(chat_settings_entity_exports);
24
24
  class ChatSettings {
25
- constructor(props, notifyOnCompletion, isPrivateSession, modelProvider, modelName, loopName, executionMode) {
25
+ constructor(props, notifyOnCompletion, isPrivateSession, modelProvider, modelName, loopName, executionMode, thinkingEffort) {
26
26
  this.props = props;
27
27
  this.notifyOnCompletion = notifyOnCompletion;
28
28
  this.isPrivateSession = isPrivateSession;
@@ -30,6 +30,7 @@ class ChatSettings {
30
30
  this.modelName = modelName;
31
31
  this.loopName = loopName;
32
32
  this.executionMode = executionMode;
33
+ this.thinkingEffort = thinkingEffort;
33
34
  }
34
35
  props;
35
36
  notifyOnCompletion;
@@ -38,6 +39,7 @@ class ChatSettings {
38
39
  modelName;
39
40
  loopName;
40
41
  executionMode;
42
+ thinkingEffort;
41
43
  static fromJSON(props) {
42
44
  return new ChatSettings(
43
45
  props,
@@ -46,7 +48,8 @@ class ChatSettings {
46
48
  props.modelProvider,
47
49
  props.modelName,
48
50
  props.loopName,
49
- props.executionMode
51
+ props.executionMode,
52
+ props.thinkingEffort
50
53
  );
51
54
  }
52
55
  toJSON() {
@@ -56,7 +59,8 @@ class ChatSettings {
56
59
  modelProvider: this.modelProvider,
57
60
  modelName: this.modelName,
58
61
  loopName: this.loopName,
59
- executionMode: this.executionMode
62
+ executionMode: this.executionMode,
63
+ thinkingEffort: this.thinkingEffort
60
64
  };
61
65
  }
62
66
  setLoopName(loopName) {
@@ -65,6 +69,9 @@ class ChatSettings {
65
69
  setExecutionMode(executionMode) {
66
70
  this.executionMode = executionMode;
67
71
  }
72
+ setThinkingEffort(thinkingEffort) {
73
+ this.thinkingEffort = thinkingEffort;
74
+ }
68
75
  setModelProvider(modelProvider) {
69
76
  this.modelProvider = modelProvider;
70
77
  }
@@ -1,6 +1,6 @@
1
1
  import "../../../chunk-CF3WOMB3.mjs";
2
2
  class ChatSettings {
3
- constructor(props, notifyOnCompletion, isPrivateSession, modelProvider, modelName, loopName, executionMode) {
3
+ constructor(props, notifyOnCompletion, isPrivateSession, modelProvider, modelName, loopName, executionMode, thinkingEffort) {
4
4
  this.props = props;
5
5
  this.notifyOnCompletion = notifyOnCompletion;
6
6
  this.isPrivateSession = isPrivateSession;
@@ -8,6 +8,7 @@ class ChatSettings {
8
8
  this.modelName = modelName;
9
9
  this.loopName = loopName;
10
10
  this.executionMode = executionMode;
11
+ this.thinkingEffort = thinkingEffort;
11
12
  }
12
13
  props;
13
14
  notifyOnCompletion;
@@ -16,6 +17,7 @@ class ChatSettings {
16
17
  modelName;
17
18
  loopName;
18
19
  executionMode;
20
+ thinkingEffort;
19
21
  static fromJSON(props) {
20
22
  return new ChatSettings(
21
23
  props,
@@ -24,7 +26,8 @@ class ChatSettings {
24
26
  props.modelProvider,
25
27
  props.modelName,
26
28
  props.loopName,
27
- props.executionMode
29
+ props.executionMode,
30
+ props.thinkingEffort
28
31
  );
29
32
  }
30
33
  toJSON() {
@@ -34,7 +37,8 @@ class ChatSettings {
34
37
  modelProvider: this.modelProvider,
35
38
  modelName: this.modelName,
36
39
  loopName: this.loopName,
37
- executionMode: this.executionMode
40
+ executionMode: this.executionMode,
41
+ thinkingEffort: this.thinkingEffort
38
42
  };
39
43
  }
40
44
  setLoopName(loopName) {
@@ -43,6 +47,9 @@ class ChatSettings {
43
47
  setExecutionMode(executionMode) {
44
48
  this.executionMode = executionMode;
45
49
  }
50
+ setThinkingEffort(thinkingEffort) {
51
+ this.thinkingEffort = thinkingEffort;
52
+ }
46
53
  setModelProvider(modelProvider) {
47
54
  this.modelProvider = modelProvider;
48
55
  }
@@ -32,6 +32,7 @@ export interface SkillRunOptions<TInput = Record<string, any>> {
32
32
  chatHistory?: ChatTurn[];
33
33
  tools?: LLMToolDefinition[];
34
34
  mode?: SkillMode;
35
+ thinking?: ThinkingEffort;
35
36
  }
36
37
  export interface SkillCallInfo {
37
38
  skill: string;
@@ -47,7 +48,7 @@ export declare class Skill<TResponse = Record<string, any>> {
47
48
  readonly version?: string;
48
49
  readonly description?: string;
49
50
  readonly temperature?: number;
50
- readonly thinking?: ThinkingEffort;
51
+ readonly thinking: ThinkingEffort;
51
52
  readonly systemInstructions: Record<string, any>;
52
53
  readonly systemRole: boolean;
53
54
  readonly mode: SkillMode;
@@ -31,6 +31,7 @@ var import_runtime_context = require("./runtime-context");
31
31
  var import_call_modes = require("./call-modes");
32
32
  var import_call_modes2 = require("./call-modes");
33
33
  const RAW_RESPONSE_CHARS = 300;
34
+ const DEFAULT_THINKING_EFFORT = "low";
34
35
  const RESERVED_CONTEXT_KEYS = ["tools", "mode", "history", "chatHistory"];
35
36
  class Skill {
36
37
  name;
@@ -46,13 +47,13 @@ class Skill {
46
47
  this.version = props.version;
47
48
  this.description = props.description;
48
49
  this.temperature = props.temperature;
49
- this.thinking = props.thinking;
50
+ this.thinking = props.thinking ?? DEFAULT_THINKING_EFFORT;
50
51
  this.systemInstructions = props.systemInstructions;
51
52
  this.systemRole = props.systemRole ?? true;
52
53
  this.mode = props.mode ?? import_call_modes.DEFAULT_SKILL_MODE;
53
54
  }
54
55
  async run(options) {
55
- const { provider, modelName, sessionId, answerId, userMessage, currentUser, currentSession, contextInjection = {}, input = {}, chat, history = [], chatHistory = [], tools, mode = this.mode } = options;
56
+ const { provider, modelName, sessionId, answerId, userMessage, currentUser, currentSession, contextInjection = {}, input = {}, chat, history = [], chatHistory = [], tools, mode = this.mode, thinking = this.thinking } = options;
56
57
  const misplaced = RESERVED_CONTEXT_KEYS.filter((key) => key in contextInjection);
57
58
  if (misplaced.length) throw new Error(`[SKILL:${this.name}] ${misplaced.join(", ")} must be passed as run options, not inside contextInjection`);
58
59
  if (history.length && chatHistory.length) throw new Error(`[SKILL:${this.name}] history and chatHistory cannot be used together`);
@@ -81,7 +82,7 @@ class Skill {
81
82
  tools: call.tools,
82
83
  toolChoice: call.toolChoice,
83
84
  temperature: this.temperature ?? 0.7,
84
- ...this.thinking ? { thinking: this.thinking } : {}
85
+ thinking
85
86
  });
86
87
  const reading = (0, import_call_modes.readModeResponse)(mode, this.name, response, { expectActions: Boolean(tools?.length) });
87
88
  if (reading.blocks > 1) {
@@ -7,6 +7,7 @@ import { buildRuntimeContext } from "./runtime-context";
7
7
  import { DEFAULT_SKILL_MODE, buildModeCall, readModeResponse } from "./call-modes";
8
8
  import { SkillMode as SkillMode2, DEFAULT_SKILL_MODE as DEFAULT_SKILL_MODE2 } from "./call-modes";
9
9
  const RAW_RESPONSE_CHARS = 300;
10
+ const DEFAULT_THINKING_EFFORT = "low";
10
11
  const RESERVED_CONTEXT_KEYS = ["tools", "mode", "history", "chatHistory"];
11
12
  class Skill {
12
13
  name;
@@ -22,13 +23,13 @@ class Skill {
22
23
  this.version = props.version;
23
24
  this.description = props.description;
24
25
  this.temperature = props.temperature;
25
- this.thinking = props.thinking;
26
+ this.thinking = props.thinking ?? DEFAULT_THINKING_EFFORT;
26
27
  this.systemInstructions = props.systemInstructions;
27
28
  this.systemRole = props.systemRole ?? true;
28
29
  this.mode = props.mode ?? DEFAULT_SKILL_MODE;
29
30
  }
30
31
  async run(options) {
31
- const { provider, modelName, sessionId, answerId, userMessage, currentUser, currentSession, contextInjection = {}, input = {}, chat, history = [], chatHistory = [], tools, mode = this.mode } = options;
32
+ const { provider, modelName, sessionId, answerId, userMessage, currentUser, currentSession, contextInjection = {}, input = {}, chat, history = [], chatHistory = [], tools, mode = this.mode, thinking = this.thinking } = options;
32
33
  const misplaced = RESERVED_CONTEXT_KEYS.filter((key) => key in contextInjection);
33
34
  if (misplaced.length) throw new Error(`[SKILL:${this.name}] ${misplaced.join(", ")} must be passed as run options, not inside contextInjection`);
34
35
  if (history.length && chatHistory.length) throw new Error(`[SKILL:${this.name}] history and chatHistory cannot be used together`);
@@ -57,7 +58,7 @@ class Skill {
57
58
  tools: call.tools,
58
59
  toolChoice: call.toolChoice,
59
60
  temperature: this.temperature ?? 0.7,
60
- ...this.thinking ? { thinking: this.thinking } : {}
61
+ thinking
61
62
  });
62
63
  const reading = readModeResponse(mode, this.name, response, { expectActions: Boolean(tools?.length) });
63
64
  if (reading.blocks > 1) {
package/docs/agent.md CHANGED
@@ -64,6 +64,7 @@ Omit `chatId` to start a brand-new chat. Pass an existing `chatId` to continue a
64
64
  | Option | What it does |
65
65
  | --- | --- |
66
66
  | `modelProvider`, `modelName` | Model for this run, always together. It is saved in the chat and used by the next runs that do not send one. Without it, the model comes from the chat, the preference of the user and the fallbacks. See [configuration](configuration.md#which-model-a-chat-uses). |
67
+ | `thinkingEffort` | `low`, `medium` or `high`: how much the reasoning engine thinks before each response. Any other value makes the run fail before calling the model. It is saved in the chat only when you send it, and the next runs that do not send one reuse it. Without it, the reasoning engine uses `medium`. `high` is slower, so its model calls get twice the time limit (see [Timeouts](configuration.md#timeouts)). It does not change the fast responder, which always uses `low`. |
67
68
  | `loopName` | Name of the loop driving the chat. Set automatically from the loop. |
68
69
  | `executionMode` | `interactive` (default) or `autonomous`. See [Autonomous mode](#autonomous-mode). |
69
70
  | `notifyOnCompletion` | Exposed as `agent.notifyOnCompletion` so a post execution hook can notify the user. |
package/docs/chats.md CHANGED
@@ -11,7 +11,7 @@ import { createChat, getChatById, listChatsByUser, updateChat, deleteChat } from
11
11
  | Field | Meaning |
12
12
  | --- | --- |
13
13
  | `state` | `status`, detected `language`, `activeTaskId`, `lastError` and `stopRequested`. See [agent](agent.md#the-result) for the statuses. It also has `currentActivity`, which is deprecated (see below). |
14
- | `settings` | `modelProvider` and `modelName` (the model the chat uses, saved on every run), `loopName`, `executionMode`, `notifyOnCompletion` and `isPrivateSession`. |
14
+ | `settings` | `modelProvider` and `modelName` (the model the chat uses, saved on every run), `thinkingEffort` (only when a run sent it), `loopName`, `executionMode`, `notifyOnCompletion` and `isPrivateSession`. |
15
15
  | `messages` | The conversation. Each message has `role` (`user` or `assistant`), `source`, `content`, `answerId` and `excludeFromContext`. |
16
16
 
17
17
  ### `state.currentActivity` is deprecated
@@ -17,7 +17,7 @@
17
17
  | `AGENTIC_JOBS_POLL_INTERVAL_MS` | no | How often the runner of [agentic jobs](agentic-jobs.md) checks what is due, in milliseconds. Defaults to `60000`. |
18
18
  | `AGENTIC_JOBS_LEASE_MS` | no | How long a job stays locked while it runs, in milliseconds. Defaults to `600000`. |
19
19
  | `LLM_FALLBACK_PROVIDER`, `LLM_FALLBACK_MODEL` | no | The model to use when nothing else chooses one, for the whole deployment. Set both or neither. See [Which model a chat uses](#which-model-a-chat-uses). |
20
- | `LLM_CALL_TIMEOUT_MS` | no | Longest time to wait for one attempt of a model call, in milliseconds. Defaults to `60000`. See [Timeouts](#timeouts). |
20
+ | `LLM_CALL_TIMEOUT_MS` | no | Longest time to wait for one attempt of a model call, in milliseconds. Defaults to `60000`, and calls with the `high` thinking effort get twice as much. See [Timeouts](#timeouts). |
21
21
  | `MCP_TOOL_TIMEOUT_MS` | no | Longest time to wait for a tool of an MCP server, in milliseconds. Defaults to `60000`. See [Timeouts](#timeouts). |
22
22
  | `SENTRY_DSN` | no | Errors are reported to Sentry when set, unless `IS_LOCAL` is `true` or `NODE_ENV` is `development`. |
23
23
  | `LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY`, `LANGFUSE_BASE_URL` | no | Traces every LLM call in Langfuse when all three are set. |
@@ -57,7 +57,7 @@ It is in the low price tier, it makes the most of the prompt cache, which matter
57
57
 
58
58
  A model call that never answers would block the whole run, so every attempt has a time limit:
59
59
 
60
- - **Model calls.** An attempt that does not answer within `LLM_CALL_TIMEOUT_MS` (60 seconds by default) is cancelled and the same call is made again, up to 3 attempts in total. When all of them time out, the run fails with the error code `LLM_TIMEOUT` and a message for the user, and the chat is left as `failed` so the user can send the message again. Waiting for a provider that asks to slow down is a separate mechanism and is not affected.
60
+ - **Model calls.** An attempt that does not answer within `LLM_CALL_TIMEOUT_MS` (60 seconds by default) is cancelled and the same call is made again, up to 3 attempts in total. A call with the `high` thinking effort, which thinks for longer, gets twice that time. When all of them time out, the run fails with the error code `LLM_TIMEOUT` and a message for the user, and the chat is left as `failed` so the user can send the message again. Waiting for a provider that asks to slow down is a separate mechanism and is not affected.
61
61
  - **Tools of MCP servers.** A tool that does not answer within `MCP_TOOL_TIMEOUT_MS` (60 seconds by default) fails. The time starts again every time the server reports progress, so a long tool that is alive is not cut off. A tool call is never repeated automatically, because it may have changed something. The model is told that the result is unknown and that it must check before repeating it.
62
62
  - **Langfuse.** Sending the trace of a call to Langfuse waits at most 5 seconds. If it takes longer or fails, the run continues without it.
63
63
 
package/docs/skills.md CHANGED
@@ -44,7 +44,7 @@ export const myResponder = new Skill<ResponseSchema>({
44
44
  | `version` | no | Recorded in the metadata of every call. Bump it whenever the prompt changes. |
45
45
  | `description` | no | What the skill is for. |
46
46
  | `temperature` | no | Sampling temperature. Defaults to `0.7`. |
47
- | `thinking` | no | How much the model thinks before it answers: `off`, `low`, `medium` or `high`. Thinking costs time and output tokens, so a skill that only classifies or answers briefly can set it low. When it is left out the provider default applies, which is high for the Claude models. The bundled `fast_responder` uses `low`. |
47
+ | `thinking` | no | How much the model thinks before it answers: `off`, `low`, `medium` or `high`. Thinking costs time and output tokens, so a skill that only classifies or answers briefly can set it low. When it is left out it is `low`. Set `high` only for a skill that needs to reason at length, because it is slower and costs more. The bundled `fast_responder` uses `low` and the `reasoning_engine` uses `medium`. |
48
48
  | `systemRole` | no | Default `true`: the instructions travel as a system message. |
49
49
  | `mode` | no | How the model is called when tools are given. Defaults to `plain_chat`. |
50
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openloops",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "Open source harness for AI agents: a TypeScript runtime with persistence, tools, MCP trust, approvals and autonomous jobs, where the loop is pluggable",
5
5
  "author": {
6
6
  "name": "Jose Barcos",