> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xysq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Team Vaults

> Share memory across your team. Every agent your team uses reads from and writes to the same vault.

Team vaults give every member of your team, and every agent they use, access to the same shared memory. Capture a decision in one session; any team member's agent recalls it in the next.

<Info>
  Personal and team vaults are fully independent. Your personal memories stay yours. Team memories belong to the vault, and any member with read access can surface them, regardless of which agent or session they're using.
</Info>

## Setup

You need:

1. A team created at [app.xysq.ai](https://app.xysq.ai/login) → **Teams**
2. Your `XYSQ_TEAM_ID` (visible in team settings)
3. Your personal `XYSQ_API_KEY` (team vaults use personal keys, not team-specific tokens)

```
XYSQ_API_KEY=xysq_...
XYSQ_TEAM_ID=...
```

## Using a team vault

Call `client.team(team_id)` to get a team-scoped view. It exposes the same `.memory` and `.organise` interfaces as the personal client, and routes every operation to the shared vault.

```python theme={"dark"}
import os
from dotenv import load_dotenv
from xysq import Xysq

load_dotenv()

with Xysq() as client:
    team = client.team(os.environ["XYSQ_TEAM_ID"])

    # Capture to the team vault
    team.memory.capture(
        content="API versioning follows semver. Breaking changes require an RFC.",
        context="Engineering standards alignment — 2026-04-15",
        tags=["api", "standards"],
        significance="high",
    )

    # Surface team context
    memories = team.memory.surface("API versioning policy")
    for m in memories:
        print(m.text)

    # Synthesize from team memory
    result = team.memory.synthesize("What are our engineering standards?")
    print(result.answer)
```

## Capturing external sources to a team

There's no separate knowledge namespace. To file a link, quote, code snippet, or transcript into the team vault, use `team.memory.capture()` with `source` tags. It surfaces alongside everything else the team recalls.

```python theme={"dark"}
team.memory.capture(
    content="Sprint cadence: 2 weeks. Retros every other Friday at 3pm.",
    tags=["source:knowledge", "source_type:quote"],
    metadata={"title": "Team Process - Sprint Cadence"},
    significance="high",
)
```

## Full example: two agents sharing a vault

```python theme={"dark"}
import os
import time
from dotenv import load_dotenv
from xysq import Xysq

load_dotenv()

team_id = os.environ["XYSQ_TEAM_ID"]

with Xysq() as client:
    team = client.team(team_id)

    # Agent 1: capture team decisions
    team.memory.capture(
        content="Team decided to use PostgreSQL for the main database",
        tags=["architecture", "database"],
        significance="high",
    )
    team.memory.capture(
        content="All new services must expose /healthz and /readyz endpoints",
        tags=["api", "standards"],
        significance="high",
    )

    time.sleep(2)  # allow indexing

    # Agent 2: surface and synthesize
    memories = team.memory.surface("architecture and database decisions")
    for m in memories:
        print(m.text)

    synthesis = team.memory.synthesize(
        "What are our team's engineering standards and architecture decisions?"
    )
    print(synthesis.answer)
    print(f"Confidence: {synthesis.confidence}")
```

## Access control

Team access is controlled by role. Your personal API key authenticates you, and your role in the team determines what you can do:

| Role              | Can read | Can write | Can delete | Can manage members |
| ----------------- | -------- | --------- | ---------- | ------------------ |
| `ro` (read-only)  | Yes      | No        | No         | No                 |
| `rw` (read/write) | Yes      | Yes       | No         | No                 |
| `admin`           | Yes      | Yes       | Yes        | Yes                |
| `owner`           | Yes      | Yes       | Yes        | Yes + delete team  |

Manage roles and membership at [app.xysq.ai](https://app.xysq.ai/login) or see the [Teams documentation](/features/teams).

***

## Related

<CardGroup cols={2}>
  <Card title="Teams feature overview" icon="users" href="/features/teams">
    Set up teams, manage roles, and connect agents to your team vault
  </Card>

  <Card title="Memory operations" icon="brain" href="/sdk/memory">
    Full reference for capture, surface, synthesize, and more
  </Card>
</CardGroup>
