An extension of fabricatio
Project description
fabricatio-capable
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 fromfabricatio-judge.UseTool— provides access to the agent'sToolBoxset 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
Override the default template via configuration:
from fabricatio_capable.config import capable_config
# capable_config.capable_template is "built-in/capable" by default
# Register a custom template under a different name and set it:
# capable_config = CapableConfig(capable_template="my_custom_capable")
Dependencies
fabricatio-core— Core interfaces, briefing model, template managerfabricatio-tool—UseToolcapability andToolBoxmodelfabricatio-judge—EvidentlyJudgeandJudgeMent
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_capable-0.1.5-py3-none-any.whl.
File metadata
- Download URL: fabricatio_capable-0.1.5-py3-none-any.whl
- Upload date:
- Size: 7.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 |
e5ed135e42e540bd0560a2e08ac21c7e4e7f6ab60c4511a7c5319ff32510bbfe
|
|
| MD5 |
bfe9a01f7e0101ef845ff8c6ebce0d06
|
|
| BLAKE2b-256 |
f98e5979b06805d08322b747f8b10cca83506c24aea8eb8c49e6ebbf5eb683f2
|