Commit Graph

125 Commits

  • .NET: Update OpenTelemetry Agent - Added Demo, AIAgentMetadata and Agent.GetService() (#356)
    * OTEL Demo
    
    * updating telemetry sample
    
    * OTEL updates
    
    * WIP
    
    * Adding GetService and Agent Metadata for Telemetry
    
    * WIP
    
    * Add UT for OTEL System behavior
    
    * Address Unicode problem
    
    * Add logging
    
    * Adjust for new extensions
    
    * Change Logger to LoggerFactory for the extension method
    
    * Address AI Feedback
    
    * Simplify script and readme just for Azure OpenAI
    
    * Increase code converage
    
    * Address merge conflict
    
    * Another slnx fix
    
    * Address PR comments
    
    * Address PR feedback + Add UT
    
    * Added Hosting UT to the solution
    
    * Address PR comments
    
    * Address missing sensitivity tests
    
    * Remove unecessary override
    
    * Address PR comments
  • .Net: WIP: feat: Define Workflow and Executor APIs (#261)
    * feat: Define Workflow and Executor APIs
    
    * feat: Define IExecutionContext and Events
    
    * feat: Simple Workflow Demos
    
    * refactor: Move Workflows classes to separate assembly
    
    * feat: Move FanOut/In to LowLevel API with new semantics
    
    * feat: Implement Local Execution
    
    * refactor: Assembly name .Workflow => .Workflows
    
    * feat: Enable Default Message Handling
    
    * also lifts Bind in MessageHandlerInfo to better be able to direclty invoke handlers (for AOT, later)
    
    * feat: Implement StreamingHandle APIs
    
    This allows the user to respond to WorkflowEvents with external messages, enabling HIL.
    
    * feat: Add checks for duplicate edges and chain cycles
    
    * feat: Add built-in WorkflowEvents
    
    * refactor: Pull classes into own files
    
    * refactor: Simplify Disposal pattern in Executor
    
    * refactor: Break EdgeRunner file into per-type files
    
    * refactor: Use Throw.IfNull()
    
    * refactor: Remove AddLoop()
    
    Per https://github.com/microsoft/agent-framework/pull/272#discussion_r2241739079 we decided this was not very useful.
    
    * refactor: Normalize use of ValueTask
    
    * fix: Build Break from removing .AddLoop
    
    * refactor: Explicit routing and RouteBuilder
    
    Split out reflection from MessageRouter implemention into build phase, enabling AOT compilation to drive RouteBuilding without reflection.
    
    * test: Add Reflection/Invocation tests
    
    * fix: Terminate on Completion event
    
    * refactor: Update public API surface
    
    * feat: Add support for external requests
    
    * feat: Support hosting AIAgent instances in Workflows
    
    * fix: Fix routing to go through Executor.ExecuteAsync
    
    * test: Update samples for "must SendMessage" semantics
    
    * Add invoking samples to unit tests to avoid future breaks
    
    * fix: ExternalRequest should block Workflow completion
    
    * feat: Normalize API surface against Python
    
    * Also adds xmldoc to all public APIs
    
    * refactor: Normalize UnitTest and Sample namespaces
    
    * fix: Formatting
    
    * refactor: Normalize project/folder names
    
    * feat: Remove DynamicCodeExecution from ValueTaskTypeErasure
    
    * fix: Fix ILTrim warnings
    
    * docs: Add missing docs and fix typos
    
    * feat: Hosted Agents should report Run events
    
    * fix: Fix type propagation for ILTrim changes
    
    * refactor: Simplify DynamicallyAccessedMembers annotations
    
    * sample: Use static-Type construction of InputPort
    
    * feat: Support non-Streaming Run Mode
    
    * test: Add test for non-streaming execution
    
    * refactor: Remove unused types
    
    * refactor: Simplify Event and EdgeData type hierarchies
    
    * feat: Add Switch (=Conditional Edge Group) control flow
    
    * feat: Make .NET AutoSend the MessageHandler result
    
    * feat: Implement State APIs
    
    * refactor: Simplify public namespaces and code organization
    
    * refactor: Reconcile .NET and Python names
    
    ---------
    
    Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
  • .NET: Add agent hosting package and update sample (#296)
    * Add agent hosting package and update sample
    
    * Review feedback and cleanup
    
    * Include the narrator
    
    * wip
    
    * wip
    
    * Remove workaround for empty state writes.
    
    * Handle changes to AgentThread.
    
    * One more.
    
    * Fix.
    
    ---------
    
    Co-authored-by: Aditya Mandaleeka <adityam@microsoft.com>
  • .NET: CosmosDB Actor State Storage (#262)
    * Implement CosmosDB actor state storage.
    
    * Fix.
    
    * Minor fixes.
    
    * Fixes.
    
    * Make CosmosDB initialization be lazy.
    
    * Remove unnecessary read from write path.
    
    * Throw on empty writes.
    
    * Add arg validation for read.
    
    * Add CosmosIdSanitizer.
    
    * Fix.
    
    * Fix.
    
    * Simplify doc IDs.
    
    * Update comment.
    
    * fb
    
    * Make LazyCosmosContainer internal and add tests.
    
    * Make test constants public and remove IVT.
    
    * Use source generated JSON context for future nativeAOT support.
    
    * Re-add dropped comments.
  • .Net: Add Structured output ChatClientAgent samples (#250)
    * WIP
    
    * Structured Output sample
    
    * Update dotnet/samples/GettingStarted/Steps/Step06_ChatClientAgent_StructuredOutputs.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Address xml and comment targeting the Structured Output context
    
    * Update with proposed fix for Persistent ChatClient
    
    * Address PR feedback
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
  • .NET: Move external MEAI classes to releasable packages (#279)
    * Move external MEAI classes to releaseable packages
    
    * Update dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/MEAI/NewHostedFileSearchTool.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/MEAI/NewHostedCodeInterpreterTool.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/src/Microsoft.Extensions.AI.Agents.AzureAI/NewPersistentAgentsChatClient.cs
    
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
  • Initial draft of actor runtime abstractions (#197)
    * Initial draft of actor runtime abstractions
  • Add a minimum console demo app (#198)
    * Add a minimum console demo app
    
    * Remove hardcoded values from sample.
    
    * Make console project .net 9.0 only.
    
    * Move minimum console demo to demo folder.
    
    * Fix framework issue with demo project.
    
    * Undo unintended commit.
    
    * Address PR comments
    
    * Fix build issue.
    
    * Address PR Comments
    
    * Rename Agent to AIAgent in new console app.
  • .Net: Add OpenTelemetry Support and Samples (#182)
    * Adding sample and implementation similar to MEAI approach
    
    * Add Telemetry UnitTests
    
    * Fix Async suffix
    
    * Add ADR with the proposal
    
    * Address merge changes
    
    * Fixing const visibility + coverage
    
    * Increase test coverage, add metrics collection code paths
    
    * Fix warnings
    
    * WIp
    
    * Convention adeherence
    
    * Add gen-ai.system logic + UT
    
    * Add convetion reference
    
    * Address PR comments
    
    * Addressing PR comments, Agent name optional
    
    * Remove constant
    
    * Update dotnet/src/Microsoft.Extensions.AI.Agents/ChatCompletion/ChatClientAgent.cs
    
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
    
    * GetLoggingName
    
    ---------
    
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
  • Add extension methods to get an AF agent from a Foundry Client (#191)
    * Add helpers to go from foundry client to agent more easily.
    
    * Fix xml docs.
  • Round 2 of cleanup for agent runtime and orchestrations (#164)
    - Moved InProcessRuntime type into abstractions package and deleted InProcess package.
    - Moved several members of IAgentRuntime to be extension methods instead, e.g. multiple GetActorAsync overloads.
    - Added synchronous RegisterMessageHandler overloads and used them to avoid unnecessary async usage at call sites.
    - Removed unnecessary surface area from InProcessRuntime, e.g. StopAsync, RunUntilIdleAsync, etc.
    - Fixed spin loop in InProcessRuntime that would consume an entire core for the duration of the orchestration's operation.
    - Removed a bunch of allocation from InProcessRuntime.
    - Made a runtime optional for orchestrations, defaulting to using a temporary InProcessRuntime if none is provided.
    - Removed custom delegate types from orchestrations.
    - Consolidated namespaces.
    - Used records to simplify message classes.
    - Tweaked naming on AgentActor to make purpose of protected methods more clear.
    - Removed invocation in AgentActor.InvokeAsync of empty update / isFinal parameter.
    - Changed OrchestrationHandoffs to avoid needing to pass in agents duplicatively.
    - Made various extension methods, such as those on OrchestrationHandoffsExtensions, into instance methods.
  • Add PoC CopilotStudio agent (#84)
    * Add project and skeleton files.
    
    * Add CopilotStudioAgent implementation
    
    * Add CopilotStudio integration tests
    
    * Fix typos and PR feedback.
    
    * Fix .net framework build errors.
    
    * Address PR comments
    
    * Remove temp test.
    
    * Add rawresponse for streaming updates and more comments.
    
    * Add TODO to review streaming updates
    
    * Address PR comments and fix some issues with streaming messages.
    
    * Map additional properties to agent reponses
    
    * Update CopilotStudio integration tests to match new approach.
    
    * Update copilot studio namespaces/project names to match new naming
    
    * Add todo's for AIContent types.
    
    * Remove files from PR.
    
    * Fix up sln file.
    
    * Update .gitignore.
    
    * Remove duplicate package version items.
  • .NET Port Agent Orchestration (#107)
    * Checkpoint
    
    * Checkpoint
    
    * Namespaces
    
    * Namespace
    
    * Cleanup
    
    * Namespace order
    
    * Fix sync
    
    * Formatting
    
    * Formatting
    
    * Namespace
    
    * Namespace order
    
    * Code convention
    
    * Naming
    
    * Naming
    
    * Text handling
    
    * Text handling
    
    * Namespace
    
    * Namespace order
    
    * Namespace ordering
    
    * Test
    
    * ValueTask
    
    * net472
    
    * Test fix
    
    * Fix namespace (net472)
    
    * Namespace
    
    * Fix conditional namespace
    
    * Fix type expression
    
    * Compatibility and cleanup
    
    * Sample compatibility
    
    * Sample compat
    
    * Test compat
    
    * modifier order
    
    * Simply http-stub
    
    * Formating fix for unit-test
    
    * Fix test
    
    * Real fix
    
    * Test clean-up
    
    * Update dotnet/src/Microsoft.Agents.Orchestration/Handoff/HandoffOrchestration.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Fix build errors after merging
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: Stephen Toub <stoub@microsoft.com>
  • Renaming to use Microsoft.Extensions prefix (#120)
    * Rename the folders
    
    * Rename the .csproj files
    
    * Some build file updates
    
    * Update namespaces
    
    * Fix order of imports
    
    * Fix order of imports
    
    * Fix order of imports
  • .Net: Add Reasoning Model Integration tests (#100)
    * Add reasoning integration tests
    
    * Adding Reasoning Model config
  • .Net: Added Azure AI Persistent Agents (#81)
    * Added PersistentAgentsChatClient
    
    * Added integration tests
    
    * Small fixes
    
    * Added sample
    
    * Added TODO for tools
    
    * Small rename
    
    * Removed user-secrets id
    
    * Renamed project
    
    * Fixed warning
    
    * Fixed warning
    
    * More fixes
    
    * More fixes
  • Add tests for ChatClientAgent with OpenAI responses (#82)
    * Add tests for ChatClientAgent with OpenAI responses
    
    * Address PR comments
    
    * Fix typo
  • Add additional integration tests and add OpenAIAssistant integration tests project. (#79)
    * Add additional integration tests and add OpenAIAssistant integration tests project.
    
    * Address PR comments.
    
    * Address PR comments.
  • Add test infrastructure for agent conformance tests (#77)
    * Add test infrastructure for agent conformance tests
    
    * Address PR comments.
    
    * Switch TargetFrameworks to have inline condition
  • Update ChatClientAgentThread to support both in-memory and service storage. (#70)
    * Update ChatClientAgentThread to support both in-memory and service storage.
    
    * Fix typos.
    
    * Address PR comments
    
    * Move code to reusable sections.
    
    * Remove DefaultThreadStorageLocation
    
    * Change thread type naming and make it internal
    
    * Fix bug for streaming case.
    
    * Add additional unit tests
    
    * Add more unit tests to verify agent's thread update behavior.
  • .Net: Add ChatClientAgent Samples - OpenAI Model Client (#72)
    * Add Streaming API
    
    * Removing InstructionsRole
    
    * Updating thread notification strategy
    
    * Fix net472 failing
    
    * Small fixes
    
    * Adding Samples for OpenAI
    
    * WIP samples
    
    * default runsettings for unit tests
    
    * Adding first samples with OpenAIModelChatClientAgents
    
    * Removing OpenAI dependency on the sample utility
    
    * Release -> Debug update for GettingStarted project
    
    * Fix GettingStarted.csproj failing to build in Release
    
    * Update dotnet/src/Shared/Samples/BaseSample.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Address PR feedback
    
    * Fix Step 1 samples
    
    * Simplify code
    
    * Address PR feedback
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .Net: Added shared classes (#58)
    * Added Throw shared class
    
    * Added Experimental attribute
    
    * Added IsExternalInit
    
    * Added TrimAttributes
    
    * Small update
    
    * Small update
    
    * Suppress warning
    
    * Added comment
    
    * Updated LegacySupport.props
    
    * Small updates
  • Add skeleton dotnet project structure (#49)
    * Add skeleton dotnet project structure
    
    * Fix casing in import statement.
    
    * Moving tests folder to be a sibling of src.
    
    * Update tests to use directory.builds.props and only build necessary frameworks.
    
    * Move more test props to directory.build.props
    
    * Add AotCompatible flag and .net 8.0
    
    * Rename Tests to UnitTests
    
    * Add global.json file
    
    * Update publish mapping for unit tests to debug, to reduce build times.