Agent setup
Detect coding agents, install cua skills and configure their MCP servers.
Detect coding agents, install cua skills and configure their MCP servers.
cua.agent_setup() onboards coding agents on this machine: skills and MCP configuration.
AgentSetup#Agent onboarding for this machine's user.
Returned by Cua.agent_setup.
| Method | Description |
|---|---|
configure_mcp | Configures the MCP server (default: cua mcp, cua resolved on PATH) for agents. |
install_skills | Installs skills (empty: all bundled) for agents. |
remove | Removes what cua added for agents (skills and/or MCP). |
select | Resolves all (installed agents), none or claude,codex to ids. |
set_onboarding_declined | Saves or clears the "never" answer (~/.cua/config). |
setup_cua_driver | Background computer-use for agents: the bundled cua-driver skill (skills) and the cua-driver mcp server (mcp), launching command (default: the installed cua-driver). |
update | Refreshes installed cua skills and re-points managed MCP entries. |
| Accessor | Returns | Description |
|---|---|---|
detect() | Vec<AgentInfo> | Every supported agent, installed or not (read-only). |
onboarding_declined() | bool | Whether the user said "never" to agent onboarding. |
skills() | Vec<BundledSkill> | The skills bundled with this SDK. |
status() | Vec<AgentInfo> | Same as detect, named for status displays. |
AgentSetup.configure_mcp#Configures the MCP server (default: cua mcp, cua resolved on
PATH) for agents.
async def configure_mcp(self, agents: List[str], server: Optional[AgentMcpServer]) -> List[AgentSetupOutcome]| Parameter | Type | Default |
|---|---|---|
agents | Vec<String> | required |
server | Option<AgentMcpServer> | required |
Returns Vec<AgentSetupOutcome> · Async · Raises CuaError
AgentSetup.install_skills#Installs skills (empty: all bundled) for agents. Folders cua did
not write are skipped unless force.
async def install_skills(self, agents: List[str], skills: List[str], force: bool) -> List[AgentSetupOutcome]| Parameter | Type | Default |
|---|---|---|
agents | Vec<String> | required |
skills | Vec<String> | required |
force | bool | required |
Returns Vec<AgentSetupOutcome> · Async · Raises CuaError
AgentSetup.remove#Removes what cua added for agents (skills and/or MCP).
async def remove(self, agents: List[str], skills: bool, mcp: bool) -> List[AgentSetupOutcome]| Parameter | Type | Default |
|---|---|---|
agents | Vec<String> | required |
skills | bool | required |
mcp | bool | required |
Returns Vec<AgentSetupOutcome> · Async · Raises CuaError
AgentSetup.select#Resolves all (installed agents), none or claude,codex to ids.
def select(self, selection: str) -> List[str]| Parameter | Type | Default |
|---|---|---|
selection | String | required |
Returns Vec<String> · Raises CuaError
AgentSetup.set_onboarding_declined#Saves or clears the "never" answer (~/.cua/config).
def set_onboarding_declined(self, declined: bool) -> None| Parameter | Type | Default |
|---|---|---|
declined | bool | required |
Raises CuaError
AgentSetup.setup_cua_driver#Background computer-use for agents: the bundled cua-driver skill
(skills) and the cua-driver mcp server (mcp), launching
command (default: the installed cua-driver). The same step as
cua agents setup --cua-driver and the installers' cua-driver item.
async def setup_cua_driver(self, agents: List[str], command: Optional[str], skills: bool, mcp: bool) -> List[AgentSetupOutcome]| Parameter | Type | Default |
|---|---|---|
agents | Vec<String> | required |
command | Option<String> | required |
skills | bool | required |
mcp | bool | required |
Returns Vec<AgentSetupOutcome> · Async · Raises CuaError
AgentSetup.update#Refreshes installed cua skills and re-points managed MCP entries.
async def update(self, server: Optional[AgentMcpServer]) -> List[AgentSetupOutcome]| Parameter | Type | Default |
|---|---|---|
server | Option<AgentMcpServer> | required |
Returns Vec<AgentSetupOutcome> · Async · Raises CuaError
AgentInfo record#One AI coding agent and what cua configured for it.
Returned by AgentSetup.detect, AgentSetup.status.
| Field | Type | Default | Description |
|---|---|---|---|
id | String | Registry id (claude-code, codex, cursor, ...). | |
name | String | Display name. | |
installed | bool | Whether it looks installed. | |
evidence | Vec<String> | What gave it away (bin:<path>, path:<dir>, app:<bundle>). | |
skills_dir / skillsDir | Option<String> | User skills directory, when the agent supports Agent Skills. | |
mcp_config / mcpConfig | Option<String> | User MCP config file, when the agent supports MCP. | |
mcp_format / mcpFormat | Option<String> | json, toml or yaml. | |
cua_configured / cuaConfigured | bool | A cua MCP server launching a cua binary is configured. | |
cua_managed / cuaManaged | bool | That entry is the one cua wrote. | |
cua_driver_configured / cuaDriverConfigured | bool | A cua-driver MCP server (background computer-use) is configured. | |
skills_installed / skillsInstalled | Vec<String> | Bundled skills present in the skills directory. | |
skills_outdated / skillsOutdated | Vec<String> | Installed bundled skills that differ from this SDK's copy. | |
error | Option<String> | Problem reading the MCP config (for example a malformed file). | |
unverified | Option<String> | What could not be verified from the agent's official docs. |
AgentMcpServer record#The MCP server to register.
| Field | Type | Default | Description |
|---|---|---|---|
name | String | "cua" | Server name (cua). |
command | String | Launch command (an absolute cua path is best: GUI agents often lack the shell PATH). | |
args | Vec<String> | Arguments (["mcp"]). | |
env | HashMap<String, String> | Extra environment. |
AgentSetupOutcome record#One target's outcome.
Returned by AgentSetup.configure_mcp, AgentSetup.install_skills, AgentSetup.remove, AgentSetup.setup_cua_driver, AgentSetup.update.
| Field | Type | Default | Description |
|---|---|---|---|
agents | Vec<String> | Agents served by this target. | |
target | AgentSetupTarget | Kind. | |
item | String | Skill or server name. | |
path | String | Skill folder or config file. | |
change | AgentSetupChange | Result. | |
detail | String | Explanation. | |
backup | Option<String> | Backup taken before this write. |
BundledSkill record#A skill bundled with the SDK.
Returned by AgentSetup.skills.
| Field | Type | Default | Description |
|---|---|---|---|
name | String | Name. | |
description | String | Description. | |
version | String | Version. | |
files | u32 | Number of files. |
AgentSetupChange enum#What happened to one target.
AgentSetupChange.CREATED
AgentSetupChange.UPDATED
AgentSetupChange.UNCHANGED
AgentSetupChange.REMOVED
AgentSetupChange.SKIPPED
AgentSetupChange.FAILED| Variant | Description |
|---|---|
Created | Written where nothing was. |
Updated | Replaced or edited. |
Unchanged | Already as wanted. |
Removed | Removed (or the previous entry restored). |
Skipped | Deliberately left alone (see detail). |
Failed | Failed (see detail); the target was left untouched. |
AgentSetupTarget enum#What an operation touched.
AgentSetupTarget.SKILL
AgentSetupTarget.MCP| Variant | Description |
|---|---|
Skill | A skill folder. |
Mcp | An MCP config entry. |