Skip to main content

fabricatio-team

MIT Python Versions PyPI Version PyPI Downloads PyPI Downloads Build Tool: uv

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

All options below are read through the fabricatio configuration chain (see the Configuration Guide). Set them under the [ext.team] table in fabricatio.toml, equivalently under [tool.fabricatio.ext.team] in pyproject.toml, or via FABRICATIO_EXT__TEAM__<FIELD_UPPER> environment variables.

[ext.team]

The TeamConfig schema currently defines no options and is reserved for future use.

Access at runtime: 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-coreRole, RoleName, ScopedConfig, configuration system, event routing
  • fabricatio-digest (optional) — enables CooperativeDigest for team-aware task planning

License

MIT — see LICENSE

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fabricatio_team-0.3.2-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file fabricatio_team-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: fabricatio_team-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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

Hashes for fabricatio_team-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6831f18d51dcdf2e7128682326a9887e9e9f0109eeb899af890ddce187198253
MD5 e19aa947840dd2dc38215cc2eb2fe1b4
BLAKE2b-256 6bd49fc9d2d62e9bcbb476b72d957b28d9eafa097747109350d93ddec0f0409a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.2 This release

1 file

0.3.1

1 file

0.3.0

1 file

0.2.2

1 file

0.2.1

1 file

0.2.0

1 file

0.1.4

1 file

0.1.3

1 file

0.1.2

1 file

0.1.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page