cape.agent.options: Options for CAPE agentic

The cape.agent.options provides tools to control options for the CAPE agent and the Large Language Models that it uses.

If a model is capable of using all CAPE agentic abilities (has sufficient model_len (context window) and is reliable enough with accurate tool selection and usage, the simplest method is to simply leave that model blank. In fact, it need not even be added to ModelList; CAPE will just default to using all capabilities in that case.

Here is a sample file in which Nemotron-3 is listed but has no custom settings. CAPE agentic will expose all tools and skills to it.

{
    "ModelList": [
        "bartowski/Llama-3.2-3B-Instruct-GGUF",
        "meta-llama/Llama-3.1-8B-Instruct",
        "nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16"
    ],
    "bartowski/Llama-3.2-3B-Instruct-GGUF": {
        "ToolSet": "small",
        "SkillSet": "none"
    },
    "meta-llama/Llama-3.1-8B-Instruct": {
        "ToolSet": "medium",
        "SkillSet": "low"
    }
}

The EditAllowList option lists glob patterns (relative to the folder in which the agent is launched) of files the file-editor skill’s edit_file tool is allowed to modify. The CAPE control JSON file is always allowed (see cape.cfdx.cntl.Cntl.get_edit_allowlist()); other skills, e.g. fix-json, may also register individual files via cape.agent.agentcntl.EDIT_FILE_ALLOW_LIST;

use EditAllowList to add project-specific files:

{
    "EditAllowList": [
        "tools/*.py",
        "notes/*.md"
    ]
}

Users may also define a group of models with common settings:

{
    "ModelList": [
        "bartowski/Llama-3.2-3B-Instruct-GGUF",
        "meta-llama/Llama-3.1-8B-Instruct",
        "nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16"
    ],
    "bartowski/Llama-3.2-3B-Instruct-GGUF": {
        "ToolSet": "small",
        "SkillSet": "none"
    },
    "meta-llama/Llama-3.1-8B-Instruct": {
        "Parent": "bartowski/Llama-3.2-3B-Instruct-GGUF"
    }
}
See Also:
class cape.agent.options.AgentOpts(*args, **kw)

Options structure, subclass of dict

Call:
>>> opts = AgentOpts(fname=None, **kw)
Inputs:
fname: str

File to be read as a JSON file with comments

kw: dict

Options added into opts

Outputs:
opts: Options

Options interface

get_EditAllowList(j=None, i=None, **kw)

Get glob patterns (rel. to repo root) of files the file-editor skill may edit

Call:
>>> EditAllowList = opts.get_EditAllowList(j=None, i=None, **kw)
Inputs:
opts: AgentOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
EditAllowList: {None} | list[str]

glob patterns (rel. to repo root) of files the file-editor skill may edit

get_Model(j=None, i=None, **kw)

Get name of LLM to use; overrides model list from server

Call:
>>> Model = opts.get_Model(j=None, i=None, **kw)
Inputs:
opts: AgentOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
Model: {None} | str

name of LLM to use; overrides model list from server

get_ModelList(j=None, i=None, **kw)

Get list of models with tailored settings

Call:
>>> ModelList = opts.get_ModelList(j=None, i=None, **kw)
Inputs:
opts: AgentOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ModelList: {None} | list[str]

list of models with tailored settings

get_ShowReasoning(j=None, i=None, **kw)

Get display post-response reasoning content when exposed by the model server

Call:
>>> ShowReasoning = opts.get_ShowReasoning(j=None, i=None, **kw)
Inputs:
opts: AgentOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ShowReasoning: {True} | False

display post-response reasoning content when exposed by the model server

get_ShowToolResult(j=None, i=None, **kw)

Get display full result of each tool call

Call:
>>> ShowToolResult = opts.get_ShowToolResult(j=None, i=None, **kw)
Inputs:
opts: AgentOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ShowToolResult: {False} | True

display full result of each tool call

get_ToolDir(j=None, i=None, **kw)

Get folder (rel. to cwd) of scripts for user-tools skill

Call:
>>> ToolDir = opts.get_ToolDir(j=None, i=None, **kw)
Inputs:
opts: AgentOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ToolDir: {'tools'} | str

folder (rel. to cwd) of scripts for user-tools skill

get_URL(j=None, i=None, **kw)

Get base URL of LLM server’s OpenAI-compatible API

Call:
>>> URL = opts.get_URL(j=None, i=None, **kw)
Inputs:
opts: AgentOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
URL: {None} | str

base URL of LLM server’s OpenAI-compatible API

set_EditAllowList(v, j=None, mode=None)

Get glob patterns (rel. to repo root) of files the file-editor skill may edit

Call:
>>> opts.set_EditAllowList(EditAllowList, j=None, i=None, **kw)
Inputs:
opts: AgentOpts

options interface

EditAllowList: {None} | list[str]

glob patterns (rel. to repo root) of files the file-editor skill may edit

j: {None} | int

Phase index; use None to just return v

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

listdepth: {0} | int > 0

Depth of list to treat as a scalar

set_Model(v, j=None, mode=None)

Get name of LLM to use; overrides model list from server

Call:
>>> opts.set_Model(Model, j=None, i=None, **kw)
Inputs:
opts: AgentOpts

options interface

Model: {None} | str

name of LLM to use; overrides model list from server

j: {None} | int

Phase index; use None to just return v

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

listdepth: {0} | int > 0

Depth of list to treat as a scalar

set_ModelList(v, j=None, mode=None)

Get list of models with tailored settings

Call:
>>> opts.set_ModelList(ModelList, j=None, i=None, **kw)
Inputs:
opts: AgentOpts

options interface

ModelList: {None} | list[str]

list of models with tailored settings

j: {None} | int

Phase index; use None to just return v

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

listdepth: {0} | int > 0

Depth of list to treat as a scalar

set_ShowReasoning(v, j=None, mode=None)

Get display post-response reasoning content when exposed by the model server

Call:
>>> opts.set_ShowReasoning(ShowReasoning, j=None, i=None, **kw)
Inputs:
opts: AgentOpts

options interface

ShowReasoning: {True} | False

display post-response reasoning content when exposed by the model server

j: {None} | int

Phase index; use None to just return v

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

listdepth: {0} | int > 0

Depth of list to treat as a scalar

set_ShowToolResult(v, j=None, mode=None)

Get display full result of each tool call

Call:
>>> opts.set_ShowToolResult(ShowToolResult, j=None, i=None, **kw)
Inputs:
opts: AgentOpts

options interface

ShowToolResult: {False} | True

display full result of each tool call

j: {None} | int

Phase index; use None to just return v

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

listdepth: {0} | int > 0

Depth of list to treat as a scalar

set_ToolDir(v, j=None, mode=None)

Get folder (rel. to cwd) of scripts for user-tools skill

Call:
>>> opts.set_ToolDir(ToolDir, j=None, i=None, **kw)
Inputs:
opts: AgentOpts

options interface

ToolDir: {'tools'} | str

folder (rel. to cwd) of scripts for user-tools skill

j: {None} | int

Phase index; use None to just return v

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

listdepth: {0} | int > 0

Depth of list to treat as a scalar

set_URL(v, j=None, mode=None)

Get base URL of LLM server’s OpenAI-compatible API

Call:
>>> opts.set_URL(URL, j=None, i=None, **kw)
Inputs:
opts: AgentOpts

options interface

URL: {None} | str

base URL of LLM server’s OpenAI-compatible API

j: {None} | int

Phase index; use None to just return v

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

listdepth: {0} | int > 0

Depth of list to treat as a scalar