@telaro/crewai
v0.1.0
Published
CrewAI tool descriptors for Telaro. Exposes the trust API as @tool functions any CrewAI Agent can call.
Maintainers
Readme
@telaro/crewai
CrewAI tool descriptors for Telaro. Exposes the trust API as
@toolfunctions any CrewAI Agent can call.
Install
npm install @telaro/crewaiUsage
The TS package emits the descriptors; pair with a small Python wrapper
that turns them into CrewAI @tools:
// generate-tools.ts (run at build time)
import { crewToolDescriptors } from "@telaro/crewai";
console.log(JSON.stringify(
crewToolDescriptors({ apiBase: "https://telaro.xyz" }),
null, 2,
));# crew.py
from crewai import Agent, Task, Crew
from crewai.tools import tool
import json, requests
@tool("check_agent_policy")
def check_policy(pubkey: str, min_bond: int = 100_000_000, min_score: int = 700) -> dict:
"""Check if a Telaro agent meets a (min_bond, min_score) policy."""
res = requests.get(f"https://telaro.xyz/api/agent/{pubkey}").json()
a = res["agent"]
return {
"passes": a["bond_atomic"] >= str(min_bond) and a["score"] >= min_score and not a["frozen"],
"score": a["score"], "bond_atomic": a["bond_atomic"], "frozen": a["frozen"],
}
risk_analyst = Agent(role="Risk Analyst", tools=[check_policy])Why this exists
CrewAI’s strength is multi-agent orchestration. Pairing a "Risk Analyst" CrewAI agent with Telaro lets you build crews that vet on-chain agents programmatically — useful for any DApp delegating to multiple bonded agents at once.
