In Agent TARS' local usage scenario, the directory that is currently allowed to operate on the File System is called the Workspace.
To avoid affecting your local file system, the default value of Workspace is $pwd/gent-tars-workspace
, which adds a layer of isolation. When you ask Agent TARS what files it can see:
Because it's a temporary directory, it will be empty on first run:
You can specify using the --workspace
parameter through the CLI, such as specifying the current directory:
Assuming the current directory is the UI-TARS-desktop repository, you will see the following output:
Since Agent TARS is typically installed globally, Agent TARS also offers a convenient way to manage Config and File System through a unified Global Workspace in the global installation usage mode.
The Global Workspace will be created in ~/.agent-tars-workspace
to store your Config and project files.
To initialize a new Agent TARS workspace:
This will start an interactive creation process:
We recommend using TypeScript to maintain your configuration, which will give you the additional benefits of auto-completion and type checking:
When you've created a Global Workspace, the specific effects regardless of which directory you run agent-tars
from are:
workspace.workingDirectory
will be set to ~/.agent-tars-workspace
;You can customize the configuration through the configuration file in the Global Workspace:
agent-tars.config.ts
(TypeScript, recommended)agent-tars.config.json
(JSON)agent-tars.config.yaml
(YAML)To open your workspace in Visual Studio Code:
If VS Code is installed, this will launch VS Code and open your workspace folder. If VS Code is not available, the CLI will provide instructions on how to open the workspace manually.
If you don't want to rely on the Global Workspace configuration for a particular use, you can choose to temporarily disable it:
The workspace
command creates a global workspace in ~/.agent-tars-workspace
. While you can only have one global workspace, you can create and use different configurations in different project folders by simply specifying the --workspace.workingDirectory
(shorthand --workspace
) option when running other commands.
Simply edit the configuration file in your workspace directory using any text editor. If you're using TypeScript, make sure to install any necessary dependencies first.
Yes! A workspace is just a folder containing configuration files. You can share it using Git or any other version control system. Just make sure to exclude files containing sensitive information like API keys.
You can always recreate your workspace by running agent-tars workspace --init
again. However, any configurations or files in the workspace will be lost, so make sure to back up important files.
You can:
For continuous integration environments, we recommend creating a specific workspace directory in your project and explicitly specifying it with --workspace.workingDirectory
rather than relying on the global workspace.