目录
Zhenting Huang

[fix] handle mixed external_execution and regular tools for OpenAI (#6630)

Summary

Fixes index-based tool_call_id mapping in OpenAI Responses API that broke when mixing external_execution=True and regular tools in the same agent.

Fixes #6612

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Code complies with style guidelines
  • Ran ./scripts/format.sh and ./scripts/validate.sh
  • Self-review completed
  • Tests added/updated (8 new tests)

Additional Notes

Root cause: format_function_call_results used index-based mapping (tool_call_ids[index]) to assign call IDs. When external tools are present, tool_call_ids has entries for ALL tools but function_call_results only has internally-executed ones, causing wrong ID assignment.

Fix: Replaced with name-based fc_id -> call_id lookup from the assistant message’s tool_calls, consistent with _format_messages at line 449-457.


Co-authored-by: Uzair Ali 72073401+uzaxirr@users.noreply.github.com Co-authored-by: uzaxirr uzaxirr@gmail.com Co-authored-by: Claude Opus 4.6 noreply@anthropic.com Co-authored-by: Willem Carel de Jongh willemcarel@gmail.com Co-authored-by: kausmeows shuklakaustubh84@gmail.com

1个月前5251次提交

Build, run, and manage agentic software at scale.

Docs  •  Cookbook  •  Quickstart  •  Discord

What is Agno

Agno is the runtime for agentic software. Build agents, teams, and workflows. Run them as scalable services. Monitor and manage them in production.

Layer What it does
Framework Build agents, teams, and workflows with memory, knowledge, guardrails, and 100+ integrations.
Runtime Serve your system in production with a stateless, session-scoped FastAPI backend.
Control Plane Test, monitor, and manage your system using the AgentOS UI.

Quick Start

Build a stateful, tool-using agent and serve it as a production API in ~20 lines.

from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.anthropic import Claude
from agno.os import AgentOS
from agno.tools.mcp import MCPTools

agno_assist = Agent(
    name="Agno Assist",
    model=Claude(id="claude-sonnet-4-6"),
    db=SqliteDb(db_file="agno.db"),
    tools=[MCPTools(url="https://docs.agno.com/mcp")],
    add_history_to_context=True,
    num_history_runs=3,
    markdown=True,
)

agent_os = AgentOS(agents=[agno_assist], tracing=True)
app = agent_os.get_app()

Run it:

export ANTHROPIC_API_KEY="***"

uvx --python 3.12 \
  --with "agno[os]" \
  --with anthropic \
  --with mcp \
  fastapi dev agno_assist.py

In ~20 lines, you get:

  • A stateful agent with streaming responses
  • Per-user, per-session isolation
  • A production API at http://localhost:8000
  • Native tracing

Connect to the AgentOS UI to monitor, manage, and test your agents.

  1. Open os.agno.com and sign in.
  2. Click “Add new OS” in the top navigation.
  3. Select “Local” to connect to a local AgentOS.
  4. Enter your endpoint URL (default: http://localhost:8000).
  5. Name it “Local AgentOS”.
  6. Click “Connect”.

https://github.com/user-attachments/assets/75258047-2471-4920-8874-30d68c492683

Open Chat, select your agent, and ask:

What is Agno?

The agent retrieves context from the Agno MCP server and responds with grounded answers.

https://github.com/user-attachments/assets/24c28d28-1d17-492c-815d-810e992ea8d2

You can use this exact same architecture for running multi-agent systems in production.

Why Agno?

Agentic software introduces three fundamental shifts.

A new interaction model

Traditional software receives a request and returns a response. Agents stream reasoning, tool calls, and results in real time. They can pause mid-execution, wait for approval, and resume later.

Agno treats streaming and long-running execution as first-class behavior.

A new governance model

Traditional systems execute predefined decision logic written in advance. Agents choose actions dynamically. Some actions are low risk. Some require user approval. Some require administrative authority.

Agno lets you define who decides what as part of the agent definition, with:

  • Approval workflows
  • Human-in-the-loop
  • Audit logs
  • Enforcement at runtime

A new trust model

Traditional systems are designed to be predictable. Every execution path is defined in advance. Agents introduce probabilistic reasoning into the execution path.

Agno builds trust into the engine itself:

  • Guardrails run as part of execution
  • Evaluations integrate into the agent loop
  • Traces and audit logs are first-class

Built for Production

Agno runs in your infrastructure, not ours.

  • Stateless, horizontally scalable runtime.
  • 50+ APIs and background execution.
  • Per-user and per-session isolation.
  • Runtime approval enforcement.
  • Native tracing and full auditability.
  • Sessions, memory, knowledge, and traces stored in your database.

You own the system. You own the data. You define the rules.

What You Can Build

Agno powers real agentic systems built from the same primitives above.

  • Pal → A personal agent that learns your preferences.
  • Dash → A self-learning data agent grounded in six layers of context.
  • Scout → A self-learning context agent that manages enterprise context knowledge.
  • Gcode → A post-IDE coding agent that improves over time.
  • Investment Team → A multi-agent investment committee that debates and allocates capital.

Single agents. Coordinated teams. Structured workflows. All built on one architecture.

Get Started

  1. Read the docs
  2. Build your first agent
  3. Explore the cookbook

IDE Integration

Add Agno docs as a source in your coding tools:

Cursor: Settings → Indexing & Docs → Add https://docs.agno.com/llms-full.txt

Also works with VSCode, Windsurf, and similar tools.

Contributing

See the contributing guide.

Telemetry

Agno logs which model providers are used to prioritize updates. Disable with AGNO_TELEMETRY=false.

↑ Back to top

邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号