open-agents-ai 0.80.0 → 0.81.0

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.
Files changed (2) hide show
  1. package/dist/index.js +34 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -24663,11 +24663,14 @@ var init_call_agent = __esm({
24663
24663
  const feed = getActivityFeed();
24664
24664
  const systemPrompt = this.buildSystemPrompt();
24665
24665
  const runnerOpts = {
24666
- maxTurns: this.tier === "admin" ? 15 : 5,
24667
- maxTokens: 4096,
24666
+ maxTurns: this.tier === "admin" ? 8 : 3,
24667
+ // Keep low for fast voice responses
24668
+ maxTokens: 2048,
24669
+ // Short responses for TTS
24668
24670
  temperature: 0.3,
24669
- requestTimeoutMs: 3e4,
24670
- taskTimeoutMs: 12e4,
24671
+ requestTimeoutMs: 2e4,
24672
+ // Fast timeout for voice responsiveness
24673
+ taskTimeoutMs: 6e4,
24671
24674
  modelTier: this.opts.modelTier ?? "large",
24672
24675
  contextWindowSize: this.opts.contextWindowSize,
24673
24676
  personality: this.opts.personality,
@@ -24766,17 +24769,17 @@ var init_call_agent = __esm({
24766
24769
  const historyContext = this.conversationHistory.slice(-10).map((h) => `${h.role === "user" ? "User" : "You"}: ${h.text}`).join("\n");
24767
24770
  const feed = getActivityFeed();
24768
24771
  const activitySummary = feed.getSummary(this.tier === "admin" ? 20 : 10, this.tier === "admin");
24772
+ const wantsAction = /\b(read|open|show|run|execute|check|look at|find|search|grep|edit|write|fix|test|build|deploy|install)\b/i.test(text) && !/\b(how are you|what's up|hello|hi|hey|can you hear|stop|quit|bye)\b/i.test(text);
24769
24773
  const taskPrompt = [
24770
- `The user said (via voice): "${text}"`,
24771
- "",
24772
- "Recent conversation:",
24773
- historyContext,
24774
+ `User said: "${text}"`,
24774
24775
  "",
24775
- "Recent agent activity:",
24776
- activitySummary,
24777
- "",
24778
- "Respond conversationally and concisely. Your response will be spoken aloud via TTS.",
24779
- "Call task_complete with your spoken response as the summary."
24776
+ historyContext ? `Conversation so far:
24777
+ ${historyContext}
24778
+ ` : "",
24779
+ `Background activity:
24780
+ ${activitySummary}
24781
+ `,
24782
+ wantsAction ? "The user is requesting an action. You may use tools, then call task_complete with a brief spoken summary of what you did." : "RESPOND IMMEDIATELY \u2014 call task_complete with your spoken reply. Do NOT use any tools. Just answer conversationally in 1-3 sentences."
24780
24783
  ].join("\n");
24781
24784
  const result = await this.runner.run(taskPrompt, `Working directory: ${this.repoRoot}`);
24782
24785
  if (result.summary) {
@@ -24797,18 +24800,24 @@ var init_call_agent = __esm({
24797
24800
  }
24798
24801
  buildSystemPrompt() {
24799
24802
  const base = [
24800
- "You are a voice assistant for an AI coding agent. Users are speaking to you through a live audio call.",
24801
- "Keep responses SHORT and conversational \u2014 they will be spoken aloud via text-to-speech.",
24802
- "Avoid code blocks, markdown formatting, or long technical explanations in your spoken responses.",
24803
- "If the user asks about what the agent is doing, summarize the recent activity concisely."
24803
+ "You are a voice assistant on a LIVE AUDIO CALL. This is a real-time conversation.",
24804
+ "",
24805
+ "CRITICAL RULES FOR VOICE CALLS:",
24806
+ "1. ALWAYS respond IMMEDIATELY with speech. Do NOT use tools before responding.",
24807
+ "2. Your response goes through text-to-speech \u2014 keep it SHORT (1-3 sentences).",
24808
+ "3. NEVER use code blocks, markdown, or long technical text.",
24809
+ "4. Be conversational and natural, like talking to a colleague.",
24810
+ "5. Call task_complete with your spoken response as the summary.",
24811
+ "6. Only use tools (file_read, grep, shell, etc.) if the user EXPLICITLY asks you to look something up, run a command, or make a change. For normal conversation, NEVER call tools.",
24812
+ "7. If the user asks what's happening, summarize from the activity context below \u2014 do NOT run tools to find out."
24804
24813
  ];
24805
24814
  if (this.opts.emotionContext) {
24806
- base.push("", "Current emotional context:", this.opts.emotionContext);
24815
+ base.push("", "Mood:", this.opts.emotionContext);
24807
24816
  }
24808
24817
  if (this.tier === "admin") {
24809
- base.push("", "This is an ADMIN call \u2014 you have full access to all tools and can execute commands, read/write files, search code, etc.", "You can take actions on behalf of the user just like the main agent.");
24818
+ base.push("", "ADMIN call \u2014 you CAN use tools IF the user explicitly requests an action (e.g. 'read that file', 'run the tests').", "But for general chat, status questions, or greetings \u2014 respond immediately WITHOUT tools.");
24810
24819
  } else {
24811
- base.push("", "This is a PUBLIC call \u2014 you have read-only access. You can read files and search code but cannot modify anything.", "You can answer questions about the project and explain what the agent is working on.", "Be helpful and friendly but do not execute any write operations.");
24820
+ base.push("", "PUBLIC call \u2014 read-only access. Answer questions about the project conversationally.");
24812
24821
  }
24813
24822
  return base.join("\n");
24814
24823
  }
@@ -39452,6 +39461,11 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
39452
39461
  if (voiceSession?.isActive) {
39453
39462
  return voiceSession.tunnelUrl;
39454
39463
  }
39464
+ if (!voiceEngine.enabled || !voiceEngine.ready) {
39465
+ writeContent(() => renderInfo("Auto-enabling voice for call session..."));
39466
+ const voiceMsg = await voiceEngine.toggle();
39467
+ writeContent(() => renderInfo(voiceMsg));
39468
+ }
39455
39469
  if (!adminSessionKey) {
39456
39470
  adminSessionKey = generateSessionKey();
39457
39471
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.80.0",
3
+ "version": "0.81.0",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",