Skip to content

Connect AirOps to AI Agents: Execute Workflows & Brand Content

Learn how to connect AirOps to AI agents using Truto's tools endpoint to execute async workflows, query memory stores, and sync brand kit data programmatically.

Nachi Raman Nachi Raman · · 9 min read
Connect AirOps to AI Agents: Execute Workflows & Brand Content

You want to connect AirOps to an AI agent so your internal systems can independently trigger published AI apps, update memory stores, execute asynchronous data processing definitions, and retrieve granular brand kit analytics. Here is exactly how to do it using Truto's /tools endpoint and SDK, bypassing the need to manually code dozens of API wrappers or maintain complex state-polling logic for long-running workflows.

Giving a Large Language Model (LLM) read and write access to your AirOps workspace introduces a unique meta-engineering challenge: you are building an AI agent to orchestrate other AI applications. You either spend weeks building a custom integration that handles asynchronous execution polling and nested brand kit schemas, or you use a managed infrastructure layer that handles the boilerplate. If your team uses ChatGPT, check out our guide on connecting AirOps to ChatGPT, or if you are building on Anthropic's models, read our guide on connecting AirOps to Claude. For developers building custom autonomous workflows, you need a programmatic way to fetch these tools and bind them to your agent framework.

This guide breaks down exactly how to fetch AI-ready tools for AirOps, bind them natively to an LLM using LangChain (or any framework like LangGraph, CrewAI, or Vercel AI SDK), and execute complex AI orchestration pipelines. For a deeper look at the architecture behind this approach, refer to our research on architecting AI agents and the SaaS integration bottleneck.

The Engineering Reality of Custom AirOps Connectors

Building AI agents is easy. Connecting them to external APIs that run arbitrary compute workloads is hard. Giving an LLM access to external execution engines sounds simple in a prototype. You write a Node.js function that makes a POST request to /execute and wrap it in an @tool decorator. In production, this approach collapses entirely when the underlying AI app takes ten minutes to run.

If you decide to build a custom AirOps integration yourself, you own the entire API lifecycle. The AirOps API introduces several highly specific integration challenges that break standard LLM tool calling assumptions.

The Synchronous Timeout Trap

AirOps provides standard REST endpoints to execute published apps, but AI tasks - like bulk generating SEO content or parsing massive CSV grids - are computationally expensive. AirOps explicitly enforces a 10-minute maximum runtime for its synchronous execution endpoints (air_ops_executions_execute).

Standard LLM APIs (like OpenAI or Anthropic) and HTTP clients will routinely time out long before 10 minutes have passed. If your agent calls a synchronous execution tool and the connection drops at minute two, the agent registers a failure, even though the AirOps server is still processing the job. To build a resilient agent, you must force the LLM to use the air_ops_executions_execute_async endpoints, teaching it to receive a queued execution UUID and implement a polling loop using the list executions endpoint to check the status. Hand-coding this logic into your agent framework requires maintaining complex internal state across multiple tool calls.

Deeply Nested Brand Kit Schemas

AirOps Brand Kits are not simple key-value pairs. They are deeply nested hierarchical data structures containing topics, tags, personas, citations, and historical AI answers. When an agent needs to retrieve the sentiment for a specific brand theme, it cannot simply query a flat /brand-kit endpoint.

It must first query the brand kit, then fetch the specific sentiment themes, and finally query the highly specific sentiment theme answers endpoint. If you hand-code this, your agent will constantly hallucinate the relational IDs required to chain these requests. The agent needs distinct, narrowly scoped tools for each sub-resource (Prompts, Topics, Citations, Answers) to navigate the relational model accurately.

Transparent Rate Limit Handling

When your agent gets aggressive with parallel polling or mass memory store ingestion, it will hit AirOps API rate limits. Handling this programmatically is critical.

Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream AirOps API returns an HTTP 429 (Too Many Requests), Truto passes that exact error directly to the caller. However, Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) following the IETF specification. The caller (your agent framework or custom backend) is strictly responsible for reading these headers and executing the appropriate retry or backoff logic. Do not expect the infrastructure to magically absorb these 429s - your agent must be engineered to pause execution when ratelimit-remaining hits zero.

AirOps Hero Tools for AI Agents

Truto exposes the entire AirOps API as normalized tools. Rather than dumping the entire proxy schema into your LLM context, you should equip your agent with specific, high-leverage tools. Here are the core hero tools for interacting with AirOps.

Execute App Asynchronously

Tool Name: air_ops_executions_execute_async

This is the safest way for an agent to trigger an AirOps app. It submits the inputs to a specific app_uuid and immediately returns a queued execution record. The agent can then proceed with other tasks without blocking the execution thread.

"Trigger the 'Weekly SEO Report' AirOps app using uuid 'app-1234' with the input parameter 'topic' set to 'Enterprise Integrations'. Do not wait for it to finish right now; just give me the execution ID."

Search Memory Stores

Tool Name: list_all_air_ops_search_memory_stores

This tool allows your agent to perform semantic search queries against AirOps memory stores. It returns matched documents with relevancy scores, content snippets, and metadata, making it perfect for orchestrating multi-step RAG pipelines before generating responses.

"Search the internal documentation memory store (id: mem-987) for any guides related to 'API Rate Limit Handling' and summarize the top three matches."

Ingest Documents into Memory Stores

Tool Name: air_ops_memory_stores_add_document

Agents can dynamically update AirOps knowledge bases. This tool adds raw text documents directly to a memory store, initiating the vectorization and sync progress in the background.

"Take the summary of the meeting notes I just generated and add it as a new document called 'Q3_Planning_Notes' to the memory store with ID 'mem-555'."

Chat with Agent Apps

Tool Name: air_ops_agent_apps_chat

Sometimes your agent needs to defer to a specialized AirOps Agent app. This tool sends a synchronous chat message to a specific AirOps app and waits for the AI-generated result and execution record.

"Send a message to the 'Legal Reviewer' AirOps app asking it to identify any non-standard indemnification clauses in the following text payload."

Audit Brand Kit Prompts

Tool Name: list_all_air_ops_brand_kits_prompts

This tool pulls extensive analytics on prompts associated with a Brand Kit. It returns granular data including prompt volume, mention rates, citation trends, and estimated answers per month.

"List all the prompts for our primary brand kit (id: bk-777) and identify any prompts where the brand mention rate trend is currently negative."

Analyze Sentiment Themes

Tool Name: list_all_air_ops_brand_kits_sentiment_theme_answers

This tool extracts individual AI answers paired with sentiment details for a specific theme. It is highly useful for competitive intelligence agents auditing how LLMs currently perceive a brand's specific feature or pricing model.

"Get the detailed AI answers for the sentiment theme 'Customer Support Quality' in our main brand kit and categorize the overall tone of the results."

To view the complete schema and all available AirOps tools - including endpoints for webhooks, file uploads, grid CSV generation, and detailed analytics dimensions - visit the AirOps integration page.

Workflows in Action

Equipping an agent with these tools allows it to execute complex, autonomous orchestration loops. Here is how an agent navigates real-world AirOps operations.

Scenario 1: Autonomous Knowledge Ingestion and App Execution

An engineering team wants an agent to monitor a Slack channel, summarize technical decisions, ingest those summaries into an AirOps memory store, and trigger a downstream documentation generator.

"Add the technical summary of the 'Auth Migration' project to the Engineering memory store. Once added, execute the 'Docs Compiler' app asynchronously using that memory store as the source."

  1. air_ops_memory_stores_add_document: The agent calls this tool with the memory_store_id and the generated text. AirOps returns the created document ID and sync status.
  2. air_ops_executions_execute_async: The agent immediately triggers the compiler app, passing the new document context via the inputs payload.
  3. Output: The agent replies to the user: "The Auth Migration summary has been ingested. The Docs Compiler app is now running in the background (Execution ID: exec-123)."

Scenario 2: Brand Sentiment Remediation

A marketing operations agent needs to analyze how AI models are answering questions about a new feature and alert the team to negative trends.

"Analyze the recent AI answers for the 'New Pricing Tier' sentiment theme in our brand kit. If the overall sentiment is negative, trigger the 'Competitor Comparison Generator' app to help us write new positioning copy."

  1. list_all_air_ops_brand_kits_sentiment_theme_answers: The agent fetches the recent answers for the specific brand kit and theme ID.
  2. Internal LLM Reasoning: The agent parses the returned text and citations, determining that recent answers highlight the pricing as too expensive.
  3. air_ops_executions_execute_async: Based on its reasoning, the agent calls the execution tool for the competitor comparison app, queuing the job.
  4. Output: The agent reports back: "Recent AI sentiment for the new pricing tier is leaning negative. I have queued the Competitor Comparison app to generate fresh positioning data."

Building Multi-Step Workflows

To implement this in production, you must bind Truto's dynamically generated Proxy API tools to your agent framework. The following example demonstrates how to integrate AirOps tools using LangChain.js. This exact pattern applies regardless of whether you use LangGraph, CrewAI, or the Vercel AI SDK.

By leveraging the TrutoToolManager, you bypass the need to define schemas manually or write REST fetch wrappers. The framework automatically parses the OpenAPI definitions provided by Truto's /tools endpoint.

sequenceDiagram
  participant User as Client App
  participant Agent as Agent Framework<br>(LangChain)
  participant Truto as Truto /tools API
  participant AirOps as AirOps API

  User->>Agent: "Run the content generator async"
  Agent->>Truto: GET /integrated-account/{id}/tools
  Truto-->>Agent: Returns OpenAPI Tool Schemas
  Agent->>Agent: LLM selects air_ops_executions_execute_async
  Agent->>Truto: POST /proxy/executions/async
  Truto->>AirOps: POST /v1/executions
  AirOps-->>Truto: 202 Accepted (Execution ID)
  Truto-->>Agent: JSON Response
  Agent-->>User: "Execution queued successfully"

