# Organizations

Organizations let you collaborate with a team while sharing the same resources (agents, knowledge bases, and sources) under one set of permissions and (optionally) centralized billing.

## What are Organizations?

Organizations are designed for teams and shared workspaces. They typically provide:

- **Shared resources**: Agents, knowledge bases, and sources can be created and used by organization members.
- **Member management**: Add or remove teammates, and control who can administer the organization.
- **Role-based access control**: Different roles control who can manage members vs. who can only view and use resources.
- **Usage visibility**: Track credit usage at the organization level.
- **Billing configuration**: Organizations can be configured for shared billing, depending on your plan and settings.

## Core Concepts

### Organizations and Accounts

In Seclai, an organization is the team boundary (members + permissions). Behind the scenes, usage and billing are associated with an account, and an organization may be configured to bill independently.

Practical implications:

- Creating resources “in” an organization makes them available to other members (subject to role).
- Usage reporting and billing can be viewed at the organization level.

### Memberships and Roles

Each organization member has a role (called a membership type). Current roles are:

- **Owner**: Full administrative control over the organization, including managing members and settings. Organizations require at least one owner.
- **Administrator**: Can administer organization resources and manage members (subject to org policies).
- **Viewer**: Read-only access to organization resources.

If you’re unsure which role to assign, start new teammates as **Viewer**, then promote as needed.

### Invitations

Owners and administrators can invite teammates by email. Invitations are tracked (e.g., pending/accepted/revoked) and become an organization membership once accepted.

## Creating an Organization

### Via Account

1. Go to **Account → Organizations**.
2. Click **Create Organization**.
3. Enter a name and (optionally) a description.
4. Create the organization. You will be added as an **Owner**.

## Managing Team Members

In **Account → Organizations → Members**, you can:

- **Invite members** by email.
- **Change a member’s role** (e.g., Viewer → Administrator).
- **Remove a member** from the organization.

Notes:

- You can’t remove or demote the **last remaining Owner**.
- If a user doesn’t have access to an organization, Seclai will treat it as not found (to avoid leaking existence).

## Usage and Billing

Organizations have a dedicated **Usage** view to help teams understand credit spend over time.

Common workflows:

- Review organization usage before adding more sources or enabling reranking.
- Use roles to limit who can create high-cost resources.

## Best Practices

- Keep at least **two Owners** for resilience (e.g., if one owner leaves the company).
- Use **Viewer** by default; grant **Administrator** only to people who need to manage members/resources.
- Create separate organizations for separate environments (e.g., staging vs. production) if you want clear separation of usage and resources.
