An extension of fabricatio
Project description
fabricatio-team
Team coordination for Fabricatio agents. Provides a Team container for assembling agent rosters,
a Cooperate mixin that gives individual roles awareness of their teammates, and optional integration
with fabricatio-digest for task planning across a team.
Requires Python 3.12+.
Installation
pip install fabricatio[team]
# or
uv pip install fabricatio[team]
Key Components
Team
Dataclass that manages a set of RoleName members. Build a team, add or remove members, then call
inform() to notify every Cooperate-capable member of the full roster and dispatch() to activate them all.
from fabricatio_core import Role
from fabricatio_team.models.team import Team
from fabricatio_team.capabilities.team import Cooperate
class Analyst(Cooperate):
...
class Reviewer(Cooperate):
...
alice = Analyst(name="alice")
bob = Reviewer(name="bob")
team = Team()
team.join(alice).join(bob)
team.inform()
team.dispatch()
| Method | Description |
|---|---|
join(teammate) |
Add a Role or RoleName to the team. Raises ValueError on duplicates. |
resign(teammate) |
Remove a Role or RoleName. Raises ValueError if not present. |
inform() |
Push the member roster into every Cooperate-enabled member's team_roster. |
dispatch() |
Call dispatch() on every member (resolves their config and activates them). |
Cooperate
Mixin class (extends ScopedConfig, ABC) that gives a Role team-awareness. Inherit from it
alongside a base Role to let the role track teammates, look them up by name, and collect their
event acceptors for workflow routing.
from fabricatio_core import Role
from fabricatio_team.capabilities.team import Cooperate
class Planner(Role, Cooperate):
async def plan(self, task: str):
for mate in self.team_members:
info = mate.bio
# delegate subtasks based on bio
...
| Attribute / Method | Description |
|---|---|
team_roster: Set[RoleName] | None |
Full set of team member names. Set by inform() or update_team_roster(). |
other_member_roster: Set[RoleName] | None |
Team roster excluding self. Populated when myself is passed to update_team_roster. |
team_members (property) |
Resolved List[Role] — looks up every name in team_roster via the role registry. |
update_team_roster(members, myself=None) |
Replace the roster from an iterable of RoleName; optionally sets other_member_roster. |
update_team_roster_with_roles(roles) |
Convenience — extracts names from Role instances and calls update_team_roster. |
consult_team_member(name) |
Look up a single teammate by name. Returns Role or None with a warning. |
gather_accept_events() |
Collects accept_events from every teammate for event-driven routing. |
CooperativeDigest
Optional mixin (requires fabricatio-digest) that combines Cooperate with the Digest task-planning capability.
When installed, exposes cooperative_digest(requirement, with_self=True) — it delegates to Digest.digest,
automatically passing the team roster as context so the generated task list accounts for all available members.
pip install fabricatio[team,digest]
from fabricatio_digest.capabilities.digest import Digest
from fabricatio_team.capabilities.digest import CooperativeDigest
class TeamPlanner(CooperativeDigest, Digest):
...
planner = TeamPlanner()
tasks = await planner.cooperative_digest("Build the authentication module")
Configuration
TeamConfig is an empty frozen dataclass registered under the "team" key in Fabricatio's configuration
system. Extend it to add team-level settings (e.g. max members, timeout).
from fabricatio_team.config import team_config
Package Structure
fabricatio-team/
├── python/fabricatio_team/
│ ├── models/
│ │ └── team.py - Team dataclass
│ ├── capabilities/
│ │ ├── team.py - Cooperate mixin
│ │ └── digest.py - CooperativeDigest (optional)
│ ├── actions/ - Action stubs (extend here)
│ ├── workflows/ - Workflow stubs (extend here)
│ ├── config.py - TeamConfig
│ └── __init__.py
└── pyproject.toml
Dependencies
fabricatio-core—Role,RoleName,ScopedConfig, configuration system, event routingfabricatio-digest(optional) — enablesCooperativeDigestfor team-aware task planning
License
MIT — see LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fabricatio_team-0.3.1-py3-none-any.whl.
File metadata
- Download URL: fabricatio_team-0.3.1-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6010080e43e18ea273c60764470bb2c4f975e24ce152c3dc88919374716a5727
|
|
| MD5 |
7e80a357a26364e781ea6287238c5764
|
|
| BLAKE2b-256 |
2b319cf6ee0524ab305804487cfe4c656c62d98ac7efe2aa5f762e7c72ff6f1d
|