Skip to main content

Overview

When you sign up for CrewAI AMP, you may belong to multiple organizations — for example, a personal org and one or more team/company orgs. The active organization determines where your tools are published, where deployments are created, and which resources you can access. Managing your active organization is important because actions like crewai tool publish and crewai deploy create target whatever org is currently active in your CLI session.

Authentication and Organizations

When you run crewai login, the CLI:
  1. Authenticates you via a secure device code flow (OAuth2)
  2. Logs you in to the Tool Repository
  3. Sets your active organization to the default organization returned by the server
If you belong to multiple organizations, the default org set after login may not be the one you intend to use. Always verify your active organization before publishing tools or creating deployments.

Logging In

Terminal
crewai login
After running this command:
  • A verification URL and code are displayed in your terminal
  • Your browser opens for you to confirm authentication
  • On success, your active org is automatically set

Checking Your Current Organization

To see which organization is currently active:
Terminal
crewai org current
Example output:
Currently logged in to organization My Company (a1b2c3d4-e5f6-7890-abcd-ef1234567890)
If no organization is set:
You're not currently logged in to any organization.
Use 'crewai org list' to see available organizations.
Use 'crewai org switch <id>' to switch to an organization.

Listing Your Organizations

To see all organizations you belong to:
Terminal
crewai org list
Example output:
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name               ┃ ID                                   ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Personal           │ 11111111-1111-1111-1111-111111111111 │
│ My Company         │ 22222222-2222-2222-2222-222222222222 │
└────────────────────┴──────────────────────────────────────┘

Switching Organizations

To switch your active organization:
Terminal
crewai org switch <organization_id>
For example, to switch to “My Company”:
Terminal
crewai org switch 22222222-2222-2222-2222-222222222222
Output:
Successfully switched to My Company (22222222-2222-2222-2222-222222222222)
The organization ID is the UUID shown in crewai org list.
You must be authenticated (crewai login) before using any crewai org commands.

Practical Example: Publishing Tools to the Right Organization

A common scenario is when you belong to both a personal org and a team org. If you run crewai login and immediately publish a tool, the tool may end up in your personal org rather than your team org. To avoid this:
1

Log in to CrewAI AMP

Terminal
crewai login
2

Check your current organization

Terminal
crewai org current
3

List available organizations (if needed)

Terminal
crewai org list
4

Switch to the correct organization

Terminal
crewai org switch <your-team-org-id>
5

Publish your tool

Terminal
crewai tool publish
Make it a habit to run crewai org current before publishing tools or creating deployments, especially if you belong to multiple organizations.

How Settings Are Stored

Organization settings are stored in ~/.config/crewai/settings.json. The relevant fields are:
  • org_name: Name of the currently active organization
  • org_uuid: UUID of the currently active organization
These fields are managed automatically by crewai login and crewai org switch — you should not edit them manually.
Running crewai login clears your current organization settings before re-authenticating. After login, the active org is set based on the server’s default for your account.

Command Reference

CommandDescription
crewai loginAuthenticate to CrewAI AMP (sets active org to default)
crewai org currentShow the currently active organization
crewai org listList all organizations you belong to
crewai org switch <id>Switch to a specific organization by UUID
crewai logoutLog out and clear organization settings