Agents: getting started
This page describes the recommended order of steps for an AI agent (or any terminal-first automation) that needs to start working in Operately.
Should an agent use the web app?#
Section titled “Should an agent use the web app?#”Usually no. Every step below can be done from a terminal, including joining an organization from an invite and getting an API token. Use the web app only for things the CLI cannot do for you, such as completing Google sign-in in a browser or reading the verification email.
The correct order#
Section titled “The correct order#”- Install the CLI.
- Optionally install the Operately skills.
- Join an organization or sign up.
- Get an API token (this happens as part of step 3 or step 5).
- Log in with
operately auth login. - Use the CLI from then on.
1. Install the CLI#
Section titled “1. Install the CLI#”npm install -g @operately/operately-clioperately --versionSee CLI install and update for details.
2. Optionally install skills#
Section titled “2. Optionally install skills#”Skills are an optional guidance layer. They teach compatible agent tools how to work with the Operately CLI and common workflows, but the CLI works without them.
npx skills add https://github.com/operately/skills --skill operately-cliSee CLI skills for more options.
3. Join an organization or sign up#
Section titled “3. Join an organization or sign up#”Pick the path that matches your situation.
You were invited to an organization#
Section titled “You were invited to an organization#”Take the invite token from the invite link and run:
operately auth join --invite-token <token>The CLI signs you in (or creates your account), accepts the invite, creates an API token for you, and saves it to your local profile. You do not need to open the web app or visit the API Tokens page.
To skip prompts, pass the sign-in details as flags, for example --method email-password --email <email> --password <password>. Creating a new account still requires entering the verification code that Operately emails to the address you use, so the agent needs access to that inbox.
You have no account and no invite#
Section titled “You have no account and no invite#”operately auth signupAfter signing up you can create a company or join one with an invite. You can pass --next-step create-company, --next-step join, or --next-step later. Signup also creates and saves an API token. See Sign up and create a company with the CLI.
4. Get an API token without the UI#
Section titled “4. Get an API token without the UI#”You do not have to click through API Tokens in the web app. The CLI creates the token for you:
operately auth joinandoperately auth signupcreate a full-access token and save it to your profile when they finish.operately auth loginwith email and password or an email code creates a token for an account that already exists. Choose the access level with--access-mode read-onlyor--access-mode full-access, and pick the organization with--company-idor--company-name.
operately auth login \ --method email-password \ --email <email> \ --password <password> \ --company-name "<organization name>" \ --access-mode full-access5. Log in with operately auth login#
Section titled “5. Log in with operately auth login#”If a token already exists, for example one provided to the agent by a human through Create an API token, log in with it directly:
operately auth login --token <token>For self-hosted instances, add --base-url https://operately.example.com. See CLI authentication for profiles, environment variables, and the resolution order.
Verify the session:
operately auth whoami6. Use the CLI#
Section titled “6. Use the CLI#”From here on, discover and run commands with the built-in help:
operately helpoperately people get_meSee Use the CLI for the command shape, and the API docs for every endpoint.