# `Nous.Plugins.TeamTools`
[🔗](https://github.com/nyo16/nous/blob/v0.17.1/lib/nous/plugins/team_tools.ex#L1)

Plugin that provides team communication and coordination tools for agents.

When an agent is part of a team, this plugin adds tools for peer messaging,
broadcasting, sharing discoveries, listing team members, and claiming file
regions for editing.

## Capabilities

- Direct messaging between team agents
- Team-wide broadcasts
- Shared discovery board
- File region claiming to prevent edit conflicts
- Team member listing

## Usage

    agent = Agent.new("openai:gpt-4",
      plugins: [Nous.Plugins.TeamTools],
      deps: %{
        team_id: "team_1",
        agent_name: "alice",
        shared_state_pid: shared_state_pid
      }
    )

## Configuration

The plugin reads the following keys from `ctx.deps`:

- `:team_id` — the team identifier (required)
- `:agent_name` — this agent's name in the team (required)
- `:shared_state_pid` — pid of the team's SharedState process
- `:team_coordinator_pid` — pid of the team's Coordinator process

## Tools Provided

| Tool | Description |
|------|-------------|
| `peer_message` | Send a direct message to a named agent |
| `broadcast_message` | Broadcast a message to all team agents |
| `share_discovery` | Store a finding in SharedState and broadcast |
| `list_team` | List team members and their status |
| `claim_region` | Claim file lines before editing |

## PubSub Events

- `{:peer_message, from, to, content}` — sent on agent's direct topic
- `{:team_broadcast, from, content}` — sent on team-wide topic
- `{:discovery, from, discovery}` — sent on team-wide topic

---

*Consult [api-reference.md](api-reference.md) for complete listing*
