Remove instructions from base agent type, and ensure description is only required where necessary. (#154)

* Remove instructions from base agent type, and ensure description is only required where necessary.

* Fix code issue.

* Remove unused import.

* Remove typo

* Make the description parameter optional

* Also use name for handoffs if no description is provided.
This commit is contained in:
westey
2025-07-10 13:06:45 +00:00
committed by GitHub
parent fbf1f10a8a
commit bc6573f475
8 changed files with 39 additions and 24 deletions
@@ -15,7 +15,7 @@ public readonly struct ActorMetadata : IEquatable<ActorMetadata>
/// <param name="type">The type of the actor.</param>
/// <param name="key">The unique key associated with the actor.</param>
/// <param name="description">A brief description of the actor.</param>
public ActorMetadata(ActorType type, string key, string description)
public ActorMetadata(ActorType type, string key, string? description = null)
{
if (!ActorId.IsValidKey(key))
{
@@ -46,7 +46,7 @@ public readonly struct ActorMetadata : IEquatable<ActorMetadata>
/// <summary>
/// A brief description of the actor's purpose or functionality.
/// </summary>
public string Description { get; }
public string? Description { get; }
/// <inheritdoc/>
public override readonly bool Equals(object? obj) =>
@@ -53,7 +53,7 @@ public abstract class RuntimeActor : IRuntimeActor
protected RuntimeActor(
ActorId id,
IAgentRuntime runtime,
string description,
string? description = null,
ILogger? logger = null)
{
this.Id = id;