1243 Commits

Author SHA1 Message Date
Copilot
3e30f9e05d
Add documentation warnings for AgentTool/TeamTool parallel tool calls limitation (#6883)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ekzhu <320302+ekzhu@users.noreply.github.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-08-01 19:19:32 -05:00
Eric Zhu
c1e4ae6819
Add approval_func option to CodeExecutorAgent (#6886) 2025-08-01 19:13:38 -05:00
Copilot
ca3d693b19
Make DockerCommandLineCodeExecutor the default for MagenticOne team (#6684)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: husseinmozannar <25182234+husseinmozannar@users.noreply.github.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: ekzhu <320302+ekzhu@users.noreply.github.com>
2025-07-29 15:31:42 -07:00
Eric Zhu
7865151a58
Remove assistant related methods from OpenAIAgent (#6866) 2025-07-29 19:24:17 +00:00
Eric Zhu
e85eea88f2
Update OpenAIAssistantAgent doc (#6870) 2025-07-28 01:52:10 -07:00
Eric Zhu
1ca7419213
Update version to 0.7.1 (#6868) 2025-07-28 01:31:26 -07:00
Eric Zhu
7d627f45ca
Bring back OpenAIAssistantAgent (#6867) 2025-07-28 01:29:06 -07:00
Eric Zhu
d6ec7b85e3
Update version to 0.7.0 (#6865) 2025-07-27 23:23:50 -07:00
Eric Zhu
98e6bba168
Supporting Teams as Participants in a GroupChat (#5863) 2025-07-27 22:59:09 -07:00
4shen0ne
2618496f72
fix: use ```sh consistently (#6864) 2025-07-27 22:53:29 -07:00
Eric Zhu
b33b688991
Update installation guide in _openai_assistant_agent.py (#6863) 2025-07-27 17:59:11 -07:00
4shen0ne
75c8a198bd
fix: load agent correctly in test service (#6860) 2025-07-28 00:55:31 +00:00
Victor Dibia
f00d1eef9e
upgrade graphrag sample to v2.3+ (#6744)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-27 02:04:40 -07:00
Copilot
5f1c69d049
Add include_name_in_message parameter to make name field optional in OpenAI messages (#6845)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ekzhu <320302+ekzhu@users.noreply.github.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-27 00:39:39 -07:00
Saverio Murgia
ac051ba6d0
docs: correct function spelling (#6849)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-27 00:29:11 -07:00
Brian Fox
ac28510c42
Add support for "format": "json" in JSON schemas (#6846)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-27 07:15:48 +00:00
Justin Cechmanek
3b139c6539
Adds Redis Memory extension class (#6743) 2025-07-25 21:54:22 -07:00
Saverio Murgia
e26bb1c850
fix: use correct format when adding memory to mem0 (#6831)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-23 22:46:59 +00:00
Copilot
7c536a8c95
Fix OpenAI UnprocessableEntityError when AssistantAgent makes multiple tool calls (#6799)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ekzhu <320302+ekzhu@users.noreply.github.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-20 00:30:42 -07:00
Eric Zhu
ae024e262d
Deprecating openai assistant agent. Apply version conditioned import for open ai version < 1.83 (#6827) 2025-07-17 16:37:20 -07:00
Tyler Payne
413d8f158c
Expand MCP Workbench to support more MCP Client features (#6785)
Co-authored-by: Tyler Payne <tylerpayne@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2025-07-17 08:11:08 -07:00
lo5twind
aa131bb7f7
feat: add timeout for http tools (#6818)
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2025-07-16 13:06:06 -07:00
Victor Dibia
b2cef7f47c
Update AGS (Support Workbenches ++) (#6736)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-07-16 10:03:02 -07:00
Victor Dibia
d094a3fd47
Upgrade_mcp_version (#6814)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-07-16 09:26:55 -07:00
Copilot
ca39adc358
Fix JSON serialization of team state by handling datetime objects in message dump (#6797)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ekzhu <320302+ekzhu@users.noreply.github.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-14 19:05:53 -07:00
Dave Howard
f45adde638
In Add required termination condition and missing agent_e (#6809)
Co-authored-by: dave-howard <dave@codypy.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-15 01:58:51 +00:00
Eric Zhu
06da36080c
Setup publishing for pyautogen package (#6813) 2025-07-14 17:34:21 -07:00
Tejas Dharani
25d732876e
Feat/OpenAI agent builtin tools 6657 (#6671)
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-10 10:29:20 -07:00
Eric Zhu
9f2c5aa1be
Update to version 0.6.4 (#6784) 2025-07-09 10:46:23 -07:00
Eric Zhu
af85eb26c2
Remove duckduckgo search tools and agents (#6783) 2025-07-09 10:32:23 -07:00
Eric Zhu
0a2971c54a
Update version to 0.6.3 (#6781) 2025-07-09 09:21:44 -07:00
Eric Zhu
c92530de1a
Update tracing doc (#6776) 2025-07-08 18:11:05 -07:00
Eric Zhu
f881d8a80d
Remove otel semcov package from core dependencies (#6775) 2025-07-08 18:03:58 -07:00
Ryan Sousa
203323fb3e
feat: add qwen2.5vl support (#6650)
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-07 23:13:02 +00:00
Zen
4ccac43b02
SingleThreadedAgentRuntime to use subclass check for factory_wrapper instead of equality (#6731)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-07 16:02:06 -07:00
Sean Goedecke
02e6574566
Update GitHub Models url to the new url (#6759)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-07 15:49:41 -07:00
Marcos Muíño García
64f27510ed
Add autogen-ext-yepcode project to community projects (#6764) 2025-07-07 15:28:18 -07:00
Eric Zhu
d2619049f3
Add reflection for claude model in AssistantAgent (#6763) 2025-07-07 15:13:52 -07:00
Eric Zhu
4a3634d6da
Move docs from python/packages/autogen-core to python/docs (#6757) 2025-07-06 21:31:36 -07:00
Eric Zhu
89841b6aaf
Add script to automatically generate API documentation and remove hard-coded RST files; fix API docs (#6755) 2025-07-06 18:38:39 -07:00
VARAD SRIVASTAVA
13f9a73519
Added DuckDuckGo Search Tool and Agent in AutoGen Extensions (#6682)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-06 15:59:55 -07:00
Copilot
0bd99ee516
Add tool name and description override functionality to Workbench implementations (#6690)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ekzhu <320302+ekzhu@users.noreply.github.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-06 13:39:05 -07:00
Copilot
e10767421f
Fix GraphFlowManager termination to prevent _StopAgent from polluting conversation context (#6752)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ekzhu <320302+ekzhu@users.noreply.github.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-06 00:57:03 -07:00
Copilot
c23b9454a8
Fix GraphFlow to support multiple task execution without explicit reset (#6747)
## Problem

When using GraphFlow with a termination condition, the second task
execution would immediately terminate without running any agents. The
first task would run successfully, but subsequent tasks would skip all
agents and go directly to the stop agent.

This was demonstrated by the following issue:

```python
# First task runs correctly
result1 = await team.run(task="First task")  #  Works fine

# Second task fails immediately  
result2 = await team.run(task="Second task")  #  Only user + stop messages
```

## Root Cause

The `GraphFlowManager` was not resetting its execution state when
termination occurred. After the first task completed:

1. The `_ready` queue was empty (all nodes had been processed)
2. The `_remaining` and `_enqueued_any` tracking structures remained in
"completed" state
3. The `_message_thread` retained history from the previous task

This left the graph in a "completed" state, causing subsequent tasks to
immediately trigger the stop agent instead of executing the workflow.

## Solution

Added an override of the `_apply_termination_condition` method in
`GraphFlowManager` to automatically reset the graph execution state when
termination occurs:

```python
async def _apply_termination_condition(
    self, delta: Sequence[BaseAgentEvent | BaseChatMessage], increment_turn_count: bool = False
) -> bool:
    # Call the base implementation first
    terminated = await super()._apply_termination_condition(delta, increment_turn_count)
    
    # If terminated, reset the graph execution state and message thread for the next task
    if terminated:
        self._remaining = {target: Counter(groups) for target, groups in self._graph.get_remaining_map().items()}
        self._enqueued_any = {n: {g: False for g in self._enqueued_any[n]} for n in self._enqueued_any}
        self._ready = deque([n for n in self._graph.get_start_nodes()])
        # Clear the message thread to start fresh for the next task
        self._message_thread.clear()
    
    return terminated
```

This ensures that when a task completes (termination condition is met),
the graph is automatically reset to its initial state ready for the next
task.

## Testing

Added a comprehensive test case
`test_digraph_group_chat_multiple_task_execution` that validates:
- Multiple tasks can be run sequentially without explicit reset calls
- All agents are executed the expected number of times  
- Both tasks produce the correct number of messages
- The fix works with various termination conditions
(MaxMessageTermination, TextMentionTermination)

## Result

GraphFlow now works like SelectorGroupChat where multiple tasks can be
run sequentially without explicit resets between them:

```python
# Both tasks now work correctly
result1 = await team.run(task="First task")   #  5 messages, all agents called
result2 = await team.run(task="Second task")  #  5 messages, all agents called again
```

Fixes #6746.

> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `esm.ubuntu.com`
>   - Triggering command: `/usr/lib/apt/methods/https` (dns block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to my [firewall allow
list](https://gh.io/copilot/firewall-config)
>
> </details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💬 Share your feedback on Copilot coding agent for the chance to win a
$200 gift card! Click
[here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to
start the survey.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ekzhu <320302+ekzhu@users.noreply.github.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-05 23:32:50 -07:00
Z1m4-blu3
aa0d835f4d
Fix function calling support for Llama3.3 (#6750)
## Why are these changes needed?
This PR fixes incorrect model metadata for llama3.3.
The function_calling capability was previously set to False, but
[llama3.3 supports function
calling.](https://www.llama.com/docs/model-cards-and-prompt-formats/llama3_3/)
with [ollama](https://ollama.com/library/llama3.3).

<!-- Please give a short summary of the change and the problem this
solves. -->

## Related issue number

<!-- For example: "Closes #1234" -->

## Checks

- [x] I've included any doc changes needed for
<https://microsoft.github.io/autogen/>. See
<https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to
build and test documentation locally.
- [x] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [x] I've made sure all auto checks have passed.

Co-authored-by: mh <>
2025-07-06 03:42:59 +00:00
Eric Zhu
556033b0f0
Update agentchat documentation with latest changes (#6735) 2025-07-01 08:26:15 +09:00
Eric Zhu
83845584c0
update version to 0.6.2 (#6734) 2025-07-01 08:13:46 +09:00
Tejas Dharani
f650d35faa
Fix output task messages 6150 (#6678)
## Why are these changes needed?

The existing run_stream methods used fragile count-based logic (count <=
len(task)) to skip task messages during streaming. This approach was
brittle and broke when team structure changed or task composition
varied, particularly affecting SocietyOfMindAgent's ability to properly
encapsulate inner team messages.

This PR adds an output_task_messages parameter to run_stream methods to
provide explicit control over task message inclusion in streams,
replacing the fragile count-based logic with robust message filtering.

## Related issue number

Closes #6150

## Checks

- [ ] I've included any doc changes needed for
<https://microsoft.github.io/autogen/>. See
<https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to
build and test documentation locally.
- [x] I've added tests corresponding to the changes introduced in this
PR.
- [x] I've made sure all auto checks have passed.

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-07-01 00:19:59 +09:00
Copilot
c150f85044
Add tool_choice parameter to ChatCompletionClient create and create_stream methods (#6697)
## Summary

Implements the `tool_choice` parameter for `ChatCompletionClient`
interface as requested in #6696. This allows users to restrict which
tools the model can choose from when multiple tools are available.

## Changes

### Core Interface
- Core Interface: Added `tool_choice: Tool | Literal["auto", "required",
"none"] = "auto"` parameter to `ChatCompletionClient.create()` and
`create_stream()` methods
- Model Implementations: Updated client implementations to support the
new parameter, for now, only the following model clients are supported:
  - OpenAI
  - Anthropic
  - Azure AI
  - Ollama
- `LlamaCppChatCompletionClient` currently not supported

Features
- "auto" (default): Let the model choose whether to use tools, when
there is no tool, it has no effect.
- "required": Force the model to use at least one tool
- "none": Disable tool usage completely
- Tool object: Force the model to use a specific tool

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ekzhu <320302+ekzhu@users.noreply.github.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-06-30 14:15:28 +09:00
Tejas Dharani
6f15270cb2
Feat/tool call loop (#6651)
## Why are these changes needed?

This PR addresses critical issues in the AssistantAgent that affect tool
handling:

**Lack of tool call loop functionality**: The agent could not perform
multiple consecutive tool calls in a single turn, limiting its ability
to complete complex multi-step tasks that require chaining tool
operations.

These changes enhance the agent's robustness and capability while
maintaining full backward compatibility through feature flags.

## Related issue number

Closes  #6268

## Checks

- [x] I've included any doc changes needed for
<https://microsoft.github.io/autogen/>. See
<https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to
build and test documentation locally.
- [x] I've added tests corresponding to the changes introduced in this
PR.
- [x] I've made sure all auto checks have passed.

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-06-30 01:52:03 +09:00