@telaro/autogen
v0.1.0
Published
Function-call descriptors for Microsoft AutoGen agents to query Telaro trust scores. Drop-in shim that emits the JSON-Schema function specs AutoGen expects.
Maintainers
Readme
@telaro/autogen
Function-call descriptors for Microsoft AutoGen agents to query Telaro trust scores. Drop-in shim that emits the JSON-Schema function specs AutoGen expects.
Install
npm install @telaro/autogenUsage (Python AutoGen)
The package emits AutoGen-compatible function descriptors. Generate them
once with the TypeScript export, then register with your Python
AssistantAgent / UserProxyAgent:
// schemas.ts — generate at build time, ship the JSON to your Python process
import { autogenFunctionDescriptors } from "@telaro/autogen";
console.log(JSON.stringify(autogenFunctionDescriptors({
apiBase: "https://telaro.xyz",
}), null, 2));# agent.py
from autogen import AssistantAgent
import json, requests
with open("schemas.json") as f:
bonded_fns = json.load(f)
assistant = AssistantAgent(
name="risk_gate",
llm_config={"functions": bonded_fns},
function_map={
"check_policy": lambda pubkey, min_bond, min_score: requests.get(
f"https://telaro.xyz/api/agent/{pubkey}"
).json(),
},
)Why a descriptor pattern (vs full Python SDK)
Most Telaro data is read-only HTTP. Generating JSON-Schema descriptors keeps the adapter language-agnostic — Python AutoGen, JS AutoGen, or future runtimes all share the same schemas.
For agents that need to sign (post a bond, record an action) call our TypeScript SDK from a Node sidecar, or use the Rust SDK directly.
