crewai - 💡(How to fix) Fix Proposal: MAI-1 tool resolver for structured agent tool discovery

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

{
  "aid": "pypi-requests",
  "logic":  { "input_schema": {"type": "url"}, "output_schema": {"type": "json"} },
  "trust":  { "reliability_score": 0.99, "latency_ms": 85 },
  "action": { "install_cmd": "pip install requests" }
}

---

from crewai import Agent, Task, Crew
from crewai.tools.mai1_resolver import MAI1Resolver

tools = MAI1Resolver.search("web scraping")   # returns List[Tool]
agent = Agent(role="Researcher", tools=tools)
RAW_BUFFERClick to expand / collapse

What this proposes

A MAI1Resolver utility that lets CrewAI agents resolve tools from a MAI-1 contract registry rather than constructing them manually.

MAI-1 is a minimal JSON contract describing a tool's interface, reliability, and installation:

{
  "aid": "pypi-requests",
  "logic":  { "input_schema": {"type": "url"}, "output_schema": {"type": "json"} },
  "trust":  { "reliability_score": 0.99, "latency_ms": 85 },
  "action": { "install_cmd": "pip install requests" }
}

Proposed usage

from crewai import Agent, Task, Crew
from crewai.tools.mai1_resolver import MAI1Resolver

tools = MAI1Resolver.search("web scraping")   # returns List[Tool]
agent = Agent(role="Researcher", tools=tools)

The resolver fetches contracts from aiaam.xyz, a public registry of pre-compiled contracts for common libraries.

Why it might be useful

  • Agents can discover and load tools dynamically without hard-coding tool definitions
  • Contracts expose reliability scores and latency so agents can choose tools by quality
  • No changes to existing CrewAI APIs — purely additive

Questions before writing code

  • Is dynamic tool discovery from an external registry something CrewAI wants to support?
  • Would this fit inside crewai/tools/ or better as an optional add-on package?
  • Any concerns about the dependency on an external service?

Happy to discuss before writing any code. Feel free to close if it doesn't align with the roadmap.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING