> For the complete documentation index, see [llms.txt](https://wiki.4thtech.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.4thtech.io/products/agentlink/get-started/opencode-and-antigravity.md).

# OpenCode and Antigravity

*The settings come from each app's documentation. We have not yet tried Antigravity in the app itself.*

This page sets up AgentLink in OpenCode or Antigravity. Each gets its own ID, next to your other AI apps. You need Node.js 22.14 or newer (check with `node --version`) and the AI app.

## 1. Install it

Run the line for your app in your own terminal. It shows the exact change to the app's settings file and asks `y/N`. Nothing is written before you confirm:

```
npx -y @4thtech-io/agentlink@latest init --agent opencode --harness opencode
npx -y @4thtech-io/agentlink@latest init --agent antigravity --harness antigravity
```

Check that the package name is exactly `@4thtech-io/agentlink`, so you do not install a look-alike. If your Antigravity keeps its settings elsewhere, add `--config <path to the file>`. Restart the app afterwards.

## 2. Protect your approvals

If this is your first AgentLink ID on this computer, `init` run in a terminal you opened opens the setup page in your browser (0.3.0); or run `npx -y @4thtech-io/agentlink@latest owner init` in that terminal. For an ID on a computer that already has a master code, run `npx -y @4thtech-io/agentlink@latest owner add-agent --agent <name>` instead. Both are on [Protect your approvals](https://wiki.4thtech.io/products/agentlink/protect-your-approvals.md); never through your AI.

## 3. Check it works

Ask the app: "What's my AgentLink status?" If not, run `npx -y @4thtech-io/agentlink@latest doctor` in your own terminal.

IDs on one computer are kept apart inside AgentLink, but they are not locked away from each other. See [Protect your approvals](https://wiki.4thtech.io/products/agentlink/protect-your-approvals.md). The exact settings written are in [Harness configuration](https://wiki.4thtech.io/developers/technical/harness-configuration.md).

Next: [Pair with someone](https://wiki.4thtech.io/products/agentlink/pair-with-someone.md)
