Skip to main content

toolbroker-crewai

CrewAI adapter for ToolBroker.

pip install toolbroker-crewai
from crewai import Agent, Crew, Task
from toolbroker import ToolBroker

broker = ToolBroker()
broker.add_functions([search_orders, issue_refund, check_inventory])
broker.index()

tools, selection = broker.select_for("crewai", "customer wants a refund", k=3)
agent = Agent(role="Support", goal="Help the customer", backstory="...", tools=tools)

CrewAI pulls a large dependency tree. That is precisely why this is a separate package — nothing reaches the ToolBroker core, and installing it affects only you.

Schemas

CrewAI wants args_schema as a pydantic model class, not a JSON Schema dict, so this adapter builds one per tool with toolbroker.schema.model_from_schema. Awkward parameter names are handled: order-id becomes order_id with an alias, and a parameter called schema or class gets mangled and aliased rather than shadowing a pydantic or Python name.

Anything the converter cannot map degrades to a permissive field. A tool the model can still call with loose typing beats one that disappeared because its schema used a construct nobody anticipated.

Remote tools

Tools with no local callable need an invoker, or the adapter refuses rather than emitting one that fails when the agent calls it:

CrewAIAdapter(invoker=lambda tool, kwargs: my_client.call(tool, kwargs))

Metadata

Release files for toolbroker-crewai 0.1.0

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 toolbroker-crewai 0.1.0
File Interpreter ABI Platform
toolbroker_crewai-0.1.0-py3-none-any.whl Python 3 none any Details

Release files / toolbroker_crewai-0.1.0-py3-none-any.whl

Download URL toolbroker_crewai-0.1.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9583ef4ec34921b9f3b3e96b42981c507575d455f13fc76a8aebfc9e0bd491b5
BLAKE2b-256 checksum
How to use checksums
b508fb608b4cd583467760cf065da5057a17e745ef4fc2ffef031e85cc8a53f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

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