TypeScript Implementation

Below is a production-ready example of how to fetch AirOps tools, bind them to an Anthropic model via LangChain, and implement a robust execution loop that explicitly handles HTTP 429 rate limit errors based on the standardized IETF headers that Truto passes through.

import { ChatAnthropic } from "@langchain/anthropic";
import { AgentExecutor, createToolCallingAgent } from "langchain/agents";
import { ChatPromptTemplate } from "@langchain/core/prompts";
import { TrutoToolManager } from "@trutohq/langchainjs-toolset";
 
// Initialize the LLM
const llm = new ChatAnthropic({
  modelName: "claude-3-5-sonnet-latest",
  temperature: 0,
});
 
async function runAirOpsAgent(userPrompt: string) {
  try {
    // 1. Initialize the Truto Tool Manager with your AirOps Integrated Account ID
    const trutoManager = new TrutoToolManager({
      trutoApiKey: process.env.TRUTO_API_KEY!,
      integratedAccountId: process.env.AIROPS_ACCOUNT_ID!,
    });
 
    // 2. Fetch all available AirOps tools
    // You can filter by methods if you only want read-only or specific tools
    const tools = await trutoManager.getTools();
    console.log(`Loaded ${tools.length} AirOps tools.`);
 
    // 3. Define the Agent Prompt
    const prompt = ChatPromptTemplate.fromMessages([
      [
        "system",
        "You are an AirOps orchestration agent. You can execute apps, query memory stores, and analyze brand kits. When running apps, always prefer asynchronous execution tools and return the execution ID to the user.",
      ],
      ["human", "{input}"],
      ["placeholder", "{agent_scratchpad}"],
    ]);
 
    // 4. Bind the AirOps tools to the agent
    const agent = createToolCallingAgent({
      llm,
      tools,
      prompt,
    });
 
    const executor = new AgentExecutor({
      agent,
      tools,
      // Return intermediate steps to log the exact AirOps endpoints called
      returnIntermediateSteps: true,
    });
 
    // 5. Execute the Workflow
    console.log("Invoking Agent...");
    const result = await executor.invoke({ input: userPrompt });
    
    console.log("\n=== Agent Output ===\n", result.output);
 
  } catch (error: any) {
    // 6. Explicitly handle HTTP 429 Rate Limits passed through by Truto
    if (error.response && error.response.status === 429) {
      console.error("AirOps Rate Limit Reached.");
      
      // Truto normalizes upstream headers to the IETF specification
      const resetTime = error.response.headers['ratelimit-reset'];
      const limit = error.response.headers['ratelimit-limit'];
      
      console.error(`Rate limit of ${limit} exceeded.`);
      console.error(`Please retry after epoch seconds: ${resetTime}`);
      
      // Implement your application-specific backoff logic here
      // e.g., delay execution and re-queue the agent task
    } else {
      console.error("Workflow failed:", error.message);
    }
  }
}
 
// Example execution
runAirOpsAgent("Find the execution history for the app with uuid 'app-999' and list the statuses.");

This architecture guarantees that your agent operates entirely on real-time data, avoiding the massive engineering overhead of building custom webhook parsers and stateful polling systems. Truto handles the authentication, schema normalization, and API proxying, leaving your agent framework to do what it does best: reason about workflows.

Connecting AirOps to your AI agents via Truto transforms your application from a static chatbot into an active orchestration layer. By relying on programmatic tools rather than manual API wrappers, you eliminate schema drift, secure your authentication flow, and allow your engineering team to focus entirely on building better agentic logic rather than babysitting HTTP requests.

FAQ

How do AI agents handle long-running AirOps executions?
Because LLMs time out quickly, agents should use the `air_ops_executions_execute_async` tool to queue the job in AirOps. The agent receives an execution ID and can periodically check the status without keeping an HTTP connection open.
Does Truto automatically retry AirOps rate limit errors?
No. Truto passes HTTP 429 (Too Many Requests) errors directly to the caller. However, Truto normalizes the upstream headers into standard IETF formats (`ratelimit-reset`, `ratelimit-remaining`), which your agent framework can read to implement custom backoff logic.
Can I filter which AirOps tools the agent has access to?
Yes. When calling the Truto `/tools` endpoint, you can pass query parameters like `methods[0]=read` to restrict the agent to read-only operations, preventing it from executing write or administrative tasks in AirOps.
Which agent frameworks work with Truto's AirOps tools?
Because Truto dynamically serves OpenAPI specifications, it works with any modern framework, including LangChain, LangGraph, CrewAI, and Vercel AI SDK. We also provide a native `TrutoToolManager` for Langchain.js.

More from our Blog