Skip to content
Tracon

AgentSkillDefinition

Namespace Tracon · Assembly Tracon.Abstractions.dll

A markdown-based skill definition that can be loaded into an agent at run time.

public sealed record AgentSkillDefinition : IEquatable<AgentSkillDefinition>
Inheritance
object ← AgentSkillDefinition
Implements
IEquatable<AgentSkillDefinition>
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

A skill carries instructions, resources, and AgentSkillDefinition.Scripts. Script execution is a separate security boundary: unless TraconSkillScriptOptions.AllowStoredScripts is enabled, stored scripts are only kept in storage and never executed.

public AgentSkillDefinition()

The allowed-tools declaration in the MAF frontmatter.

public string? AllowedTools { get; init; }

string?

The skill’s compatibility statement.

public string? Compatibility { get; init; }

string?

The skill’s creation time.

public DateTimeOffset CreatedAt { get; init; }

DateTimeOffset

The skill’s short description.

public required string Description { get; init; }

string

Whether the skill is included in compilation.

public bool Enabled { get; init; }

bool

The skill’s unique identifier.

public Guid Id { get; init; }

Guid

The markdown instructions given to the model.

public required string Instructions { get; init; }

string

The skill license.

public string? License { get; init; }

string?

Application-specific free-form metadata.

public IReadOnlyDictionary<string, JsonElement> Metadata { get; init; }

IReadOnlyDictionary<string, JsonElement>

The skill name. Agent definitions bind to the skill with this name.

public required string Name { get; init; }

string

Where the definition comes from: AgentDefinitionOrigin.Code for a skill registered with AddSkill, AgentDefinitionOrigin.Database for a stored one.

public AgentDefinitionOrigin Origin { get; init; }

AgentDefinitionOrigin

A code skill wins over a stored skill with the same name: it is the one the runtime loads and the one whose scripts run. GET /api/skills/{name} resolves the name the same way and reports which one it returned.

The skill’s resources.

public IReadOnlyList<AgentSkillResourceDefinition> Resources { get; init; }

IReadOnlyList<AgentSkillResourceDefinition>

The fingerprint of the whole script set: every script’s name and content hash. Computed, never stored; a value sent in a request is ignored.

public string ScriptSetHash { get; }

string

A grant without a script name (SkillScriptGrant.ScriptName is null) pins this value. Adding, removing, renaming, or changing any script changes it, and the grant stops authorizing every script of the skill until it is granted again. A skill without scripts has a fingerprint too, so its first script changes it. 64 upper-case hexadecimal characters (SHA-256).

The skill’s scripts, stored in the database or registered in code.

public IReadOnlyList<AgentSkillScriptDefinition> Scripts { get; init; }

IReadOnlyList<AgentSkillScriptDefinition>

These scripts run on the server. They are visible to the model only when TraconSkillScriptOptions.AllowStoredScripts is on; while off, the record is stored but cannot be executed. Each one runs only under a grant pinned to its content.

The tenant the skill belongs to.

public required string TenantId { get; init; }

string

The skill’s last-updated time.

public DateTimeOffset UpdatedAt { get; init; }

DateTimeOffset

The skill record’s version.

public int Version { get; init; }

int

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(AgentSkillDefinition? other)

other AgentSkillDefinition?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(AgentSkillDefinition?, AgentSkillDefinition?)

Section titled “ operator ==(AgentSkillDefinition?, AgentSkillDefinition?)”
public static bool operator ==(AgentSkillDefinition? left, AgentSkillDefinition? right)

left AgentSkillDefinition?

right AgentSkillDefinition?

bool

operator !=(AgentSkillDefinition?, AgentSkillDefinition?)

Section titled “ operator !=(AgentSkillDefinition?, AgentSkillDefinition?)”
public static bool operator !=(AgentSkillDefinition? left, AgentSkillDefinition? right)

left AgentSkillDefinition?

right AgentSkillDefinition?

bool