TrendsAGITools exports the same twelve tool definitions for OpenAI Chat Completions, the OpenAI Responses API, Anthropic tool use and LangChain, and executes the model's tool calls for you. This page lists the required credentials, setup example, mapped endpoints, and production notes.
Base URL
https://staging-api.trendsagi.com111
Routes
18
Guides
3
Languages
One tool contract for every agent framework
TrendsAGITools exports the same twelve tool definitions for OpenAI Chat Completions, the OpenAI Responses API, Anthropic tool use and LangChain, and executes the model's tool calls for you.
Install
pip install trendsagi openai # or anthropic / langchain-coreRequired credentials
import json, os
from openai import OpenAI
from trendsagi import TrendsAGIClient, TrendsAGITools
tools = TrendsAGITools(TrendsAGIClient(api_key=os.environ["TRENDSAGI_API_KEY"]))
openai = OpenAI()
messages = [{"role": "user", "content": "Find a fast-rising Technology trend and suggest a campaign angle."}]
while True:
reply = openai.chat.completions.create(model="gpt-5-mini", messages=messages, tools=tools.openai())
message = reply.choices[0].message
messages.append(message)
if not message.tool_calls:
print(message.content)
break
for call in message.tool_calls:
result = tools.call(call.function.name, call.function.arguments)
messages.append({"role": "tool", "tool_call_id": call.id, "content": json.dumps(result)})
# Claude: tools.anthropic() Responses API: tools.openai_responses() LangChain: tools.langchain()# Save as quickstart.py
python quickstart.py1. Install
Add SDK/dependency for this integration path.
2. Authenticate
Set API key and any provider-specific credentials.
3. Map Endpoints
Use mapped endpoints below to build deterministic flow.
4. Harden
Add rate-limit backoff, idempotency, and safety gates.
Endpoint Mapping
Each integration is mapped to specific API endpoints so teams can compose deterministic workflows.
Production Notes