# geni workflow set-type (/cli/resource/workflow/set-type)



```sh
geni workflow set-type <code|agent> [id] [flags]
```

Switches a workflow's execution type. The runtime executes by the configured type, not the files on disk, so after switching you must rewrite the files for the new type and delete the old type's (the response lists what to remove). Load the new type's authoring skill with [`geni skills load <type>-workflow`](/cli/skills/load) for its contract and worked example.

Apps are created with [`create --type app`](/cli/resource/create) and aren't switched with this command.

## Synopsis [#synopsis]

```sh
geni workflow set-type agent          # uses the .geni-resource.json marker
geni workflow set-type code wf_01HX
```

| Arg / Flag      | Notes                                           |
| --------------- | ----------------------------------------------- |
| `<code\|agent>` | The new type.                                   |
| `[id]`          | Workflow id. Omit to use the marker in `--dir`. |
| `--dir <path>`  | Resource directory. Defaults to cwd.            |
| `--json`        | Machine-readable output.                        |

The local `.geni-resource.json` marker is updated to the new type. Rewrite the files, then [`validate`](/cli/resource/validate).
