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-tool — UseTool capability and ToolBox model
  • fabricatio-judge — EvidentlyJudge and JudgeMent

License

MIT — see LICENSE

Metadata

Release files for fabricatio-capable 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for fabricatio-capable 0.1.6
File Interpreter ABI Platform
fabricatio_capable-0.1.6-py3-none-any.whl Python 3 none any Details

Release files / fabricatio_capable-0.1.6-py3-none-any.whl

Download URL fabricatio_capable-0.1.6-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e064dd41293ae03424553a1e54679e90bfedfbacdce25b1d9205a8fd6541f98
BLAKE2b-256 checksum
How to use checksums
2bccdc057d2e4868232b14ecf8e1f9bfeb5ce8f2bcda76bc7bff90b0c4c97d47
Upload date
Uploaded using Trusted Publishing?
What is 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}
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page