159 Commits

Author SHA1 Message Date
Diego Colombo
d186a41ed1
ensure that cancellation token is passed in InvokeWithActivityAsync (#4329)
* ensure that cancellation token is passed in InvokeWithActivityAsync

* add comments and baggange is not nullable

* store ncrunch settings

* shange signature to have nullable activity at the end of Update

* correct spelling case

* primary contructor

* add docs and make async interface accept cancellation tokens

* address code ql error
2024-11-25 00:32:56 +00:00
Xiaoyun Zhang
8f4d8c89c3
.NET add roleplay tool call orchestrator in AutoGen.OpenAI (#4323)
* add roleplay tool call orchestrator

* add chinese business workflow test

* update
2024-11-22 13:51:08 -08:00
Ryan Sweet
97fd6cc1e0
improve subscriptions (#4304) 2024-11-22 08:57:11 -05:00
Ryan Sweet
eb67e4ac93
add appsettings.Development.json to gitignore (#4303)
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-11-21 19:31:13 -05:00
Diego Colombo
b65269b8f8
create solution for the dev team sample (#4086)
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2024-11-21 11:03:30 -08:00
Xiaoyun Zhang
415d049822
.NET add document on packaging && disable uploading artifacts folder to pipeline by default (#4299)
* add package readme

* Update PACKAGING.md
2024-11-21 09:53:23 -08:00
Xiaoyun Zhang
0d79b4b2e8
Remove discord link (#4293) 2024-11-20 18:51:53 -08:00
Xiaoyun Zhang
773e62f462
Update toc.yml (#4291) 2024-11-20 18:28:51 -08:00
Xiaoyun Zhang
9a26bd7beb
.NET update nightly build feed to use AGPublic (#4284)
* update nightly build feed

* Update README.md

---------

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2024-11-20 17:08:46 -08:00
Xiaoyun Zhang
072a1c14b7
update (#4288) 2024-11-20 11:50:28 -08:00
Xiaoyun Zhang
bd81183751
.NET renaming Microsoft.AutoGen.* package (#4286)
* renaming package

* update folder name to match extension structure

* more renaming and adding tags

* fix header

---------

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2024-11-20 11:15:21 -08:00
Xiaoyun Zhang
b35977ce56
[MAYBE MERGE BEFORE WE TEST ESRP] Set up ADO pipeline for real-signing && nightly build (#4270)
* add ado pipeline

* update

* update pipeline

* update

* update iamge

* update sln

* install aspire workload

* Aspire -> aspire

* pin code analysis version to 4.8.0

* update pack

* set up wordir

* update

* update

* update

* clean up

* update

* clean up

* add dotnet
2024-11-19 17:36:08 -08:00
Xiaoyun Zhang
ac8fd99872
[.NET] Parse data uri when creating ImageMessage (#4272)
* add test

* parse data uri from ImageMessage
2024-11-19 15:09:07 -08:00
Xiaoyun Zhang
01aed82559
.NET enable artifact layout (#4271)
* enable artifact layout

* fix aot tests

* update
2024-11-19 13:54:57 -08:00
Ryan Sweet
1e3b765e3a
.net changes to re-enable xlang support, add subscription apis (#4159)
* add subscription response

* fix send subscription response

* add register agent type response

* adding a test

* working on shaping up a test

* appsettins update for backend

* another appsettings

* fixup aspire hosting

* enable AGENT_HOST var from aspire

* add SendMessageAsync

* remove broken test

* test compiles and runs but is not (yet) correct

* subscriptions grain wireup.

* temp assert true.

* remove DI for SubscriptionGrain

* add xlang python code

* add subscription response

* rebond

* Update to .NET 9.0

* Fix Backend project SDK

* Package updates

* get RegisterAgentTypeRequest working

* fix exceptions

* add error handling for requests

* whoops

* send cloud event message type

* processing cloudevents

* trying tosend proto data - doesn't work

* trying to pack proto_data

* fix (#4238)

* pack the Message from agents_events

* format - not sure why these?

* format

* cleanup, error handling, xlang sample publishes messages that can be heard by .NET and vice versa

* format

* sdk version

* sdk vers

* net8

* back to net8

* remove netstandard2

* fix used

* remove unused

* more cleanup

* remove unneeded package

* I'm terrible at writing tests

* deserialize the cloud events and sent them as events

* comment

* cleanup

* await

* Delete dotnet/samples/Hello/Backend/Backend.csproj

unneeded change

* whoops

* merge main python back into here

* revert back to local

* revert some of the helloAgents changes.

* [.NET] Add happy path test for in-memory agent && Simplify HelloAgent example && some clean-up in extension APIs (#4227)

* add happy path test

* remove unnecessary namespace

* fix build error

* Update AgentBaseTests.cs

* revert changes

---------

* fix busted merge from main

* addressing review comments

* make internal

* case sensitive rename step 1

* case sensitive rename step 2

* remove!

---------

Co-authored-by: Peter Chang <petchang@microsoft.com>
Co-authored-by: Reuben Bond <reuben.bond@gmail.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Xiaoyun Zhang <bigmiao.zhang@gmail.com>
2024-11-19 11:00:48 -08:00
Xiaoyun Zhang
ad271d975c
[.NET] Add happy path test for in-memory agent && Simplify HelloAgent example && some clean-up in extension APIs (#4227)
* add happy path test

* remove unnecessary namespace

* fix build error

* Update AgentBaseTests.cs

* revert changes

---------
2024-11-18 13:32:49 -08:00
Ryan Sweet
d23d17259d
block comment SwaggerUI so that we don't turn it on by default. (#4258) 2024-11-18 10:04:46 -08:00
Ryan Sweet
458d273fc4
Refactoring the services and implementing an in-memory runtime for .NET (#4005)
closes #3950 closes #3702

What this is doing:

I am refactoring the services on the .NET runtime and attempting to clarify the naming and organization.
I added this doc to help capture the naming and concepts.
AgentRuntime / Worker should work similar to the python version and enables running the whole agent system in one process. For remote the system uses the versions of the services in the grpc folder.
lots of other bug fixes/threading cleanup - passing cancellation token throughout
Services update clarifies the naming and roles:

Worker: Hosts the Agents and is a client to the Gateway
Gateway:
-- RPC gateway for the other services APIs
-- Provides an RPC bridge between the workers and the Event Bus
Registry: keeps track of the agents in the system and which events they can handle
AgentState: persistent state for agents
2024-11-12 11:04:59 -08:00
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
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
Reuben Bond
f40336fda1
Do not exclude Properties or appsettings.json via .gitignore, commit missing files (#4057) 2024-11-04 20:48:46 +01: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
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
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
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
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
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
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
Ryan Sweet
8f6dc4e1dd
removed unused code (#3940) 2024-10-23 21:57:37 -07:00
Ryan Sweet
bf407d99b4
rysweet-adopt .NET Microsoft.Extensions.AI abstractions (#3790)
adopts the new Microsoft.Extensions.AI abstractions
adds a base InferenceAgent
fixes a lot of pain points in the runtime wrt startup/shutdown
fixes some uncaught exceptions in the grpc stream reading
adds an example for running the backend service in its own process
adds an example of an agent that connects to OpenAI/Ollama
adds an example of wrapping an agent app in .NET Aspire
upgrades some dependencies and removes some others
Known bugs: #3922
2024-10-23 14:23:36 -07:00
Andreas Volkmann
d7369be42f
Simplify samples (#3845)
authored-by: Andreas Volkmann <anvolkma@microsoft.com>
2024-10-18 13:10:49 -07:00
Ryan Sweet
460a6817ea
refactoring the dotnet folder and namespace structure for better long term maintenance and clarity #3809 (#3810)
closes #3809 - refactor .NET code foldersand namespaces for better clarity and maintainability
2024-10-16 20:09:39 -07:00
Ryan Sweet
0214299de5
updating dependencies and build to ensure works with net9 (#3800)
* interim - doesn't work - sharing

* turn off EnforceExtended

* works with dotnet build now... ;-)

* interim progress

* more updates

* make VS happy

* update

* Update AutoGen.Ollama.csproj

* Update Microsoft.AutoGen.Agents.Abstractions.csproj

* Delete dotnet/test/AutoGen.Gemini.Tests/ApprovalTests/FunctionContractExtensionTests.ItGenerateGetWeatherToolTest.received.txt

* fix tests

---------

Co-authored-by: XiaoYun Zhang <xiaoyuz@microsoft.com>
2024-10-16 11:03:05 -07:00
Xiaoyun Zhang
0560bdd645
[.Net] Update OpenAI, semantic kernel to latest version (#3792)
* update OpenAI, semantic kernel to latest version

* fix build error

* update

* update release note
2024-10-15 07:23:33 -07:00
Max Golovanov
c48d0d7867
Update FunctionCallGenerator.cs to address race condition (#3758)
Update FunctionCallGenerator.cs to address file name race condition with simultaneous builds
2024-10-11 08:25:35 -07:00
Niklas Gustafsson
dfd239105a
improve App Host shutdown (#3727)
Improve sequence and exception handling for outpost shut down
2024-10-09 17:25:27 -07:00
Jack Gerrits
6567d90941
Update references to autogen (#3708) 2024-10-09 15:12:36 -04:00
Ryan Sweet
dea02e5dbc
add documentation for dotnet AutoGen 0.4 HellowWorld sample (#3698)
add more docs for .NET sample
2024-10-09 11:31:12 -07:00
Ryan Sweet
8e37cef69d
Rysweet dotnet folder moves (#3693)
* add service defaults to Host

* add otel to app host

* ran format

* remove HelloAgents

* moving things around to fit the folder structure/naming conventions


---------

Co-authored-by: Xiaoyun Zhang <bigmiao.zhang@gmail.com>
2024-10-09 09:58:21 -07:00
Ryan Sweet
a5e9b50448
remove broken sample and update readme quickstart for the good sample (#3687) 2024-10-09 05:38:45 -07:00
Ryan Sweet
e40056789a
Rysweet hello fix (#3683)
Fixing the HelloWorld sample and some refactoring of .NET code, adding App and Host classes in client and runtime.
2024-10-08 10:02:48 -07:00
Xiaoyun Zhang
e2c2f98eff
[.Net] Remove merging primitive from .editorconfig and gitignore (#3676)
* remove merging primitive from .editorconfig and gitignore

* use file scope namespace

* remove file-scope name

* fix format
2024-10-07 10:20:33 -07:00
Xiaoyun Zhang
9ba14ee15b
Fix dotnet test and reformat dotnet code (#3603)
* fix test

* install aspire workload

* format

* fix build error

* fix format

* format
2024-10-02 14:42:27 -04:00
Jack Gerrits
1174fcd92e Merge branch 'main' into staging 2024-10-02 14:38:28 -04:00
Jack Gerrits
9b79094891
Add blog post announcing the new architecture preview (#3599) 2024-10-02 18:04:33 +00:00