# Agent Wrappers

{% tabs %}
{% tab title="Javascript" %}

```javascript
const agentConfig = {
  numSamples: { direction: 4 },
  holdActions: ["up", "down"],
  // forcedHold: 4
}

const model = new Model("nn-v1", "brandinho", 0, agentConfig, false, true)
```

This is the config structure:

```javascript
{
    frameDelay: 0,
    forcedHold: 0,
    holdActions: 0,
    forceHoldActions: 0,
    numSamples: 1
}
```

{% endtab %}

{% tab title="C# - Unity" %}

```csharp
private static AgentConfig _getAgentConfig()
{
    List<string> holdActions = new () { "up", "down" };
    List<string> forceHoldActions =  new ();
    Dictionary<string, int> numSamples = new () {{ "direction", 10 }};
    return new AgentConfig(15, 4, holdActions, forceHoldActions, numSamples);
}

private async Task _loadAgent()
{
    try
    {
        bool randomlyInitialize = false;
        ModelWrapper model = new ModelWrapper("nn-v1", "brandinho", 0);
        await model.InitializeModelData(randomlyInitialize);
        model.Collector.FrameInterval = 20;
        AgentArc = new ProbabilisticAgent(model, _getAgentConfig());
        ArcModelLoaded = true;
    }
    catch (System.Exception e)
    {
        Debug.LogError($"Error loading Arc Model: {e}");
    }
}
```

This is the config definitions

```csharp
    public class AgentConfig
    {
        public int FrameDelay { get; }
        public int ForcedHold { get; }
        public List<string> HoldActions { get; }
        public List<string> ForceHoldActions { get; }
        public Dictionary<string, int> NumSamples { get; }

        public AgentConfig(
            int frameDelay, 
            int forcedHold, 
            List<string> holdActions, 
            List<string> forceHoldActions,
            Dictionary<string, int> numSamples
        )
        {
            FrameDelay = frameDelay;
            ForcedHold = forcedHold;
            HoldActions = holdActions;
            ForceHoldActions = forceHoldActions;
            NumSamples = numSamples;
        }
    }
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nrnagents.ai/advanced-options/agent-wrappers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
