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>
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.
- 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)
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.
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)
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.
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.
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>
<!-- 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>
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.
<!-- 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.
<!-- 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.
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.
<!-- 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>
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
<!-- 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.
## 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>
<!-- 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>
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).
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>
* 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>
* 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>
<!-- 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#4439Closes#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
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.
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.
<!-- 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.
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`.
<!-- 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.
Partially resolves: #5118
Once the extension page is ready, update the tutorial pages to reduce
duplication.
---------
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
<!-- 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.
* 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>
* 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
* 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>
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...
* Pass context between AssistantAgent for handoffs
* Add parallel tool call test
---------
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
* 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>
* 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
* 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>
* 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
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>
* 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>
* 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>
* 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.
* 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
* 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>
* 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>
* 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>
* 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>
* Make package readmes slightly less empty
* Update python/packages/autogen-ext/README.md
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* 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>
* 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>
* 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>
* Minor fix for incorrect description of teams
* Add installation instructions
---------
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
* 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>
* 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>
* 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
* 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
* 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.
* 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>
* Enhance MagenticOneGroupChat documentation with architecture overview and citation reference
* Fix formatting in MagenticOneGroupChat documentation and add citation reference
* 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>
* 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>
* moves AgentId into Agent
* Renames AgentRuntime to AgentMessenger (more accurate name)
* Remove IAgentRuntime Interface
* changes constructor of Agent to take IAgentWorker instead of IAgentRuntime
* 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>
* 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>
* 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>
* 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
* 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>
* 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>
* 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>
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>
* 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>
* 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>