19 lines
498 B
C#
Raw Normal View History

2025-01-27 10:25:00 -05:00
// Copyright (c) Microsoft Corporation. All rights reserved.
// IAgent.cs
namespace Microsoft.AutoGen.Contracts.Python;
public interface IAgent : ISaveState<IAgent>
{
public AgentId Id { get; }
public AgentMetadata Metadata { get; }
2025-01-27 12:08:07 -05:00
public ValueTask<object?> OnMessageAsync(object message, MessageContext messageContext); // TODO: How do we express this properly in .NET?
2025-01-27 10:25:00 -05:00
}
public interface IHostableAgent : IAgent
{
2025-01-27 12:33:34 -05:00
public ValueTask CloseAsync() => ValueTask.CompletedTask;
2025-01-27 10:25:00 -05:00
}