Commit Graph

2678 Commits

Author SHA1 Message Date
Diego Colombo 621b17ebbe
Simplify publish events in agent (#4093)
* simplify publishing imessage contracts

use new api

complete adoption

remove unused project

more delete

more delete

* rename methods

* formatting

* 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

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-11-08 14:16:24 +00: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 9e388925d4
Initial web surfer implementation in extension (#4071)
* Initial web surfer implementation in extension

* Moved model client to constructor for consistency.

* Fixed uv lock.

* Merge branch 'main' into websurfer

* fix ruff
2024-11-07 16:47:53 -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
Mark Sze 930e61306a
Update README.md (#4078) 2024-11-06 13:17:00 -08:00
Mahesh Subramanian 2382ff9248
chore(typo): Fixing a typo in the agent identity document (#4070) 2024-11-06 10:07:13 -08:00
Eric Zhu 4be1c9cf76
Update Python version to 0.4.0.dev4 (#4068)
* Update version to dev4
2024-11-05 22:04:37 -08:00
Eric Zhu 5be7ac7b12
Move reset from a message to a command (#4073) 2024-11-05 21:40:46 -08:00
David Luong 378b307623
[.NET] Enable package vulnerable (#4054)
* wip for vulernable package checks

* edit yml build

* Set value to 'true'

* Change NuGetAudit to NuGetAuditMode

* Change NugetAuditMode to direct

---------

Co-authored-by: Xiaoyun Zhang <bigmiao.zhang@gmail.com>
2024-11-05 13:46:39 -05: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
Hussein Mozannar 10987685b9
Update README.md for magentic-one (#4061) 2024-11-04 17:45:59 -08:00
Hussein Mozannar 8603317537
Magentic-One Log Viewer + preview API (#4032)
* update example script with logs dir, add screenshot timestamp

* readme examples update

* add flask app to view magentic_one

* remove copy example

* rename

* changes to magentic one helper

* update test web surfer to delete logs

* magentic_one icons

* fix colors - final log viewer

* fix termination condition

* update coder and log viewer

* timeout time

* make tests pass

* logs dir

* repeated thing

* remove log_viewer, mm web surfer comments

* coder change prompt, edit readmes

* type ignore

* remove logviewer

* add flag for coder agent

* readme

* changes readme

* uv lock

* update readme figures

* not yet

* pointer images
2024-11-04 17:18:46 -08:00
Gerardo Moreno eca8a95c61
Remove isinstance check from FunctionTool (#3987) (#4056)
* Remove isinstance check from FunctionTool (#3987)

* Move __init__ Args to class docstring

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-11-04 16:48:57 -08:00
Reuben Bond f40336fda1
Do not exclude Properties or appsettings.json via .gitignore, commit missing files (#4057) 2024-11-04 20:48:46 +01:00
Eric Zhu 16e64c4c10
Rename `model_usage` to `models_usage`. (#4053) 2024-11-04 09:25:53 -08:00
David Luong f46e52e6ff
[.NET] Update version of Microsoft.Extension.Ai & System.Text.Json (#4044)
* Upgrade version of M.E.A.I & STJ

* remove copilot generated comment

* Revert NoWarnDuplicatePackages and remove S.T.J from Directory.Packages.props

---------

Co-authored-by: Xiaoyun Zhang <bigmiao.zhang@gmail.com>
2024-11-04 08:40:53 -05:00
Xiaoyun Zhang 5e0b677acc
[.NET] Create tools from M.E.A.I AIFunctionFactory (#4041)
* add MEAI tool support

* fix format

* update

---------

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2024-11-03 09:18:32 -08:00
Eric Zhu 4e5f3ababe
Update version to 0.4.0.dev3 (#4043) 2024-11-01 16:08:09 -07: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
Reuben Bond 7d1857dae6
Clean up the Hello sample, support Aspire 9.0, & fix shutdown in the sample (#4037)
* Wait for acknowledgment when sending message to gRPC channel

* Add CancellationToken parameters to API surface

* Clean up the Hello sample, support Aspire 9.0, & fix shutdown
2024-11-01 15:43:20 -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
Reuben Bond e9c16fe22e
Add CancellationToken parameters to API surface (#4036) 2024-11-01 13:17:17 -07:00
Reuben Bond a4901f3ba8
Wait for acknowledgment when sending message to gRPC channel (#4034) 2024-11-01 12:59:50 -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
Eric Zhu 173acc6638
Custom selector function for SelectorGroupChat (#4026)
* Custom selector function for SelectorGroupChat

* Update documentation
2024-11-01 09:08:29 -07:00
Eric Zhu 369ffb511b
Remove termination condition from team constructor (#4025)
* Remove termination condition from team constructor

* fix usage
2024-11-01 05:50:20 -07:00
Eric Zhu cff7d842a6
AgentChat streaming API (#4015) 2024-11-01 04:12:43 -07:00
Mohammad Mazraeh 4023454c58
add simple chainlit integration (#3999) 2024-10-31 04:54:24 -07:00
Rohan Thacker 3c63f6f3ef
Corrected typo in get_capabilities in _model_info.py (#4002) 2024-10-30 13:39:45 -07:00
Xiaoyun Zhang 6bea055b26
[.Net] Add a generic `IHandle` interface so AgentRuntime doesn't need to deal with typed handler (#3985)
* add IHandle for object type

* rename handle -> handleObject

* remove duplicate file header setting

* update

* remove AgentId

* fix format
2024-10-30 11:53:37 -07:00
Eric Zhu 3d51ab76ae
Formalize `ChatAgent` response as a dataclass with inner messages (#3990) 2024-10-30 10:27:57 -07:00
Xiaoyun Zhang e63fd17ed5
[.Net] use file-scope (#3997)
* use file-scope

* reformat
2024-10-30 10:05:58 -07:00
Ryan Sweet 51cd5b8d1f
interface inheritance examples (#3989)
changes to AgentBase and HostBuilderExtensions to enable leveraging handlers from composition (interfaces) vs inheritance... see HelloAgents sample for usage

closes #3928
is related to #3925
2024-10-30 09:51:01 -07:00
Eric Zhu 4a49844996
`ChatAgent` declares the types of messages it produces (#3991)
* `ChatAgent` declares the types of messages it produces
2024-10-30 05:32:11 -07:00
Victor Dibia 75b00e76e1
Agentchat move termination (#3992) 2024-10-29 18:37:26 -07:00
Ryan Sweet 0f4dd0cc6d
Agentbase refactor (#3980)
Remove unused code, refactor AgentBase and AgentWorker/Runtime to use interfaces throughout to enable future implementation of alternate runtimes and separation of the gprpc service from Agent Base (for future in-memory version). 
Also adds the missing RegisterAgentResponse methods
2024-10-29 16:59:27 -07:00
Anthony Uphof 87bd1de396
Fix: provide valid Prompt and Completion Token usage counts from create_stream (#3972)
* Fix: `create_stream` to return valid usage token counts
* documentation

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-10-29 16:20:03 -07:00
Eric Zhu bd9c371605
Add `ResetMessage` to clear the agent state (#3988)
* Reset message to clear agent state

* format and lint
2024-10-29 09:45:57 -07:00
Gerardo Moreno 93733dbd65
Run LocalCommandLineCodeExecutor within venv (#3977)
* Run LocalCommandLineCodeExecutor within venv

* Remove create_virtual_env func and add docstring

* Add explanation for LocalCommandLineExecutor docstring example

* Enhance docstring example explanation

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-10-29 08:17:34 -07:00
Eric Zhu eb4b1f856e
Ability to generate handoff message from AssistantAgent (#3968)
* Ability to generate handoff message from AssistantAgent

* Fix mypy

* Validation

---------

Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2024-10-29 08:04:14 -07:00
Ryan Sweet 14846a3e84
first draft of stateful persistence grains for each agent.... (#3954)
* adds Orleans persistence for AgentState
2024-10-28 17:28:36 -07:00
Xiaoyun Zhang 6925cd436a
mitigate dotnet interactive blocking issue (#3982)
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2024-10-28 17:01:03 -07:00
Ikko Eltociear Ashimine fda85e1295
[.Net] update GeminiChatAgent.cs (#3608)
multipe -> multiple

Co-authored-by: Xiaoyun Zhang <bigmiao.zhang@gmail.com>
2024-10-28 15:03:02 -07:00
Mohammad Mazraeh 0052e8179d
Add sample distributed group chat notebook (#3759)
* first notebook for distributed rock, paper and scissors

* add distributed group chat notebook

* fix formatting

* fix pipeline issues

* fix formatting issue

* promote distributed group chat notebook into a multiple files

* fix docs

* fix docs

* fix pyright

* Apply suggestions from code review

Add PR review suggestions

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

* improving group chat manager from round robin to LLM based

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

* remove lfs file to fix

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

* add gut back using lfs

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

* re-add gif using lfs

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

* remove gitattributes

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

* redo git lfs add

---------

Signed-off-by: Mohammad Mazraeh <mazraeh.mohammad@gmail.com>
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-10-28 09:59:58 -07:00
Will c06f8d3aa3
Update agents.ipynb (#3979)
a mistake about in User Guide sector
2024-10-28 08:17:49 -07:00
Leonardo Pinheiro a626d7cf18
replace assertion with valueerror (#3974)
Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
2024-10-26 22:13:52 -07:00
Eric Zhu 3fe0f9e97d
Add AssistantAgent, deprecate CodingAssistantAgent and ToolUseAssistantAgent (#3960)
* Add AssistantAgent, deprecate CodingAssistantAgent and ToolUseAssistantAgent

* Rename

* Add note

* Update uv

* uf lock

* Merge branch 'main' into assistant-agent

* Update uv
2024-10-25 23:17:06 -07:00
Eric Zhu 69fc742537
Pin uv version to 0.4.26 (#3964) 2024-10-25 22:23:40 -07:00
Eric Zhu f31ff66368
Refactor agent chat to prepare for handoff/swarm (#3949)
Add handoff message type to chat message types
Add Swarm group chat that uses handoff message to select next speaker
Remove tool call and tool call result message types from chat message types
Remove BaseToolUseChatAgent, move tool call handling from group chat's chat agent container upward to the ToolUseAssistantAgent implementation, which subclasses BaseChatAgent directly.
Renaming for better clarity

---------

Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2024-10-25 10:57:04 -07:00