Commit Graph

423 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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 8df86e2b72
docs: enhance Swarm user guide with notes on tool calling (#5103) 2025-01-20 12:49:32 -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
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 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
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
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 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 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
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 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
Jack Gerrits d2c1bb8ad9
Remove accidentally added character (#4980) 2025-01-09 19:00:19 -05:00