API Reference / agent / adapters /

crewai.py

CrewAI adapter, TuiML tools as BaseTool subclasses.

python
>>> from tuiml.agent.adapters.crewai import get_tools
>>> from crewai import Agent, Task, Crew
>>>
>>> analyst = Agent(role="Data Scientist", goal="build good models",
...                 tools=get_tools(), backstory="...", verbose=True)

Functions

Func

get_tools

Line 19
get_tools() -> List[Any]

Return every TuiML workflow tool as a CrewAI BaseTool instance.

Returns

list of crewai.tools.BaseTool
One BaseTool instance per workflow tool, each with a Pydantic args schema and a _run that routes to the TuiML executor. Pass directly as Agent(tools=get_tools(), ...).

Raises

ImportError
If crewai is not installed.
python
>>> from tuiml.agent.adapters.crewai import get_tools
>>> tools = get_tools()
>>> [t.name for t in tools][:2]  # doctest: +SKIP
['tuiml_train', 'tuiml_predict']
Func

system_prompt

Line 88
system_prompt() -> str

Return the canonical TuiML system prompt (SKILL.md). Typically passed into Agent(backstory=...) or Crew(system_prompt=...).

Returns

str
The contents of the canonical SKILL.md system prompt.