72 Commits

Author SHA1 Message Date
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
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
Eric Zhu
5ee2190e00
Replace Tuple[type[ChatMessage], ...] with Sequence[type[ChatMessage]] (#4857) 2024-12-30 11:30:31 -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
150a54c4f5
Refine types in agentchat (#4802)
* Refine types in agentchat

* importg

* fix mypy
2024-12-23 16:10:46 -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
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
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
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
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
Jack Gerrits
218e84fd8e
Migrate remaining components (#4626) 2024-12-09 18:39:07 -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
Jack Gerrits
9af450a59f
Move local code exec to ext, uplevel components (#4557) 2024-12-04 20:21:46 -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
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
Jack Gerrits
3022369eeb
Flatten core base and components (#4513)
* Flatten core base and components

* remove extra files

* dont export from deprecated locations

* format

* fmt
2024-12-03 17:00:44 -08:00
Eric Zhu
32aa452af8
Remove autogen_agentchat.tasks, create autogen_agentchat.ui and autogen_agentchat.conditions (#4512) 2024-12-03 15:24:25 -08:00
Eric Zhu
b62f8f63dc
Remove logging from autogen agentchat (#4510) 2024-12-03 14:45:10 -08:00
Eric Zhu
50e84b945e
Move handoff to base in agentchat (#4509) 2024-12-03 14:34:55 -08:00
Hussein Mozannar
ac3424d619
MagenticOne Orchestrator Fixes (#4430) 2024-11-30 14:11:20 -08:00
Eric Zhu
7e589a1bbb
User proxy documentation and fixes (#4401)
* Fix handoff bug in user proxy agent

* Update documentation

---------
2024-11-27 10:48:39 -08:00
Eric Zhu
52790a8de7
o1 support for agent chat, and validate model capabilities (#4397) 2024-11-27 10:45:51 -08:00
Eric Zhu
3058bafcf2
Propagate team cancellation token in agentchat (#4400)
* Propagate team cancellation token in agentchat

* Docs

---------

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2024-11-27 10:40:34 -08:00
Gerardo Moreno
1b2d42d420
Termination Conditions Tutorial (#4334) (#4339)
* Termination Conditions Tutorial (#4334)

* Fix format

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

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

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

* update docs

* update doc

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-11-25 10:09:06 -08:00
Victor Dibia
0ff1687485
Add UserProxyAgent in AgentChat API (#4255)
* initial addition of a user proxy agent in agentchat, related to #3614

* fix typing/mypy errors

* format fixes

* format and pyright checks

* update, add support for returning handoff message, add tests

---------

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
Co-authored-by: Hussein Mozannar <hmozannar@microsoft.com>
2024-11-23 19:24:24 -08:00
Thai Nguyen
0b5eaf1240
Agent name termination (#4123) 2024-11-23 07:07:21 -08:00
Eric Zhu
6e4609a76e
External termination condition (#4294) 2024-11-21 03:25:53 -05:00
Gerardo Moreno
8593b7df9f
Console to return last processed message (#4279)
* Console to return last processed (#4277)

* Preserve input generator type

* Add tests

* format

---------

Co-authored-by: Jack Gerrits <jack@jackgerrits.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-11-20 12:34:13 -05:00
Eric Zhu
2b7658a9da
Move openai assistant agent to autogen-ext; add on_messages_stream (#4268) 2024-11-19 01:42:11 -05:00
Leonardo Pinheiro
df32d5e1d1
OpenAI Assistants Agent (#4131)
* initial assistant client draft

* expose assistants client

* initial openai assistant agentchat draft

* update file search

* add delete methods and fix typing

* add tool execution

* fix tool call and add docstring

* abstract tools and support thread management

* add tests

* removed unused typevars

* add unsaved test changes

* test typing fixes

---------

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
2024-11-19 09:56:15 +10:00
Eric Zhu
f1daff1582
AgentChat task message type and group chat state validation for Swarm (#4230)
* task can be ChatMessage; add group chat state validation step, and address swarm state valiation; change handling of start and reset to RPC to capture any error.

* Update tutorial note
2024-11-18 11:46:20 -05:00
Gerardo Moreno
8d89500255
Timeout Termination (#4038) (#4214)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-11-15 10:12:45 -08:00
Eric Zhu
78019dd2dc
Fix-swarm-handoff (#4198)
* fix select speaker for swarm

* Fix max-turn = 1 for swarm
2024-11-15 10:02:59 -08:00
Eric Zhu
233e482c7b
Max turn parameter for group chats (#4143)
* Max turn parameter for group chats

* Add note no usage
2024-11-13 15:10:04 -08:00
Eric Zhu
4786f189bc
Handoff termination and show how to use it for asking user input (#4128)
* Handoff termination and show how to use it for asking user input

* lint
2024-11-11 00:38:52 -05:00
Eric Zhu
5547a6716e
auto reset termination when a run stops (#4126) 2024-11-10 20:19:09 -08:00
Eric Zhu
8f7c717149
reset --> on_reset :D (#4121) 2024-11-10 18:28:20 -08:00
Eric Zhu
3f28aa8874
SocietyOfMind agent for nested teams (#4110)
* Initial implementation of SOM agent

* add tests

* edit prompt

* Update prompt

* lint
2024-11-08 16:41:34 -08:00
Eric Zhu
5fa38b0166
Add task type that are messages to enable multi-modal tasks. (#4091)
* Add task type that are messages to enable multi-modal tasks.

* fix test
2024-11-07 21:38:41 -08:00
Eric Zhu
2e3155be2a
AgentChat pause, resume, and reset (#4088)
* AgentChat pause and resume a task
Resolves #3859

* Add

* Update usage

* Update usage

* WIP to address stateful group chat

* Refactor group chat to add reset and flags for running

* documentation
2024-11-07 16:00:35 -08:00
Eric Zhu
5be7ac7b12
Move reset from a message to a command (#4073) 2024-11-05 21:40:46 -08:00
Eric Zhu
c3283c64a3
Agentchat refactor (#4062)
* Agentchat refactor

* Move termination stop message to a separate field in task result

* Update quick start example

* Use string stop reason instead of stop message in task result for simpler API

* Use main function
2024-11-05 08:07:49 -08:00
Eric Zhu
16e64c4c10
Rename model_usage to models_usage. (#4053) 2024-11-04 09:25:53 -08:00
Eric Zhu
4fec22ddc5
Team termination condition sets in the constructor (#4042)
* Termination condition as part of constructor

* Update doc

* Update notebooks
2024-11-01 15:49:37 -07:00
Eric Zhu
27ea99a485
Add token usage termination (#4035)
* Add token usage termination

* fix test
2024-11-01 15:01:43 -07:00
Eric Zhu
ca7caa779d
Add token usage to messages (#4028)
* Add token usage to messages

* small test edit
2024-11-01 13:20:25 -07:00
Eric Zhu
c3b2597e12
AssistantAgent no longer sends out StopMessage. We use TextMentionTermination("TERMINATE") on the team instead for default setting. (#4030)
* AssistantAgent no longer sends out StopMessage. We use TextMentionTermination("TERMINATE") on the team instead for default setting.

* Fix test
2024-11-01 12:35:26 -07:00