Skip to main content

fabricatio-capable

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

Capability assessment mixin for Fabricatio agents — determines whether a request can be fulfilled given available tools and context.


Installation

pip install fabricatio[capable]
# or
uv pip install fabricatio[capable]

For the full Fabricatio suite:

pip install fabricatio[full]

Overview

fabricatio-capable provides the Capable mixin class, which equips an agent with the ability to assess whether a given task is within its capabilities. It answers questions like: "given my current toolboxes and context, can I handle this request?"

The mixin composes three capabilities into one method:

  • WithBriefing — supplies agent context as a structured briefing.
  • EvidentlyJudge — delegates to the evidence-based judgment engine from fabricatio-judge.
  • UseTool — provides access to the agent's ToolBox set for tool-cognizant evaluation.

The capable() method renders a configurable Jinja2 template with the briefing, request text, and toolbox metadata, then passes it through evidently_judge to produce a JudgeMent — a binary verdict backed by affirmative and denying evidence.


Key Types

Name Location Description
Capable fabricatio_capable.capabilities.capable ABC mixin combining briefing, judgment, and tool-awareness. Exposes the capable() async method.
CapableConfig fabricatio_capable.config Frozen dataclass holding capable_template (default "built-in/capable"). Loaded via fabricatio_core.CONFIG.

Usage

Single Request

from fabricatio_capable.capabilities.capable import Capable
from fabricatio_judge.models.judgement import JudgeMent
from fabricatio_tool.models.tool import ToolBox

class MyAgent(Capable):
    # Capable is an ABC; provide your concrete agent logic here.
    ...

agent = MyAgent()
toolboxes = {ToolBox(name="file_tools"), ToolBox(name="web_tools")}

result: JudgeMent | None = await agent.capable(
    "Read the latest commit and summarize changes",
    toolboxes=toolboxes,
)

if result and result.final_judgement:
    print("Capable — proceeding.")
else:
    print("Not capable. Evidence:", result.evidences if result else "N/A")

Batch Assessment

requests = [
    "Fetch weather data for Tokyo",
    "Train a LoRA on 100GB of images",
]
results = await agent.capable(requests, toolboxes=toolboxes)

for req, judgement in zip(requests, results):
    verdict = judgement.final_judgement if judgement else "undetermined"
    print(f"{req}: {verdict}")

Configuration

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

[ext.capable]
capable_template = "built-in/capable"
Option Type Default Description
capable_template str "built-in/capable" Template for checking whether a capability is capable of fulfilling a request.

Access at runtime: from fabricatio_capable.config import capable_config.

Dependencies

  • fabricatio-core — Core interfaces, briefing model, template manager
  • fabricatio-toolUseTool capability and ToolBox model
  • fabricatio-judgeEvidentlyJudge and JudgeMent

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_capable-0.1.6-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file fabricatio_capable-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: fabricatio_capable-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 7.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_capable-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3e064dd41293ae03424553a1e54679e90bfedfbacdce25b1d9205a8fd6541f98
MD5 f9b46d1c8830466beb63c9b92ef30826
BLAKE2b-256 2bccdc057d2e4868232b14ecf8e1f9bfeb5ce8f2bcda76bc7bff90b0c4c97d47

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.6 This release

1 file

0.1.5

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