Commit Graph

17 Commits

Author SHA1 Message Date
Ryan Sweet ff7f863e73
Improve e2e integration tests and isolate tests from other things; includes patch to Serializer (#5497)
* integration tests used to use the samples - now they are separate
* patch dictionary problem in serializer
* add Message Registry with dead letter queue that gets checked on new
subs.
2025-02-13 16:43:57 -08:00
Jacob Alber d9432510e4
fix: Switch HelloAgent to use agent_events.proto from the Agents project (#5512)
* There was an inconsistentcy between the package names that prevented
xlang from working even though the actual types were 1:1 compatible
* Also moves the HelloAgent aspire project into the Hello solution
folder
2025-02-12 18:37:42 -05:00
Griffin Bassman 850377c74a
fix: Various fixes and cleanups to dotnet autogen core (#5242)
Co-authored-by: Jack Gerrits <jack@jackgerrits.com>
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2025-01-28 17:13:36 -05:00
Ryan Sweet b6597fdd24
rysweet-unsubscribe-and-agent-tests-4744 (#4920)
* add tests for core functionality and client/server
* add remove subscription, get subscriptions
* fix LOTS of bugs
* add grpc tuning
* adapt to latest agreed agents_worker proto changes.
2025-01-24 19:24:00 -08:00
Ryan Sweet 11461b75a2
Rysweet fix integration tests and xlang (#5107)
* fix python path

* update HelloAgent to enable grpc

* agents app remove webapplication and add grpc

* add di for client

* adding events types to grpc di

* warnings to information

* improve logging, add some error handling; fix grpc startup

* improve error logging

* cleaning up publishing of messages and message handling.

* WbApplication->HostedApplication

* formatting

* WebApplication -> HostApplication

* ensure correct .NET versions are available for integration test
2025-01-20 18:06:06 +00:00
Ryan Sweet c1646f21c0
Rysweet 4676 remove iagentruntime - collapse into iagentworker (#4740)
* moves AgentId into Agent
* Renames AgentRuntime to AgentMessenger (more accurate name)
* Remove IAgentRuntime Interface
* changes constructor of Agent to take IAgentWorker instead of IAgentRuntime
2024-12-17 13:04:37 -08:00
Ryan Sweet a19c848622
rysweet-4677-rename-agents-project-to-core-trim-dependencies (#4696)
* move optional base agents to separate package
* rename main sdk to Core
* reduce dependency graph
Co-authored-by: @rysweet 
Authored-by: @kostapetan 
Co-authored-by: @kopetan-ms
2024-12-13 11:55:43 -08:00
Ryan Sweet 55e157cb99
Rysweet refactor 4670 rename abstractions to contracts (#4674)
* 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
2024-12-12 19:43:26 -08:00
Ryan Sweet c9ebe32bd7
refactor renaming agent base - 4667 (#4669)
* refactor renaming agent base

* rename the files

* Update dotnet/src/Microsoft.AutoGen/Agents/Services/HostBuilderExtensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* update the tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2024-12-12 21:43:57 +01:00
Ryan Sweet 1c09de8d47
HelloAgents App Host with xlang sample (#4395)
* adds a python xlang sample and aspire code to host it
* fixes message delivery on dotnet runtime
2024-12-03 08:09:02 -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
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
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
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
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 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