Commit Graph

1061 Commits

Author SHA1 Message Date
abhijeethaval 707c3cf655
Update teams.ipynb : In the sample code the termination condition is set to the text "APPROVE" but the documentation mentions "TERMINATE" (#5426)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-02-07 20:41:01 +00:00
Eric Zhu abdc0da4f1
Add sample chat application with FastAPI (#5433)
Introduce a sample chat application using AgentChat and FastAPI,
demonstrating single-agent and team chat functionalities, along with
state persistence and conversation history management.

Resolves #5423

---------

Co-authored-by: Victor Dibia <victor.dibia@gmail.com>
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2025-02-07 20:17:56 +00:00
afourney f20ba9127d
M1 docker (#5437)
Presently MagenticOne and the m1 CLI use the LocalCommandLineExecutor
(presumably copied from the agbench code, which already runs in Docker).

This pr defaults m1 to Docker, and adds a code_executor parameter to
MagenticOne, which defaults to local for now to maintain backward
compatibility -- but this behavior is immediately deprecated.
2025-02-07 20:08:28 +00:00
Wei Jen Lu 5fcb3b8061
Fix typo in Swarm doc (#5435)
Fix typo in Swarm doc
2025-02-07 11:58:56 -08:00
so2liu 07c5dc7514
fix: streaming token mode cannot work in function calls and will infi… (#5396)
Fix: Prevent empty messages accumulation in streaming mode

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-02-07 10:42:27 -08:00
Eric Zhu 901ab1276d
feat: enhance AzureAIChatCompletionClient validation and add unit tests (#5417)
Resolves #5414
2025-02-07 18:32:14 +00:00
afourney af5dcc7fdf
Significant updates to agbench. (#5313)
- Updated HumanEval template to use AgentChat
- Update templates to use config.yaml for model and other configuration
- Read environment from ENV.yaml (ENV.json still supported but
deprecated)
- Temporarily removed WebArena and AssistantBench. Neither had viable
Templates after `autogen_magentic_one` was removed. Templates need to be
update to AgentChat (in a future PR, but this PR is getting big enough
already)
2025-02-07 18:01:44 +00:00
Jack Gerrits f7f5507c70
Split out GRPC tests (#5431) 2025-02-07 16:57:30 +00:00
afourney 4c1c12d350
Flush console output after every message. (#5415) 2025-02-06 22:20:06 -08:00
afourney 3c30d8961e
Prompting changes to better support smaller models. (#5386)
A series of changes to the
`python/packages/autogen-ext/src/autogen_ext/agents/web_surfer/_multimodal_web_surfer.py`
file have been made to better support smaller models.

This includes changes to the prompts, state descriptions, and ordering
of messages.

Regression tasks with OpenAI models shows no change in GAIA scores,
while scores for Llama are significantly improved.
2025-02-06 17:47:55 -08:00
afourney 59e392cd0f
Get SelectorGroupChat working for Llama models. (#5409)
Get's SelectorGroupChat working for llama by:

1. Using a UserMessage rather than a SystemMessage
2. Normalizing how roles are presented (one agent per line)
3. Normalizing how the transcript is constructed (a blank line between
every message)
2025-02-06 16:03:17 -08:00
Jack Gerrits 25f26a338b
Updates to proto for state apis (#5407) 2025-02-06 16:54:21 -05:00
Jack Gerrits ca428914f5
Refactor grpc channel connection in servicer (#5402) 2025-02-06 13:53:24 -05:00
afourney cf798aef3f
Various web surfer fixes. (#5393)
This PR fixes:

A prompting bug when no control had focus.
Awkward prompt phrasing.
Renamed page_down to scroll_down to better match other prompting and
agent descriptions.
2025-02-05 22:17:18 -08:00
afourney ac74305913
Ensure decriptions appear each on one line. Fix web_surfer's desc (#5390)
Some agent descriptions were split over multiple lines in the M1
orchestrator. This PR ensures that each description appears on one, and
only one, line. This makes it easier for smaller models to understand.
2025-02-05 20:17:24 -08:00
afourney d86540e9cd
Fix summarize_page in a text-only context, and for unknown models. (#5388)
WebSurfer's summarize_page was failing when the model was text-only, or
unknown.
2025-02-06 00:57:46 +00:00
Wei Jen Lu 7947464e4a
Fixed example code in doc:Custom Agents (#5381)
The Tuple class is never used in CountDownAgent class.

<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

<!-- 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://microsoft.github.io/autogen/docs/Contribute#documentation 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: Victor Dibia <victordibia@microsoft.com>
2025-02-06 00:52:32 +00:00
Eitan Yarmush 172a16a615
Memory component base (#5380)
<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

Currently the way to accomplish RAG behavior with agent chat,
specifically assistant agents is with the memory interface, however
there is no way to configure it via the declarative API.

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

## Related issue number

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

## Checks

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

---------

Co-authored-by: Victor Dibia <chuvidi2003@gmail.com>
2025-02-05 16:07:27 -08:00
Wei Jen Lu 9030f75b4d
Fix typo (#5361)
Just fix typo

<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

<!-- 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://microsoft.github.io/autogen/docs/Contribute#documentation to
build and test documentation locally.
- [x] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [ ] I've made sure all auto checks have passed.
2025-02-05 09:57:39 -05:00
Leonardo Pinheiro 5c969d3f10
fix: add state management for oai assistant (#5352)
<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

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

To allow serialization of OAI Assistant Agent.

## Related issue number

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

Closes #5130 

## Checks

- [ ] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation to
build and test documentation locally.
- [ ] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [ ] I've made sure all auto checks have passed.
2025-02-04 21:56:30 +00:00
Eric Zhu 68cc2e1019
docs(python): add instructions for syncing dependencies and checking samples (#5362)
Address some common questions.
2025-02-04 19:35:51 +00:00
Jack Gerrits 40d74a32a1
Use proto descriptor for typename (#5346)
Closes #5302
2025-02-04 19:18:16 +00:00
Victor Dibia 6454e3fece
fix permission issue in ags windows (#5360)
<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

Fix permission issue in ags windows (env files now stored in a user
directory)

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

## Related issue number

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

- [ ] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation to
build and test documentation locally.
- [ ] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [ ] I've made sure all auto checks have passed.
2025-02-04 10:23:46 -08:00
afourney cf6fa77273
Add text-only model support to M1 (#5344)
Modify M1 agents to support text-only settings.
This allows M1 to be used with models like o3-mini and Llama3.1+
2025-02-04 08:25:48 -08:00
afourney 517e3f000e
Assistant agent drop images when not provided with a vision-capable model. (#5351)
Allow AssistantAgent to drop images when not equipped with a multi-modal model.

Adds a corresponding utility function, which can be used in autogen-ext and teams, to accomplish the same.
2025-02-04 14:55:04 +00:00
Juan 5df5bde127
docs(core_distributed-group-chat): fix the typos in the docs in the README.md (#5347)
<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

Wrong file names in the README.md

## Related issue number



## Checks

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

Co-authored-by: Mohammad Mazraeh <Mazraeh.Mohammad@Gmail.com>
2025-02-04 07:13:03 +00:00
Victor Dibia b89ca2a5ae
Fix warnings in AGS (#5320)
This PR does the following: 

- Fix warning messages in AGS on launch.
- Improve Cli message to include app URL on startup from command line
- Minor improvements default gallery generator. (add more default tools)
- Improve new session behaviour.



## Related issue number

Closes #5097

## Checks
2025-02-04 06:32:34 +00:00
Victor Dibia fbda70320d
Ensure ModelInfo field is serialized for OpenAIChatCompletionClient (#5315)
<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

Fix bug where the `model_info` field is not serialized for the
`OpenAIChatCompletionClient` class. This was because the `_raw_config`
field was based on a version of the args that had been sanitized
(model_info removed). We need the full model info field for non-openai
models

```python
from autogen_ext.agents.web_surfer import MultimodalWebSurfer
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_core.models import ModelInfo
mistral_vllm_model = OpenAIChatCompletionClient(
    model="TheBloke/Mistral-7B-Instruct-v0.2-GGUF",
    base_url="http://localhost:1234/v1",
    api_key="empty",
    model_info=ModelInfo(vision=False, function_calling=True, json_output=False, family="unkown"),
)
(mistral_vllm_model.dump_component().model_dump_json())
```

Before
```
{
  "provider": "autogen_ext.models.openai.OpenAIChatCompletionClient",
  "component_type": "model",
  "version": 1,
  "component_version": 1,
  "description": "Chat completion client for OpenAI hosted models.",
  "label": "OpenAIChatCompletionClient",
  "config": {
    "model": "TheBloke/Mistral-7B-Instruct-v0.2-GGUF",
    "api_key": "empty",
    "base_url": "http://localhost:1234/v1"
  }
}

```

After
```
{
  "provider": "autogen_ext.models.openai.OpenAIChatCompletionClient",
  "component_type": "model",
  "version": 1,
  "component_version": 1,
  "description": "Chat completion client for OpenAI hosted models.",
  "label": "OpenAIChatCompletionClient",
  "config": {
    "model": "TheBloke/Mistral-7B-Instruct-v0.2-GGUF",
    "api_key": "empty",
    "model_info": {
      "vision": false,
      "function_calling": true,
      "json_output": false,
      "family": "unkown"
    },
    "base_url": "http://localhost:1234/v1"
  }
}


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

## Related issue number

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

## Checks

- [ ] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation to
build and test documentation locally.
- [ ] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [ ] I've made sure all auto checks have passed.
2025-02-04 05:51:38 +00:00
afourney e8f49ef386
Fix reading string args from m1 cli (#5343)
After #5431 some command-line arguments became string rather than lists.
This PR fixes the issue by checking the type.
2025-02-03 13:27:37 -08:00
afourney cd88757cac
Allow m1 cli to read a configuration from a yaml file. (#5341)
Allow m1 cli to read a configuration from a yaml file.
2025-02-03 20:11:42 +00:00
razvanvalca 3d00457993
Adding o3 family: o3-mini (#5325)
## Why are these changes needed?
This pull request introduces the 'o3' model family and adds support for
the 'o3-mini' model.

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-02-03 18:57:21 +00:00
Mohammad Mazraeh 06c706633d
fix: warn on empty chunks, don't error out (#5332)
<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

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

We are seeing this issue more often now, probably related to the load on
the API servers. Hence this PR:
1. Demotes the the `max_consecutive_empty_chunk_tolerance` parameter
from function to inline threshold
2. Change exception to a one time warning

## Related issue number

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

## Checks

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

---------

Signed-off-by: Mohammad Mazraeh <mazraeh.mohammad@gmail.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-02-03 18:45:29 +00:00
Eric Zhu 569bc19769
feat: add gemini model families, enhance group chat selection for Gemini model and add tests (#5334)
Resolves #5322
2025-02-03 18:32:35 +00:00
afourney 877796ded1
WebSurfer: print viewport text (#5329)
This PR adds a method that approximately extracts the text visible in
the viewport of the web browser (as opposed to always printing the first
50 lines, or relying entirely on OCR).
2025-02-03 11:42:18 -05:00
Eric Zhu 756e2a4865
feat: update OpenAIAssistantAgent to support AsyncAzureOpenAI client (#5312)
Resolves #5179
2025-01-31 16:09:11 -08:00
Nour Bouzid 0bf786fbb6
Add default_header support (#5249)
Closes #5163
---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-31 16:03:32 -08:00
afourney 088a50faa5
Remove old autogen_magentic_one package. (#5305)
This PR removes the older `autogen_magentic_one` package, and directs
people to use the new AgentChat implementation.

Hopefully this eases confusion.

---------

Co-authored-by: Jack Gerrits <jack@jackgerrits.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-31 15:14:40 -08:00
Eric Zhu cd9dca4740
feat: add o3 to model info; update chess example (#5311)
Because.
2025-01-31 15:07:14 -08:00
Eric Zhu 69d3af7324
Add a new sample to show streaming and R1 usage (#5285)
* New sample of chess playing showing R1's thought process in streaming
mode
* Modify existing samples to use `model_config.yml` instead of JSON
configs for better clarity.

---------

Co-authored-by: Mohammad Mazraeh <Mazraeh.Mohammad@Gmail.com>
2025-01-31 22:25:29 +00:00
Eric Zhu 88c895fd48
sample: Update chainlit sample with streaming (#5304)
* Separate agent and team examples
* Add streaming output
* Refactor to better use the chainlit API
* Removed the user proxy example -- this needs a bit more work to
improve the presentation on the ChainLit interface.

---------

Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2025-01-31 22:20:11 +00:00
Eric Zhu d5007adba7
chore: add asyncio_atexit dependency to docker requirements (#5307)
Resolves #5281
2025-01-31 14:14:43 -08:00
Eric Zhu 3cc9095f28
fix: type issues in streamlit sample and add streamlit to dev dependencies (#5309) 2025-01-31 14:06:59 -08:00
Hussein Koprly 75968565a1
adding streamlit sample app (#5306)
- New Streamlit sample app using autogen
- README added on how to run it
2025-01-31 12:19:16 -08:00
Griffin Bassman b5626262b4
fix: windows check ci failure (#5287) 2025-01-31 10:22:15 -08:00
linznin 33d9bd6d1d
Update Distributed Agent Runtime Cross-platform Sample (#5164)
fix: improve service shutdown handling in for cross-platform compatibility (#5124)

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-31 16:17:04 +00:00
Eric Zhu 71bf20b8a2
chore: update package versions to 0.4.5 and remove deprecated requirements (#5280) 2025-01-31 01:52:45 +00:00
Victor Dibia b2800d729b
Update AGS to Use AgentChat Declarative Config Serialization (#5261)
<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

This PR updates AGS to use the declarative config serialization native
to AgentChat.
The effect? You can build your teams/artifacts directly in python, run
`team.dump_component()` and immediately run it in AGS.

Some change details:

- Removes ComponentFactory. Instead TeamManager just loads team specs
directly using `Team.load_component`.
- Some fixes to the UI to simplify drag and drop experience.  
- Improve layout of nodes...


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

## Related issue number

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

## Checks

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


cc @EItanya @nour-bouzid
2025-01-31 00:24:37 +00:00
Eric Zhu f656ff1e01
feat: Support R1 reasoning text in model create result; enhance API docs (#5262)
Resolves #5255 

---------

Co-authored-by: afourney <adamfo@microsoft.com>
2025-01-30 11:03:54 -08:00
Eric Zhu 44db2cc1fb
fix: handle non-string function arguments in tool calls and add corresponding warnings (#5260) 2025-01-30 16:49:22 +00:00
afourney aa23093f36
Adjusted M1 agent system prompt to remove TERMINATE (#5263)
Removed the TERMINATE clause from the system prompt since M1 handles
termination via the Orchestrator, and it is just ignored.

Removed the clause about saving to a particular file name, since tmp_
files are created in the current CodeExecutors.
2025-01-30 08:14:55 -08:00
afourney fff201f813
Added an optional sources parameter to CodeExecutorAgent (#5259)
This PR adds a `sources` optional parameter to CodeExecutorAgent
(similar to the termination conditions), that allows finer-grained
control on which agents can provide code for execution.

It also moves the `_extract_markdown_code_blocks` subroutine to a member
method, so that it can be overridden by subclasses. I've found this to
be very important to support benchmarks like HumanEval, where we need to
add a test harness around the implementation.
2025-01-29 23:28:57 -08:00
Eric Zhu 403844ef2b
feat: add Semantic Kernel Adapter documentation and usage examples in user guides (#5256)
Partially address #5205 and #5226
2025-01-29 16:37:18 -08:00
Eric Zhu 7020f2ac34
fix: update human-in-the-loop tutorial with better system message to signal termination condition (#5253)
Resolves #5248
2025-01-29 10:53:37 -08:00
Nour Bouzid 02e968a531
FunctionTool partial support (#5183)
<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

FunctionTool supports passing in a partial

## Related issue number

Closes #5151 

## Checks

- [x] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation 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.
2025-01-29 18:02:18 +00:00
Mohammad Mazraeh 2f1684b698
update dependencies to work with protobuf 5 (#5195)
Closes #5074

Signed-off-by: Mohammad Mazraeh <mazraeh.mohammad@gmail.com>
2025-01-28 22:11:54 -08:00
Eric Zhu 225eb9d0b2
feat: introduce ModelClientStreamingChunkEvent for streaming model output and update handling in agents and console (#5208)
Resolves #3983

* introduce `model_client_stream` parameter in `AssistantAgent` to
enable token-level streaming output.
* introduce `ModelClientStreamingChunkEvent` as a type of `AgentEvent`
to pass the streaming chunks to the application via `run_stream` and
`on_messages_stream`. Although this will not affect the inner messages
list in the final `Response` or `TaskResult`.
* handle this new message type in `Console`.
2025-01-29 02:49:02 +00:00
Eric Zhu 10996bc172
docs: Enhance documentation for SingleThreadedAgentRuntime with usage examples and clarifications; undeprecate process_next (#5230)
Resolves #5046
2025-01-28 11:03:51 -08:00
Eric Zhu b29d0bda2f
update versions to 0.4.4 and m1 cli to 0.2.3 (#5229) 2025-01-28 17:59:14 +00:00
Jack Gerrits 7445e4b276
Remove channel based control plane APIs, cleanup proto (#5236) 2025-01-28 11:15:57 -05:00
Rohan Thacker d49bf346e0
Updated docs for _azure_ai_client.py (#5199)
Update a minor typo and updated the `response_format` documentation to
the new value

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-27 23:19:38 +00:00
Eric Zhu 2ceb9dcffe
docs: Update user guide notebooks to enhance clarity and add structured output (#5224)
Resolves #5043
2025-01-27 13:57:29 -08:00
Victor Dibia 6359b6a7be
improve component config, add description support in dump_component (#5203)
<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

It is currently hard to add a description to a component (defaults to
None also) .. you have to call super.dump() modify and return. This PR
makes the experience better.

- allows you specify `component_description` and `component_label` as an
optional class var. label is an optional human readable name for the the
component.
- will use component_description if provided int he description field
when dumped if there is no description, will use the first line of class
docstring. Takes advantage of all the good practices we have in writing
good docstrings. label defaults to component type.
 

For example 

```python
model_client=OpenAIChatCompletionClient( model="gpt-4o-2024-08-06" )
config = model_client.dump_component()
print(config.model_dump_json())
```
Note the description field below is no longer None and there is a label
```python
{
  "provider": "autogen_ext.models.openai.OpenAIChatCompletionClient",
  "component_type": "model",
  "version": 1,
  "component_version": 1,
  "description": "Chat completion client for OpenAI hosted models.",
  "label": "OpenAIChatCompletionClient",
  "config": { "model": "gpt-4o-2024-08-06" }
}


```

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

## Related issue number

<!-- For example: "Closes #1234" -->
None, felt faster to fix.

## Checks

- [x] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation 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.
2025-01-27 21:41:23 +00:00
Eric Zhu b441d5b43a
fix: Enhance OpenAI client to handle additional stop reasons and improve tool call validation in tests to address empty tool_calls list. (#5223)
Resolves #5222
2025-01-27 21:16:47 +00:00
Christoph Schittko 8428462513
Update literature-review.ipynb to fix possible copy-and-paste error (#5214)
Typo in Report Agent

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-27 17:36:28 +00:00
Eric Zhu e582072947
Update model client documentation add Ollama, Gemini, Azure AI models (#5196)
Partially resolves: #5118

Once the extension page is ready, update the tutorial pages to reduce
duplication.

---------

Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2025-01-26 18:42:57 +00:00
Bilawal Hameed 42dc80ce60
docs: s/Exisiting/Existing/g (#5202) 2025-01-26 02:18:46 +00:00
Eric Zhu 138913bd5b
Add Model Client Cache section to migration guide (#5197) 2025-01-25 21:26:49 +00:00
Sachin Joglekar 8926206479
Implement default in-memory store for ChatCompletionCache (#5188) 2025-01-25 21:07:58 +00:00
Victor Dibia 67029853ec
make AssistantAgent and Handoff use BaseTool (#5193)
<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

Make AssistantAgent and Handoff use BaseTool.  
This ensures that they can be made declarative/serialized

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

## Related issue number

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

## Checks

- [ ] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation to
build and test documentation locally.
- [ ] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [ ] I've made sure all auto checks have passed.
2025-01-25 12:04:05 -08:00
Ryan Sweet b6597fdd24
rysweet-unsubscribe-and-agent-tests-4744 (#4920)
* add tests for core functionality and client/server
* add remove subscription, get subscriptions
* fix LOTS of bugs
* add grpc tuning
* adapt to latest agreed agents_worker proto changes.
2025-01-24 19:24:00 -08:00
Jack Gerrits 55e929db98
Impl register and add sub RPC (#5191)
* Refactor client id retrieval

* WIP

* fixes

* future annotations

* Fix tests

* remove import
2025-01-24 18:58:33 -05:00
Leonardo Pinheiro db2410c705
Feature/azure ai inference client (#5153)
* Rebase to latest main branch

* Moved _azure module to azure

* Validate extra_create_args in and json response

* Added Support for Github Models

* Added normalize_name and assert_valid name

* Added Tests for AzureAIChatCompletionClient

* WIP: Azure AI Client

* Added: object-level usage data
* Added: doc string
* Added: check existing response_format value
* Added: _validate_config and _create_client

* lint

* merge dependencies

* add tests for img and function calling

* support actual tests through env vars

* address mypy errors

* doc example fix

* fmt

* fix doc fmt

* Update python/packages/autogen-ext/src/autogen_ext/models/azure/_azure_ai_client.py

---------

Co-authored-by: Rohan Thacker <thackerrohan4@gmail.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
2025-01-25 08:26:48 +10:00
Jack Gerrits 1982f1b0ec
Improve grpc type checking (#5189) 2025-01-24 12:34:59 -08:00
Eric Zhu 146674399b
docs: Core API doc update: split out model context from model clients; separate framework and components (#5171) 2025-01-24 19:17:07 +00:00
Jack Gerrits b375d4b18c
Communicate client id via metadata in grpc runtime (#5185)
Communicate client id via metadata
2025-01-24 13:41:31 -05:00
Gerardo Moreno 89631966cb
RichConsole: Prettify m1 CLI console using rich #4806 (#5123) 2025-01-24 09:50:38 -08:00
Mohammad Mazraeh 0de4fd83d1
Add dependencies to distributed group chat example (#5175)
add dependencies to distributed group chat example
2025-01-24 08:49:53 -05:00
Victor Dibia 979d8ab4f1
Make AgentChat Team Config Serializable (#5071)
* initial pass on making group chats declarative

* update group chat tests

* update impl to include participant serialization for all teams

* v1 making soc declarative

* update memory test

* update chatagent and team base classes

* update serialization doc notebook

* fomating updates
2025-01-24 07:08:22 +00:00
Victor Dibia 58d789a249
Make FunctionTools Serializable (Declarative) (#5052)
* vi1 for declarative tools

* make functtools declarative

* add tests

* update imports

* update formatting

* move tests, format fixes

* format updates

* update test

* add user warning to _from_config

* add warning on load_component to docs

---------

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2025-01-24 03:49:43 +00:00
Jack Gerrits 44b9bff466
Update proto to include remove sub, move to rpc based operations (#5168)
* Update proto to include remove sub, move to rpc based operations

* dont add a breaking change

* mypy fix
2025-01-23 22:46:47 +00:00
Pierre c3e84dc5ca
Fix function tool naming to avoid overriding the name input (#5165)
fix function tool naming to avoid overriding the name input
2025-01-23 10:42:54 -05:00
Sungjun.Kim 141247f6d7
docs: Add a helpful comment to swarm.ipynb (#5145)
This notebook file is shown in https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/swarm.html#agents.
However, if users copy some codes as it is and run it as a script, an error occurs.
To prevent such a case, I think adding this comment helps most users.

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-23 02:16:09 -08:00
Fernando Bellido Pazos a585091406
Closes #5059 (#5156)
Update _magentic_one_orchestrator.py

In a Magentic Group Settting, if one of the Assitant Agents uses a tool it gives the following error, note this is under a FALSE reflect_on_tool variable.

Making it true, wont happen, though more tokens will be consumed and it will have a worst output and the philosophy of a tool as an answer is not followed...
2025-01-23 02:04:35 -08:00
Leonardo Pinheiro 3fe106621e
fix: update SK model adapter constructor (#5150)
* update constructor

* fix typing error

* revert/fix doc changes

* add unsaved changes

---------

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
2025-01-23 14:53:39 +10:00
Victor Dibia 5e9b24c3d9
Make Memory and Team an ABC (#5149)
* make memory and team an ABC

* update memory test

* update tests
2025-01-22 15:51:34 -08:00
Jack Gerrits 226b37d07b
Make ChatAgent an ABC (#5129) 2025-01-21 20:08:53 -05:00
Eric Zhu da1c2bf12e
fix: use tool_calls field to detect tool calls in OpenAI client; add integration tests for OpenAI and Gemini (#5122)
* fix: use tool_calls field to detect tool calls in OpenAI client

* Add unit tests for tool calling; and integration tests for openai and gemini
2025-01-21 09:06:19 -05:00
Mario Hammer e0a6a86b12
fix a small typo (#5120)
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-20 21:52:52 +00:00
Eric Zhu 142e102ce8
fix: update gpt-4o model version to 2024-08-06 (#5117)
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2025-01-20 21:15:04 +00:00
Eric Zhu af420a83e2
fix: ensure proper handling of structured output in OpenAI client and improve test coverage for structured output (#5116) 2025-01-20 20:54:39 +00:00
Eric Zhu 8df86e2b72
docs: enhance Swarm user guide with notes on tool calling (#5103) 2025-01-20 12:49:32 -08:00
Leon De Andrade d9fd39a297
Add sources field to TextMentionTermination (#5106) 2025-01-19 23:21:29 -08:00
Leon De Andrade 34bc82e24f
Jupyter Code Executor in v0.4 (alternative implementation) (#4885) 2025-01-18 21:11:40 +00:00
Leonardo Pinheiro 918292f51e
Semantic kernel model adapter (#4851)
* initial sk model adapter implementation

* add sk tool module

* implement streaming and update tests

* update lock

* linting

* add semantic kernel extras

* add docstring and format

* update dependencies and format/lint

* add model info to sk constructor

* update uv.lock

* customize prompt settings

* update uv.lock

* add docs

* fix sk docstring linting

* update create docstrings

* fmt and improve tool docstring

* update sk tool docs

* coerce doc json serialization failure

---------

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
2025-01-18 18:57:20 +10:00
Eric Zhu 9b1260dd3e
docs: update AssistantAgent documentation with a new figure, attention and warning notes (#5099)
* docs: update AssistantAgent documentation with attention and warning notes

* update

---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-17 23:49:02 +00:00
Eric Zhu 8643ff6e40
Pass context between AssistantAgent for handoffs (#5084)
* Pass context between AssistantAgent for handoffs

* Add parallel tool call test

---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-17 23:39:57 +00:00
Victor Dibia 6cb7d64bca
Update AGS pyproject.toml (#5101)
Addresses https://github.com/microsoft/autogen/issues/5098
2025-01-17 11:37:53 -08:00
Leonardo Pinheiro a1fdbd9692
Use caching to run tests and report coverage (#5086)
* use caching to run tests and report coverage

* fix test step dep name

* try to fix cov fname

* add working dir to mv step

* update artifact download

* fmt

* reduce concurrency on ext test

---------

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
2025-01-17 14:32:18 +00:00
Eric Zhu ce20de9afb
fix: normalize finish reason in CreateResult response (#5085)
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-17 14:10:06 +00:00
Eric Zhu f289e64320
docs: enhance agents.ipynb with parallel tool calls section (#5088)
* docs: enhance agents.ipynb with parallel tool calls section

* type ignore
2025-01-17 09:13:14 +00:00
Victor Dibia c2a43e84a2
Declarative BaseChat Agents (#5055)
* v1, make assistant agent declarative

* make head tail context declarative

* update and formatting

* update assistant, format updates

* make websurfer declarative

* update formatting

* move declarative docs to advanced section

* remove tools until implemented

* minor updates to termination conditions

* update docs
2025-01-16 22:29:40 -08:00
zysoong 1f22a7b7a1
[Documentation] Update tools.ipynb: use system messages in the tool_agent_caller_loop session (#5068)
* Update tools.ipynb: concat system messages in the tool_agent_caller_loop session

* Fix type mismatch on list concatenation

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-17 01:48:55 +00:00
Sachin Joglekar 8bd65c672f
Add ChatCompletionCache along with AbstractStore for caching completions (#4924)
* Add ChatCompletionCache along with AbstractStore for caching completions

* Addressing comments

* Improve interface for cachestore

* Improve documentation & revert protocol

* Make cache store typed, and improve docs

* remove unnecessary casts
2025-01-16 15:47:38 -08:00
afourney 2e1a9c737a
Retry multiple times when M1 selects an invalid agent. Make agent sel… (#5079)
Retry multiple times when M1 selects an invalid agent. Make agent selection deterministic when the team is a singleton (corner case).
2025-01-16 20:29:50 +00:00
Jack Gerrits 1a3ac626eb
Update version to 0.4.3 pre-emptively (#5066)
* Update version to 0.4.3

* lock

* update lock

* lock
2025-01-15 19:11:32 -05:00
Victor Dibia 8b3d25d041
Improve AGS Documentation (#5065)
* update deps to address dependabot issues.

* fill screen width, closes #5050

* documentation improvements
2025-01-15 14:00:47 -08:00
Hankyeol Kyung acb9117513
Update gpt-4o model version and add new model details (#5056)
feat: Update gpt-4o-2024-11-20 version and model pointer

- Add version information for gpt-4o-2024-11-20
- Update model pointer

Signed-off-by: Hankyeol Kyung <kghnkl0103@gmail.com>
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
Co-authored-by: gagb <gagb@users.noreply.github.com>
2025-01-15 19:44:43 +00:00
Eric Zhu c5ca53de5e
Update studio dep to use version bound (#5063) 2025-01-15 09:26:38 -08:00
Eric Zhu dcaa6d0110
Update studio dep (#5062)
* Update studio dep
2025-01-15 08:41:29 -08:00
Jacob Alber ae98c9d764
feat: Change async input strategy (#5060) 2025-01-15 10:12:47 -05:00
Leonardo Pinheiro 95bd514a9a
Graphrag integration (#4612)
* add initial global search draft

* add graphrag dep

* fix local search embedding

* linting

* add from config constructor

* remove draft notebook

* update config factory and add docstrings

* add graphrag sample

* add sample prompts

* update readme

* update deps

* Add API docs

* Update python/samples/agentchat_graphrag/requirements.txt

* Update python/samples/agentchat_graphrag/requirements.txt

* update docstrings with snippet and doc ref

* lint

* improve set up instructions in docstring

* lint

* update lock

* Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_global_search.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_local_search.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* add unit tests

* update lock

* update uv lock

* add docstring newlines

* stubs and typing on graphrag tests

* fix docstrings

* fix mypy error

* + linting and type fixes

* type fix graphrag sample

* Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_global_search.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_local_search.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Update python/samples/agentchat_graphrag/requirements.txt

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* update overrides

* fix docstring client imports

* additional docstring fix

* add docstring missing import

* use openai and fix db path

* use console for displaying messages

* add model config and gitignore

* update readme

* lint

* Update python/samples/agentchat_graphrag/README.md

* Update python/samples/agentchat_graphrag/README.md

* Comment remaining azure config

---------

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-15 21:04:17 +10:00
Johan Forngren 8efe0c45b0
PoC AGS dev container (#5026)
* Add tiktoken as a dependency in pyproject.toml

Signed-off-by: Johan Forngren <johan.forngren@decerno.se>

Update uv.lock with tiktoken dependency from fbfdc9f652384b70f7461c90ada13f87e83677e0

Signed-off-by: Johan Forngren <johan.forngren@decerno.se>

* Updating autogen-ext dependencies per https://github.com/microsoft/autogen/pull/5008#issuecomment-2585383877

Signed-off-by: Johan Forngren <johan.forngren@decerno.se>

* PoC dev container

Signed-off-by: Johan Forngren <johan.forngren@decerno.se>

* Enhance devcontainer setup with post-create script for dependency installation and improved performance. Removed partial hot reload setup, as it required bigger changes to the project. Improved documentation, and fixed markdown lint issues.

Signed-off-by: Johan Forngren <johan.forngren@decerno.se>

* Update installation documentation for AutoGen Studio, clarifying installation methods and improving formatting. Adjusted notes for Windows users and corrected minor grammatical issues.

Signed-off-by: Johan Forngren <johan.forngren@decerno.se>

* Fixing typos. Restructuring text to avoid consecutive markdown quote blocks separated only by a blank line to avoid MD028 - Blank line inside blockquote.

Signed-off-by: Johan Forngren <johan.forngren@decerno.se>

* Include dev containers tutorial

Signed-off-by: Johan Forngren <johan.forngren@decerno.se>

* Update dev container installation instructions

Signed-off-by: Johan Forngren <johan.forngren@decerno.se>

---------

Signed-off-by: Johan Forngren <johan.forngren@decerno.se>
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2025-01-14 21:19:47 -08:00
Eric Zhu 6954e516b6
Update autogen_core.memory: adding docs, removing some fields. (#5053)
* Update autogen_core.memory: adding docs, removing some fields.

* Remove timestamp

* Remove name from base; fix example code

* fix test

* lint

* fix doc
2025-01-15 02:33:46 +00:00
Victor Dibia abbdbb2f87
Memory Interface in AgentChat (#4438)
* initial base memroy impl

* update, add example with chromadb

* include mimetype consideration

* add transform method

* update to address feedback, will update after 4681 is merged

* update memory impl,

* remove chroma db, typing fixes

* format, add test

* update uv lock

* update docs

* format updates

* update notebook

* add memoryqueryevent message, yield message for observability.

* minor fixes, make score optional/none

* Update python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* update tests to improve cov

* refactor, move memory to core.

* format fixxes

* format updates

* format updates

* fix azure notebook import, other fixes

* update notebook, support str query in Memory protocol

* update test

* update cells

* add specific extensible return types to memory query and update_context

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-14 07:06:13 +00:00
Victor Dibia d883e3dfb0
Make termination condition config declarative (#4984)
* make termination condition declarative

* make all term conditions declarative

* make And/OrTermination top level objects in base

* add basic tests

* add tutorial notebook

* update tests and formatting

* update tests

* update declarative config with updated api.
2025-01-13 19:30:30 -08:00
Jack Gerrits cf8446b37e
Fixup autogen-ext version (#5030)
* Update autogen-ext version

* lock
2025-01-13 21:31:41 +00:00
Jack Gerrits 91ec611338
Update version to 0.4.1 (#5029)
* Update version to 0.4.1

* lock

* dest dir

* remove website changes
2025-01-13 21:22:03 +00:00
Jack Gerrits 404522bd6b
Split apart component infra to allow for abstract class integration (#5017)
* Split apart component infra to allow for abstract class integration

* fix is_component_class check

* make is_ functions type guards

* Simplify component creation

* undo changes

* Format
2025-01-13 15:58:38 -05:00
Jack Gerrits 70f7e998d2
fix: Fix provider string for AzureTokenProvider (#4992)
Fix provider string for AzureTokenProvider
2025-01-13 20:40:33 +00:00
Johan Forngren 1a6e9766c9
Add tiktoken as a dependency in pyproject.toml (#5008)
* Add tiktoken as a dependency in pyproject.toml

Signed-off-by: Johan Forngren <johan.forngren@decerno.se>

Update uv.lock with tiktoken dependency from fbfdc9f652384b70f7461c90ada13f87e83677e0

Signed-off-by: Johan Forngren <johan.forngren@decerno.se>

* Updating autogen-ext dependencies per https://github.com/microsoft/autogen/pull/5008#issuecomment-2585383877

Signed-off-by: Johan Forngren <johan.forngren@decerno.se>

---------

Signed-off-by: Johan Forngren <johan.forngren@decerno.se>
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2025-01-13 18:53:18 +00:00
Jack Gerrits c0082dd9cc
fix: Normalize openai client stop reason to make more robust (#5027)
* Normalize stop reason to make more robust

* format

* add unknown finish reason
2025-01-13 18:26:31 +00:00
Sudhakar a7c97dbbbf
Typo in teams.ipynb (#5028)
Minor typo,
Let’s calls the run() method to start the team with a task. 

Fixed as,
Let’s call the run() method to start the team with a task.
2025-01-13 09:49:05 -08:00
Jack Gerrits 466848ac65
fix: fix user input in m1 (#4995)
* Add lock for input and output management in m1

* Use event to signal it is time to prompt for input

* undo stop change

* undo changes

* Update python/packages/magentic-one-cli/src/magentic_one_cli/_m1.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* reduce exported surface area

* fix

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Hussein Mozannar <hmozannar@microsoft.com>
2025-01-13 15:28:08 +00:00
Eric Zhu 0554fa3e2a
Add AGS to README.md (#5019)
* Add AGS to README.md

* Add appdir argument to avoid conflicting with older .autogenstudio home directory files.

---------

Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2025-01-13 06:55:10 -08:00
Eric Zhu 23c9b78c25
Disable output usage stat summary in Console as the stats is often inaccurate. (#5021)
* Disable output stats in Console as the stats is often inaccurate.

* format
2025-01-13 07:09:05 +00:00
Eric Zhu a9c19d6162
Add python version requirement to frontpage and readme (#5014) 2025-01-12 09:19:57 -08:00
Ranuga 5e2a69a303
Fix: Properly await `agent.run()` in README `Hello World` example (#5013)
* Fix: Properly await `agent.run()` in README `Hello World` example

- Updated the `Hello World` code sample to use `asyncio` for proper coroutine handling.
- Resolved `RuntimeWarning` caused by not awaiting the `agent.run()` method.
- Ensures the example executes correctly without errors or warnings.

* Add await to agent.run call in index.md

* Fix hello world

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-12 09:04:30 +00:00
Victor Dibia 9f351c50ff
Minor Updates to AGS Docs (#5010)
* update docs

* update docs

* update ags documentation

* update uv lock

* update usage
2025-01-11 18:25:18 -08:00
Jack Gerrits 115fefa132
Add missing py.typed in autogen_ext, fix type issue in core (#4993) 2025-01-10 10:00:17 -08:00
Tim Rogers c59cfdd787
Fix typo in `Multi-Agent Design Patterns -> Intro` docs (#4991) 2025-01-10 14:01:00 +00:00
Eric Zhu 001f0262ba
Minor API doc update for openai assistant agent (#4986) 2025-01-10 18:08:30 +10:00
Matthew Wyman b6c3df2920
Update README.md to fix spelling error (#4982) 2025-01-10 00:29:28 +00:00
Jack Gerrits d2c1bb8ad9
Remove accidentally added character (#4980) 2025-01-09 19:00:19 -05:00
Jack Gerrits 6bc285ce39
Don't show banner on stable (#4976) 2025-01-09 18:03:56 -05:00
Jack Gerrits 6abc70044a
Fix version switcher rendering (#4974)
* Fix docs switcher rendering

* update tag

* use post1
2025-01-09 17:06:35 -05:00
Jack Gerrits 4dab09cabe
Update magentic-one-cli version to 0.2.0 (#4973)
* Update magentic-one-cli version to 0.2.0

* lock
2025-01-09 15:54:36 -05:00
Jack Gerrits 78ac9f8507
Fix magentic-one-cli version bound (#4972) 2025-01-09 15:40:19 -05:00
Jack Gerrits 388a402243
Update magentic-one-cli dep bounds (#4971) 2025-01-09 15:31:46 -05:00
Jack Gerrits c2721ff65b
Update all versions to 0.4.0 (#4941)
* Update all versions to 0.4.0

* update redirect

* install with upgrade for agentchat
2025-01-09 15:29:54 -05:00
Jack Gerrits c4302eecab
Fixes for azure-container-code-executor.ipynb (#4970)
Fixes for azure-container-code-executor.ipyn
2025-01-09 15:29:36 -05:00
SeryioGonzalez 7c31ee0573
Update swarm.ipynb (#4959)
Small typo in docs

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-09 15:29:13 -05:00
SeryioGonzalez 99e2e39281
Update swarm.ipynb (#4958)
Small typo

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-09 15:28:50 -05:00
Jack Gerrits 0122d44aa3
OpenAI assistant fixes (#4969) 2025-01-09 12:06:01 -08:00
Eric Zhu 5b841e26d6
update landing page example (#4968) 2025-01-09 11:19:25 -08:00
Griffin Bassman 0446ce924f
feat: Add o1-2024-12-17 model (#4965)
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-09 11:05:20 -08:00
afourney f3ed7ae147
Fixed a failure in the MagenticOne test CI (#4966)
Fixed CI
2025-01-09 13:57:07 -05:00
Jack Gerrits ecdf18d3f6
Make package readmes slightly less empty (#4961)
* Make package readmes slightly less empty

* Update python/packages/autogen-ext/README.md

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-09 10:44:13 -08:00
Jack Gerrits c293b931f5
Make API reference TOC visible (#4962)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-09 10:37:13 -08:00
afourney b07c1662b3
Disable usage stats on m1 command. (#4960)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-09 10:33:56 -08:00
Jack Gerrits 02ad98bcb3
Console async printing and optional stats (#4956)
* async printing

* Make stats output option
2025-01-09 16:02:15 +00:00
Eric Zhu 903305e810
Add tutorial index page; improve installation pages; improve Core tutorial to mention how to use AgentChat agent in Core. (#4950) 2025-01-08 23:24:12 +00:00
Eric Zhu 318820e5ed
"magentic one" --> "magentic one cli" on landing page (#4951) 2025-01-08 15:18:08 -08:00
afourney 7131dc945d
Added m1 cli package (#4949)
* Added m1 cli package
* update CI, install card, deprecations
* Update python/packages/magentic-one-cli/pyproject.toml
* fix mypy and pyright
* add package
* Suppress 'ResourceWarning: unclosed socket'

---------

Co-authored-by: Jack Gerrits
2025-01-08 14:05:08 -08:00
Jack Gerrits a427b38000
Add stable website dir, to be updated (#4948)
* Add stable

* stable redirect
2025-01-08 14:48:09 -05:00
Eric Zhu 30cbbf7cad
Add pip install for magentic one and studio to homepage; update doc link (#4946)
* Add pip install for magentic one and studio to homepage; update doc link

* Update links
2025-01-08 10:52:33 -08:00
Jack Gerrits 08addac2d4
Remove wording override of switcher (#4939) 2025-01-08 18:11:23 +00:00
Jack Gerrits 9ff1ddae59
Update cookiecutter instructions (#4945) 2025-01-08 12:59:05 -05:00
Eric Zhu b06ff9d5d6
Fix agent and agent runtime in Core doc (#4943) 2025-01-08 09:48:37 -08:00
Jack Gerrits 538f39497b
Replace create_completion_client_from_env with component config (#4928)
* Replace create_completion_client_from_env with component config

* json load
2025-01-08 14:33:28 +00:00
Eric Zhu b850dcd399
Fix link to samples (#4933)
* Fix link to samples

* fix readme

---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-08 14:28:25 +00:00
Mohammad Mazraeh ad123641da
Update agent and agent runtime doc with routed agent (#4935)
* add back removed note

Signed-off-by: Mohammad Mazraeh <mazraeh.mohammad@gmail.com>

* fix formatting issues

Signed-off-by: Mohammad Mazraeh <mazraeh.mohammad@gmail.com>

---------

Signed-off-by: Mohammad Mazraeh <mazraeh.mohammad@gmail.com>
2025-01-08 14:23:31 +00:00
peterychang d610d481cd
Add documentation and TODOs for xlang (#4926)
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-08 14:16:43 +00:00
Jack Gerrits 7b10f0ad1b
Improve docs for model clients, add missing docs (#4930)
* Improve docs for model clients

* formatting

* Fix usage

---------

Co-authored-by: peterychang <49209570+peterychang@users.noreply.github.com>
2025-01-08 09:12:48 -05:00
Jack Gerrits 973c8b6330
Remove deprecated items for release (#4927) 2025-01-08 08:56:08 -05:00
Roy Belio 00b06ab2e1
fix(magentic-one): Enhance error handling in orchestrate_step to manage invalid ledger formats (#4845)
* fix(magentic-one): Enhance error handling in orchestrate_step to manage invalid ledger formats

* formatting

---------

Co-authored-by: Roy Belio <robelio@microsoft.com>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
Co-authored-by: Jack Gerrits <jack@jackgerrits.com>
2025-01-08 02:18:42 +00:00
Eric Zhu 52c2a70e95
Fix chess sample (#4932)
---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-07 16:06:14 -08:00
Eric Zhu f113c9a959
Move core samples to /python/samples (#4911)
* Move core samples to /python/samples

* Fix proto check

* Add sample code check workflow

* Update pyright settings; fix types
2025-01-07 23:31:29 +00:00
peterychang 71a3b238e7
Activate deactivate agents (#4800)
* Instantiate and call activate/deactivate on agents

* autoformatting

* remove activate. Rename deactivate to close

* remove unneeded import

* create close fn in runtime

* change runtime close behavior

* uv.lock

---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-07 21:37:02 +00:00
Eric Zhu 5635ea397f
Improve language for teams note (#4925) 2025-01-07 14:51:59 -05:00
Jack Gerrits 7641577f6b
Adds 0.2 docs link to navbar (#4921) 2025-01-07 10:38:51 -08:00
Jack Gerrits d4b406b78c
refactor!: Reduce dependencies of core, remove image from URL (#4919)
* Reduce dependencies of core

* Update lock

* add package to test deps

* Update lock

* aio console dep

* Update lock
2025-01-07 18:30:04 +00:00
Eric Zhu 725d573d5b
Update tutorial content; move selector group chat and swarm outside of tutorial. (#4915)
* Update tutorial content; move selector group chat and swarm outside of tutorial.

* Add redirect

---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-07 09:57:23 -08:00
Jack Gerrits 5b9be79fba
feat!: Add message context to signature of intervention handler, add more to docs (#4882)
* Add message context to signature of intervention handler, add more to docs

* example

* Add to test

* Fix pyright

* mypy
2025-01-07 12:51:35 -05:00
Jack Gerrits f4382f01c8
Log messages and response for LLMCall event (#4910)
* Log messages and response for LLMCall event

* Remove accidental change

* newline
2025-01-07 12:32:29 -05:00
Jack Gerrits 310564908b
fix!: Move azure auth provider to separate module (#4912)
* Move azure auth provider to separate module

* Update lock

* fix component gen
2025-01-07 12:21:50 -05:00
Griffin Bassman bdfdc6ab5e
fix: poe check errors to pass (#4917)
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-07 10:48:37 -05:00
afourney a6612e683d
Added tests for FileSurfer. (#4913) 2025-01-06 16:54:14 -08:00
Eric Zhu e11fd8353d
Improve markdown code linting command and update logging documentation and (#4902)
Update logging documentation and improve markdown code linting command
2025-01-06 14:19:17 -08:00
Eric Zhu d55b8c9044
Update index.md for better clarity and relationship between packages (#4896)
* Improve index page for better clarity

* Add markdown lint check

* Update info

* Update

* typo

* tagline

* tag line update
2025-01-06 14:13:22 -08:00
Eric Zhu 2ff543e876
Add missing API doc for Python code execution tool (#4901)
* Add missing API doc for Python code execution tool

* wip

* Add API doc for the executor tool

---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-06 10:06:54 -08:00
Not Subhuman 4486c67b42
Update magentic-one.md (#4903)
* Update magentic-one.md 

 Add openai extra to the installation instructions

* Update python/packages/autogen-core/docs/src/user-guide/agentchat-user-guide/magentic-one.md

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-05 23:57:23 -08:00
Victor Dibia 2eb46d2fb3
Minor updates to migration-guide.md (#4888)
- remove unecessary todo links

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-04 08:56:07 -08:00
Jack Gerrits e168616b7e
Add getting started page for magentic one (#4887) 2025-01-03 15:16:56 -05:00
Jack Gerrits bac6dc5d83
Add example docstring, dont expand constants in docstrings (#4880) 2025-01-02 18:37:16 -08:00
WcW a1d782d3ec
Fix: Correct cancellation token usage in UserProxyAgent docstring (#4874)
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-02 11:46:01 -05:00
Eric Zhu 16ceded2d2
Minor fix for incorrect description of teams and add installation instructions for ext agents (#4872)
* Minor fix for incorrect description of teams

* Add installation instructions

---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-02 10:11:13 -05:00
Sachin Joglekar ecdade3d3e
Add coverage task & integrate with poe check (#4847)
* Add coverage task & integrate with poe check

* Adding workflow

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-02 09:49:18 -05:00
Jack Gerrits 8a83262a90
add azure deps to openai extra (#4871)
* add azure deps to openai extra

* lock
2024-12-31 15:23:39 -05:00
Jack Gerrits e6ac2f37fa
Update logged events, add message id to send message (#4868)
* Update logged events

* add message_id

* serialize payload for log

* fix pytest warning

* serialization

* fix test

* lock

* fix warning and test
2024-12-31 15:11:48 -05:00
Jay d2a74de3ad
Update quickstart.ipynb (#4867)
Solving issue #4866

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-12-31 14:56:31 -05:00
Eric Zhu 9a474f7334
Add magentic one installation instruction (#4869) 2024-12-31 11:12:15 -08:00
Jack Gerrits fb1094d9c3
Update to dev13 (#4862) 2024-12-30 17:12:51 -05:00
Eric Zhu cc06ec531e
Clarify tool use in agent tutorial (#4860) 2024-12-30 13:49:51 -08:00
Eric Zhu 156c3f16c2
Migration guide for 0.4 (#4765)
* readme start

* Enhance migration guide with organization overview and section breakdown

* update toc

* Update

* wip

* wip

* WIP

* Finished draft

* add statement

* Update migration guide for v0.4: refine language and clarify PyPI package ownership

* wip

* mv

* Update

* wip

* Add lint for markdown files; fix lint errors

* Fix indent

* Fix syntax

* Fix

* Update python/check_md_code_blocks.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* wip

* WIP

* wip

* fix links

* update

* Add 0.4 component config example

* update

* update

* update

* add conversion function

* wip

* Move

* Update

* Update

* update

* Make buttons side by side

* Update

* small edits

* wip

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
Co-authored-by: Jack Gerrits <jack@jackgerrits.com>
2024-12-30 13:33:08 -08:00
Jack Gerrits c58eb9d120
Move intervention objects to root module (#4859)
* Move intervention to root

* usage
2024-12-30 16:09:37 -05:00
Gerardo Moreno 0569689e6b
Fix BaseOpenAIChatCompletionClient token usage (#4770)
* Fix openai client token usage (#4769)

* Include actual_usage in add_usage function

* Make sure result is assigned

* remove method

---------

Co-authored-by: Jack Gerrits <jack@jackgerrits.com>
2024-12-30 15:33:06 -05:00
Jack Gerrits cb1633b501
feat!: Add support for model family specification (#4856)
* Add support for model family specification

* spelling mistake

* lint, etc

* fixes
2024-12-30 15:09:21 -05:00
Jack Gerrits 190fcd15ed
fix!: Fix SingleThreadedAgentRuntime busy loop (#4855)
* Fix high cpu usage

* Use queue for shutdown

* mypy fixes

* formatting

* missing import
2024-12-30 15:04:20 -05:00
Jack Gerrits 49b52db6ea
Make `register_factory` a user facing API (#4854)
* Make register_factory a user facing API

* fix docstring

* Update python/packages/autogen-core/src/autogen_core/_agent_runtime.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* formatting

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-30 15:00:42 -05:00
Jack Gerrits 0b34211c1e
refactor!: Remove deprecations (#4853)
* Remove deprecations

* imports
2024-12-30 14:55:21 -05:00
Eric Zhu 5ee2190e00
Replace Tuple[type[ChatMessage], ...] with Sequence[type[ChatMessage]] (#4857) 2024-12-30 11:30:31 -08:00
Eric Zhu a20ec102d3
AgentChat tutorial update to include model context usage and langchain tool (#4843)
* Doc update to include model context usage

* add langchain tools

* update langchain tool wrapper api doc

* updat

* update

* format

* add langchain experimental dev dep

* type

* Fix type

* Fix some types in langchain adapter

* type ignores
2024-12-30 09:09:33 -08:00
Leon De Andrade 23dbb6a632
Add missing model context attribute (#4848)
* Add missing model context attribute

* fix type

* Add test

* imports

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-28 22:50:54 -08:00
Eric Zhu d933b9ab5f
dev12 (#4839)
* dev12
2024-12-27 11:49:12 -08:00
Jack Gerrits ad7433e817
Remove pydantic v1 compat (#4838)
Remove pydantic compat
2024-12-27 11:38:42 -08:00
Jack Gerrits a5681d73c6
Allow closure agent to ignore unknown messages, add docs (#4836)
Allow closure agent to ignore unknown messages
2024-12-27 13:37:55 -05:00
Eric Zhu 2819515220
Improve agentchat tutorial Teams section (#4834)
* update teams doc

* Update

* fmt
2024-12-27 10:25:36 -08:00
Eric Zhu b9bd8b0c64
human-in-the-loop section for agentchat tutorial (#4832)
* human-in-the-loop section for agentchat tutorial
2024-12-27 10:20:52 -08:00
Jack Gerrits fadff4aece
Fix definition of workspace package, remove uv pin (#4830)
* Fix definition of workspace package, remove uv pin

* add  --all-packages

* pin docs uv versions for older project structure

* try old version to verify CI

* Use workflow target

* change syntax

* change check

* try with var in matrix

* add all packages to workspace

* remove project table
2024-12-27 13:11:42 -05:00
Jack Gerrits 461605869c
Update links in extension page to fix 404 (#4827)
Update links in extension page
2024-12-27 12:52:36 -05:00
Jack Gerrits 5bd91fb15e
Accept agent type in more places (#4829)
* Accept agenttype in more places

* remove type hint
2024-12-27 12:21:39 -05:00
Richárd Gyikó e710f9d04f
Update discover.md with autogen-ext-mcp community package (#4826)
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-12-27 09:58:28 -05:00
Leonardo Pinheiro c078b252fb
refactor!: Migrate python code executor tool to autogen-ext (#4824)
migrate python code exec to autogen-ext

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-12-27 08:57:55 -05:00
Sachin Joglekar d1dff316bc
Update pydantic version & fix mypy errors (#4811)
* Update pydantic version & fix mypy errors

* uv lock changes

* Update lock

* update lockfile

---------

Co-authored-by: Jack Gerrits <jack@jackgerrits.com>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-12-27 08:53:52 -05:00
Leonardo Pinheiro 9a2dbb4fba
Add * before keyword args for ChatCompletionClient (#4822)
add * before keyword args

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-12-27 08:41:16 -05:00
Eric Zhu edad1b6065
Emphasis on_messages is for new messages only; remove unused file. (#4819)
* Emphasis on_messages is for new messages only

* update

* update uv

* update uv action

* try pin uv version

* pin all uv versions to 0.5.11

* revert uv lock file and remove unwanted file.
2024-12-27 08:34:21 -05:00
Jack Gerrits 0040016bec
Remove usage of internal pydantic functionality for forward ref eval (#4816)
* Remove usage of internal pydantic func

* Update python/packages/autogen-core/tests/test_tools.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update python/packages/autogen-core/tests/test_tools.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove unused import NoneType from test_tools.py

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2024-12-26 12:15:54 -08:00
Eric Zhu f774eaa105
Add minimum dep versions (#4803) 2024-12-26 12:40:32 -05:00
Eric Zhu 4f673192cb
"model" to "chat completion" (#4804)
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-12-26 12:12:02 -05:00
Sachin Joglekar 3b4dd6e050
Support custom models with OpenAI client (#4808) 2024-12-24 13:04:23 -08:00
gagb d2537abbab
Add MagenticOne API and CLI (#4782)
* Add MagenticOne API

* Add CodeExecutorAgent to MagenticOne for enhanced task execution

* Refactor MagenticOne class to inherit from MagenticOneGroupChat and streamline initialization

* Enhance MagenticOne class documentation with detailed usage examples and initialization instructions

* Refactor MagenticOne module structure and update import paths

* Remove unused imports

* Add documentation for MagenticOne module and remove redundant initialization comments

* Enhance MagenticOne class with human-in-the-loop mode and update examples

* Update MagenticOne class documentation with safety precautions and architecture details

* Run poe format

* Add blog post reference to MagenticOne class documentation

* change default of websurfer use_ocr to false because of refusals

* Refactor MagenticOne class to use ChatCompletionClient instead of OpenAIChatCompletionClient

* Add client capability validation to MagenticOne initialization

* Poe format

* Refactor imports in MagenticOne class for clarity and organization

* Add stacklevel parameter to warning in client capability validation

* Update README to recommend using Magentic-One API for improved integration

* Add create_args property to OpenAIChatCompletionClient for better access to initialization arguments

* Enhance client capability validation in MagenticOne to ensure compatibility with OpenAI GPT-4o model

* Refactor client capability validation in MagenticOne for improved clarity

* Update magentic_one.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Remove create_args property from OpenAIChatCompletionClient and update validation logic in MagenticOne to directly access _create_args

* Refactor documentation in MagenticOne for improved readability and consistency

* Refactor client capability validation in MagenticOne to remove unnecessary model check for GPT-4o

* Add MagenticOne CLI (#4788)

* Add MagenticOne CLI script for task execution with OpenAI GPT-4o integration

* Fix argument parsing in MagenticOne CLI to require a single task input

* Add docstring to main function in MagenticOne CLI for improved usage clarity

* Fix example usage in docstring of MagenticOne CLI for correct argument order

* Refactor argument parsing in MagenticOne CLI for improved clarity and consistency

* Add type hints to run_task function in MagenticOne CLI

* Add type hint for main function in MagenticOne CLI

* Remove type ignore from main function call in MagenticOne CLI

---------

Co-authored-by: Hussein Mozannar <hmozannar@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-23 16:45:21 -08:00
Eric Zhu 150a54c4f5
Refine types in agentchat (#4802)
* Refine types in agentchat

* importg

* fix mypy
2024-12-23 16:10:46 -08:00
Jack Gerrits 2c76ff9fcc
More improvements for component config (#4799)
* More improvements for component config

* clean output

* working dir

* fix fstring

* key error

* remove mv
2024-12-23 18:29:23 -05:00
Sachin Joglekar 8e116fd86d
Fix pydantic warnings when saving state (#4801) 2024-12-23 15:17:40 -08:00
peterychang 9c8877ed66
Add API documentation (#4798)
* Add API documentation

* Update python/packages/autogen-core/src/autogen_core/_cancellation_token.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-23 17:06:56 -05:00
Jack Gerrits 90d6723685
Usability improvements to component config (#4794)
* Usability improvements to component config

* Implement model upgrade
2024-12-23 14:03:58 -05:00
Jack Gerrits 428d594658
Delete python/mypy_plugin.py (#4796) 2024-12-23 10:13:31 -08:00
gagb b15551c961
Improve magentic one doc string (#4781)
* Enhance MagenticOneGroupChat documentation with architecture overview and citation reference

* Fix formatting in MagenticOneGroupChat documentation and add citation reference
2024-12-21 14:18:28 -08:00
Eric Zhu 4bce1e914a
Update agentchat quickstart to show how to handle multi-round user inputs (#4735)
Update agentchat quickstart to show how to handle multi-round user inputs.
2024-12-20 10:34:53 -08:00
Jack Gerrits dda208f9b4
Add component config support (#4757)
* Add wip component impl

* finishing touches

* remove test file

* fix json usage

* Format

---------

Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2024-12-20 13:14:24 -05:00
Lanbao a4c1314432
Correct the spelling errors in models.ipynb (#4767)
Update models.ipynb

Correct the spelling error: opne -> open

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-20 01:52:29 -08:00
Aditya Kurniawan c989181da2
use model context for assistant agent, refactor model context (#4681)
* Decouple model_context from AssistantAgent

* add UnboundedBufferedChatCompletionContext to mimic pervious model_context behaviour on AssistantAgent

* moving unbounded buffered chat to a different file

* fix model_context assertions in test_group_chat

* Refactor model context, introduce states

* fixes

* update

---------

Co-authored-by: aditya.kurniawan <aditya.kurniawan@core42.ai>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2024-12-19 22:27:41 -08:00
jspv a271708a97
Tool call result summary message (#4755)
* Adding ToolCallResultSummaryMessage

* Support for ToolCallResultSummaryMessage

* Added ToolCallSummaryMessage

* ruff format

* Add ToolCallSummaryMessage to ChatMessage

* typing and tests for ToolCallSummaryMessage

* PR Feedback

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Hussein Mozannar <hmozannar@microsoft.com>
2024-12-19 21:23:18 -08:00
Roy Belio 3dd4be949e
fix(magentic-one): Remove redundant exception raising in update_ledger (#4759)
* fix(magentic-one): Remove redundant exception raising in update_ledger method

* Remove unused exception variable 'e'

---------

Co-authored-by: Roy Belio <robelio@microsoft.com>
Co-authored-by: Hussein Mozannar <hmozannar@microsoft.com>
2024-12-19 19:30:41 -08:00
Jack Gerrits 453fe0cafd
Replace single quotes with double quotes (#4760)
* Replace single quotes with double quotes

* Fix version

* formatting
2024-12-19 14:21:51 -05:00
Jack Gerrits c74c2d6767
Follow up changes from top bar change (#4758) 2024-12-19 12:01:03 -05:00
Jack Gerrits 97e5cab523
Restructure docs, move packages to top level header (#4722)
* Restructure top level pages

* move studio
2024-12-19 10:07:07 -05:00
Victor Dibia 4e3a70303d
Add Deploy view in AGS (#4756)
* update version, fix component factory bug

* add basic structure for deploy

* minor fixes, deploy v1

* minor text updated

* format fixes

* formatting fixes .. webby test samples

* update cli command, update views,

* packakge.json and other fixes

* format fixes
2024-12-18 18:57:11 -08:00
Victor Dibia c21555290e
add chainlit sample (#4749)
* add chainlit sample

* readme updates

* put team inside run to avoid problems

* simplify example and add readme

* inform user team is reset

---------

Co-authored-by: Hussein Mozannar <hmozannar@microsoft.com>
2024-12-18 14:49:07 -08:00
Eric Zhu e902e94b14
Define AgentEvent, rename tool call messages to events. (#4750)
* Define AgentEvent, rename tool call messages to events.

* update doc

* Use AgentEvent | ChatMessage to replace AgentMessage

* Update docs

* update deprecation notice

* remove unused

* fix doc

* format
2024-12-18 14:09:19 -08:00
hsm207 7a7eb7449a
typo: travel planning (#4753) 2024-12-18 09:44:55 -08:00
Eric Zhu 44b27ad81a
Make it clear the on_messages method is stateful. (#4751) 2024-12-17 23:50:25 -08:00
Ryan Sweet c1646f21c0
Rysweet 4676 remove iagentruntime - collapse into iagentworker (#4740)
* moves AgentId into Agent
* Renames AgentRuntime to AgentMessenger (more accurate name)
* Remove IAgentRuntime Interface
* changes constructor of Agent to take IAgentWorker instead of IAgentRuntime
2024-12-17 13:04:37 -08:00
kiyoung 2cd91f66d8
make "Alias", "ImportFromModule" classes hashable (#4734)
make hashable to Alias, ImportFromModule

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-12-17 11:11:36 -08:00
Victor Dibia 03f57e9357
Update AgentChat State Docs (Saving to Disc) (#4730)
* add section on persisting state to a file on disc.

* formating fixes

* update notebook
2024-12-16 21:55:47 -08:00
Hussein Mozannar 7d0f485bd2
WebSurfer add close method (#4727)
* fix finicky websurfer test

* add close method

* update default to not download or debug

* enable closing agents in team_manager

---------

Co-authored-by: Victor Dibia <victor.dibia@gmail.com>
2024-12-16 18:51:52 -08:00
Victor Dibia 6a4a11042c
Add AOAI Support in AGS (#4718)
* add oai support, improve component config typing, minor updates to docs, update ags tests

* faq updates

* update faq, add model_capabilities

* update faq
2024-12-16 13:17:42 -08:00
peterychang e2df4e24db
Move existing quickstart guide to design patterns. Simplify quickstart (#4724)
* Move existing quickstart guide to design patterns. Simplify quickstart guide.

* minor fixes

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-16 12:42:52 -08:00
Eric Zhu 43eed01bbc
Update custom agent doc with arithmetic agent example (#4720)
* Update custom agent doc with arithmetic agent example

* fix mypy

* fix model capabilities usage
2024-12-16 09:12:26 -08:00
Victor Dibia e673c437e5
Add Documentation for AGS (#4711)
* enable download of team specs

* add docs v1 for ags to documentation website

* update docs readme/image

* Update python/packages/autogen-core/docs/src/user-guide/autogenstudio-user-guide/usage.md

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Update python/packages/autogen-core/docs/src/user-guide/autogenstudio-user-guide/index.md

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-14 22:59:26 -08:00
Arun Brahma 7c0bbf674f
feat: add support for list of messages as team task input and update Society of Mind Agent (#4500)
* feat: add support for list of messages as team task input
* Update society of mind agent to use the list input task
---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-14 21:48:17 -08:00
Victor Dibia c7145156b1
Add Component Gallery to AGS (#4693)
* fix message instance check error

* general refactor, enable 3rd party gallery

* format fixes

* update detail view

* improve detail view and test sync capabilities

* minor tweaks, version bump

* version bump

* update uv.lock

* update lockfile

* update uv.lock

* update uv lock

* pin uv version

* uv version

* revert

* revert

* minor side bar and drag drop layout fixes

* revert version numbering.

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-14 15:33:14 -08:00
Ryan Sweet 55e157cb99
Rysweet refactor 4670 rename abstractions to contracts (#4674)
* refactor renaming agent base

* 1st draft

* 1st draft

* format

* rename the tsts

* move IagentWorker

* 1st draft

* format

* gen-proto

* run gen-proto-samples

* format

* merge problem format
2024-12-12 19:43:26 -08:00
gagb fa563cb434
controlling => resetting (#4691) 2024-12-12 15:55:57 -08:00
gagb feb0da39e1
Fix lang (#4690) 2024-12-12 15:45:44 -08:00
Hussein Mozannar b9d682c0a1
WebSurfer Documentation and Fixes (#4624)
* fixes remake
* modified toml adding tests
* playwright tests
* tests websurfer
---------

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2024-12-12 14:42:40 -08:00
dependabot[bot] 4085ba5b2b
Bump nanoid from 3.3.7 to 3.3.8 in /python/packages/autogen-studio/frontend (#4631)
Bump nanoid in /python/packages/autogen-studio/frontend

Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2024-12-12 14:23:19 -08:00
peterychang 021a2cc3aa
fix poe check (#4686) 2024-12-12 11:37:57 -08:00
Kapil Sachdeva dec4c45cec
fix - correct the deprecation messages from autogen_core.components.models module (#4647)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-11 17:21:59 -08:00
peterychang a65855d00d
Fix one failure mode in the user guide (#4658)
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-12-11 16:56:33 -08:00
gagb 69526038a9
Add discord links (#4661)
* Add discord links

* Update

* Update

---------

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2024-12-11 16:32:30 -08:00
Victor Dibia 85cf942d37
Add v1 Drag and Drop Team Composition to AGS (#4609)
* v1 progress on drag_drop

* add v1 for node deletions

* major refactor, add sidebar to teams and session playground

* format updates

* formatting updates

* update formatting

* formatting and other checks

* add mangentic one deps

* general refactor, fix new team creation bug etc...

* minor bugfix

* update uv lock

---------

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2024-12-11 14:31:25 -08:00
gagb b776c53e6f
Improve language (#4650)
* Improve language

* Update images for examples

* reduce size

---------

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2024-12-11 14:04:14 -08:00
gagb 34b997769e
Add module level docstrings (#4652)
* Improve init docs

* Add docstring for messages

* Add docstring for agents

* Add docstring for teams

* Add doc string for conditions

* Add docs for ui

* Update module docstring in __init__.py

* Clarify BaseChatAgent description in __init__.py

* Fix formatting
2024-12-11 11:06:14 -08:00
hsm207 afd6257ac9
typo: messages docs (#4655) 2024-12-11 07:29:34 -08:00
Eric Zhu 6c1f638960
dev11 release (#4642)
* dev11 release
2024-12-10 08:28:48 -08:00
Jack Gerrits c234e77617
Add deprecated alias for openai model clients (#4641)
Add alias for openai model clients
2024-12-10 08:03:42 -08:00
Jack Gerrits b32f1a07d1
Use official cloud event proto schema (#4487)
* Use official cloud event proto schema

* format

* fix bug in cloud event attribute creation

---------

Co-authored-by: Kosta Petan <kostapetan@gmail.com>
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2024-12-09 22:26:53 -08:00
Eric Zhu 48778e5ffd
Minor doc fixes please merge (#4633)
Minor doc fixes
2024-12-09 22:11:57 -08:00
Jack Gerrits 7e7265ddd0
Update version for dev10 (#4630)
* Update version for dev10

* fix notebook
2024-12-09 19:33:21 -08:00
Leonardo Pinheiro 253fe216fd
Add models.openai and tools.langchain namespaces (#4601)
* add models.openai namespace

* refactor tools namespace

* update lock file

* revert pyproject changes

* update docs and add cast

* update ext models doc ref

* increase underline

* add reply models namespace

* update imports

* fix test

* linting

* fix missing conflicts

* revert pydantic changes

* rename to replay

* replay

* fix reply

* Fix test

* formatting

* example

---------

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
Co-authored-by: Jack Gerrits <jack@jackgerrits.com>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-12-09 19:18:09 -08:00
Gerardo Moreno 3e5e12bff0
Improve message error when docker isn't running (#3816) (#4600)
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-12-09 19:09:54 -08:00
Hussein Mozannar 871a83fcc5
Fix AssistantAgent Tool Call Behavior (#4602)
* 1 tool call iteration default

* handoff first

* return_only_response

* add and remove tools

* print out tool calls

* pass checks

* fix issues

* add test

* add unit tests

* remove extra print

* Update python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* documentation and none max_tools_calls

* Always limit # tool call to 1

* Update notebooks for the changing behavior of assistant agent.

* Merge branch 'main' into assistant_Agent_tools

* add reflect_on_tool_use parameter to format the tool call result

* wip

* wip

* fix pyright

* Add unit tests

* Merge remote-tracking branch 'origin/main' into assistant_Agent_tools

* Update with custom formatting of tool call summary

* format

* Merge branch 'main' into assistant_Agent_tools
2024-12-09 19:03:31 -08:00
gagb f5140badbd
Improve language of user guide (#4577)
* Improve language of agents section

* Accomodate victor's feedback

* Templ changes

* Change outline

* Fix outline further

* Flatten the outline

* remove

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-09 18:56:22 -08:00
Jack Gerrits 218e84fd8e
Migrate remaining components (#4626) 2024-12-09 18:39:07 -08:00
peterychang 51d4a10774
Fix incorrect type cast (#4620)
Co-authored-by: Hussein Mozannar <hmozannar@microsoft.com>
2024-12-09 14:28:19 -08:00
Hussein Mozannar 38cb532950
Remove inner message from thread M1 orchestrator (#4611)
remove inner message from thread
2024-12-09 10:09:13 -08:00
Jack Gerrits 87011ae01b
Migrate model context and models modules out of components (#4613)
* Move model context out of components

* move models out of components

* rename docs file
2024-12-09 10:00:08 -08:00
Hussein Mozannar 3817b8ddf6
Add MagenticOneGroupChat to AGS (#4595)
* add magenticonegroupchat to ags

* fix termination condition

* typing order check

* format error

* fix M1 orchestrator handle tool mesages

* add filesurfer and coder
2024-12-08 21:44:16 -08:00
peterychang c5c3444bce
Add user proxy docs. Make user proxy's default impl cancellable (#4459)
* Add user proxy docs. Make user proxy's default impl cancellable

* remove unnecessary import

* revert accidental change

* address PR comments

* uv sync

* Fix bugs

* poe format

* fixing mypy issues

* poe format

* ignore pyright errors for ainput

* fix example code

* remove unused import

* fix accidental reversion, example code

* formatting

* fix typing

* Update python/packages/autogen-core/docs/src/user-guide/agentchat-user-guide/tutorial/agents.ipynb

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update python/packages/autogen-core/docs/src/user-guide/agentchat-user-guide/tutorial/agents.ipynb

---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-06 14:53:59 -08:00
Eric Zhu 8dac072658
Update references in docs (#4590)
* Update agent doc

* Remove outdated doc

* Update references

* Update readme

* Update readme
2024-12-06 01:59:28 -08:00
Eric Zhu fa550c2c36
fix docs (#4589)
* fix doc on distributed runtime

* Fix references

* Update references

* Fix import paths in user guide notebooks for code executor components
2024-12-06 01:23:05 -08:00
Eric Zhu 8707729da9
dev9 (#4585)
* dev9
2024-12-06 00:43:56 -08:00
Gerardo Moreno afaf2c1288
Sequential Chat Tutorial (#3861) (#4584)
* Sequential Chat Tutorial (#3861)

* Include doc in toctree

* Rename title; doc improv

* reorder

* grammar

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-06 00:36:21 -08:00
peterychang b286c99c1f
model capabilities FAQ (#4471)
* model capabilities faq

* Add links to FAQ in more places

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-05 23:53:22 -08:00
Leonardo Pinheiro 5f61ba0c2f
Refactor autogen ext agents namespace (#4582)
* move magentic and openai assistant agents

* add import error messages

* add api docs ref files

* fix magentic rst path

* fix openai rst fname

* fix magentic rst title

* Add module

* rm

* fix some minor issues

---------

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-05 23:41:13 -08:00
Eric Zhu f5f364ccea
Add code executor modules in API doc and minor doc fixes (#4579)
* Add code executor modules

* minor fixes

* minor fixes

* minor

* minor grammar

* underlines

* code check
2024-12-05 15:57:02 -08:00
gagb ac363344da
Update user guide (#4560)
* Update user guide

* Fix typos

* Move the file to correct dir

* update notebook, add runnable code to catch bugs, improve text on inner messages

* update icons in tutorial

* Reduce references to future concepts

---------

Co-authored-by: Victor Dibia <victor.dibia@gmail.com>
2024-12-05 14:37:33 -08:00
gagb 0fd47b95d8
Remove WIP banner from landing (#4575) 2024-12-05 13:47:57 -08:00
Leonardo Pinheiro 4018a129f8
Refactor code executor namespace (#4538)
* refactor code exec namespaces

* delete code exec init

* update conflicts

---------

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
2024-12-05 07:01:59 -08:00
Jack Gerrits 9af450a59f
Move local code exec to ext, uplevel components (#4557) 2024-12-04 20:21:46 -08:00
Eric Zhu cc6765b189
API documentation page flattening (#4556)
* API documentation page refactor

* Fix links and unused pages

---------

Co-authored-by: Jack Gerrits <jack@jackgerrits.com>
2024-12-04 18:24:07 -08:00
Jack Gerrits e615059345
Remove extract_markdown_code_blocks from core API (#4554) 2024-12-04 17:13:43 -08:00
Jack Gerrits 2b878763f8
Move grpc runtimes to ext, flatten application (#4553)
* Move grpc runtimes to ext, flatten application

* rename to grpc

* fmt
2024-12-04 16:23:20 -08:00
Victor Dibia 777f2abbd7
Load and Save state in AgentChat (#4436)
1. convert dataclass types to pydantic basemodel 
2. add save_state and load_state for ChatAgent
3. state types for AgentChat
---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-04 16:14:41 -08:00
afourney fef06fdc8a
Fixed messages missing from websurfer history. (#4551)
* Fixed messages missing from websurfer history.
* Fix filesurfer too!
2024-12-04 15:13:48 -08:00
Jack Gerrits d85a607da9
Move LLMUsageTracker to a cookbook (#4549)
* Move LLMUsageTracker to a cookbook

* rename, add to index

* fmt and remove test

* Update python/packages/autogen-core/docs/src/user-guide/core-user-guide/cookbook/llm-usage-logger.ipynb

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix missing quotation marks in notebook

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2024-12-04 14:49:39 -08:00
Vaibhav Balloli 1a448c10b9
Update index.md (#4548) 2024-12-04 14:24:32 -08:00
afourney e1d58333ee
Address issue_4543 and add tests. (#4546)
* Address issue_4543 and add tests.

* Fixed pyright errors.
2024-12-04 11:28:44 -08:00
Gerardo Moreno 39ff183fad
Core API example showing multiple agents concurrently (#4461)
* Core API example showing multiple agents concurrently (#4427)

* Apply feedback

* Add different topics for closure agent example

* Address feedback

* Mypy fix

* Modify import path based on refactoring

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-04 10:39:26 -08:00