# TraconSkillScriptBuilderExtensions

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.traconskillscriptbuilderextensions/
> Summary: TraconSkillScriptBuilderExtensions: Configuration extensions that enable skill script execution.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Core.dll</code></div>

Configuration extensions that enable skill script execution.

```csharp
public static class TraconSkillScriptBuilderExtensions
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.traconskillscriptbuilderextensions/">TraconSkillScriptBuilderExtensions</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Methods

### <a id="Tracon_TraconSkillScriptBuilderExtensions_UseSkillScripts_Tracon_ITraconBuilder_System_Action_Tracon_TraconSkillScriptOptions__"></a> UseSkillScripts\(ITraconBuilder, Action<TraconSkillScriptOptions\>\)

Enables skill script execution.

```csharp
public static ITraconBuilder UseSkillScripts(this ITraconBuilder builder, Action<TraconSkillScriptOptions> configure)
```

#### Parameters

`builder` [ITraconBuilder](/api/tracon.itraconbuilder/)

The configuration chain.

`configure` [Action](https://learn.microsoft.com/dotnet/api/system.action\-1)<[TraconSkillScriptOptions](/api/tracon.traconskillscriptoptions/)\>

Modifies the script settings.

#### Returns

 [ITraconBuilder](/api/tracon.itraconbuilder/)

The continuation of the chain.

#### Remarks

**This call changes a security boundary.** Once
enabled, Tracon can run scripts from permitted skills *on its
own machine*.

Tracon does not provide operating-system-level isolation: cutting
off network access, restricting the file system, applying CPU/memory
quotas, and dropping privileges are the hosting environment's job. For
this reason, the application **fails at startup** if
[TraconSkillScriptOptions.PlatformIsolationAcknowledged](/api/tracon.traconskillscriptoptions/#Tracon_TraconSkillScriptOptions_PlatformIsolationAcknowledged)
is not set.

Even with the feature enabled, a script also requires a
[SkillScriptGrant](/api/tracon.skillscriptgrant/) record and a user approval that has gone
through MAF's approval flow before it can run.

An approved script goes to the registered [ISkillScriptExecutor](/api/tracon.iskillscriptexecutor/).
This call registers the built-in one, which starts a local process under
the host's operating-system identity. Register your own executor with
`AddSingleton`, before or after this call, to run scripts somewhere
else; add `RequireCustomBinding<ISkillScriptExecutor>` to stop
the host when the built-in one is still what resolves. The acknowledgment
above is required with any executor: Tracon cannot verify what isolation an
executor provides.

```csharp
builder.AddTracon()
       .UseSkillScripts(o =>
       {
           o.PlatformIsolationAcknowledged = true;   // running inside a container
           o.SkillRoots.Add("/opt/tracon/skills");
           o.Interpreters["py"] = "/usr/bin/python3";
           o.Timeout = TimeSpan.FromSeconds(30);
       });
```

#### Exceptions

 [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception)

One of the dependencies is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null).
