# Building AI Agents powered by MadKudu

<figure><img src="/files/ERiJ6pmH9NnUK4OO88f9" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/BiQuuG7aUZES86bsO1CW" alt=""><figcaption></figcaption></figure>

## 🤖 What is an AI Agent?

An **AI agent** is an automation with AI in it.&#x20;

In practice, this means there is one or more parts of it where an LLM **makes a decision** on its own instead of having only determinist "IF this THEN that" as rules. &#x20;

AI agents introduce a level of **autonomy and reasoning.** They can act on ambiguous instructions (e.g. “find the best contacts to reach out to”) and pulling in data from various systems (like MadKudu) to make decisions.

> Example: an AI agent drafting emails decide on its own what to write in this email. While a non-AI workflow would use a template text with placeholders and the email would look similar for all recipients.

AI agents are not products—they are **custom-built automations**. And like any automation, when something goes wrong, it’s important to trace which part of the system is responsible

## 🧱 The 4 Components of Any AI Agent

To build a working AI agent using MadKudu data, you need **three components**:

### **1. The Orchestration Platform**

This is **where the agent logic lives and gets executed.** It’s the engine that chains steps together.

Example: n8n, Make, Zapier, Dust, custom code running in Cursor ... \
These platforms execute the flow: pulling data, making decisions, sending messages, etc.&#x20;

### **2. The LLM**&#x20;

This is the **“thinking” layer** of your agent.

You can use: OpenAI, Claude, Mistral models, any model you want&#x20;

### **3. The Prompt**

The prompt contains the instructions in plain english that will be interpreted by the LLM&#x20;

Example:&#x20;

* "Find contacts at {company}"
* "Draft an email for {email} using all the information you know from MadKudu"&#x20;

{% hint style="warning" %}
LLMs are powerful but inherently unpredictable. They can hallucinate, misinterpret instructions, or fail entirely when given poorly structured inputs. When building agents, much of the effort goes into **refining prompts** and **selecting the right model** to minimize the risk of misinterpretation and ensure more consistent and reliable outputs.
{% endhint %}

### **4. The Data layer: MadKudu MCP**

MadKudu provides the **data layer**—the context that inform the agent’s decisions.

Through the MadKudu Public API and MCP integration, you can&#x20;

* get information about your accounts and contacts: firmographics, demographics, scores, engagement activities with your website, product, marketing, job history...&#x20;
* search for accounts and contacts&#x20;
* source and enrich net new contacts&#x20;

## 🧪 Example Use Case: Meeting Prep Agent

Here’s how a MadKudu-powered AI agent for meeting prep might be built:

* **Orchestration**: n8n monitors your calendar, detects meetings with prospects.
* **LLM**: GPT-4 summarizes MadKudu data and past emails into a briefing doc.
* **MadKudu**: The MCP provides the account brief, top users, recent activity, and firmographics.

You decide when the agent runs, what it generates, and where it shows up (Notion, Slack, Google Docs…).

{% hint style="success" %}
MadKudu helps power your AI agents by exposing real-time GTM data through secure APIs and the Model Context Protocol (MCP). But we don’t control:

* Which tool you use to orchestrate
* How you write your prompts
* How your model interprets the data

Treat MadKudu as your **intelligent data layer**—not the AI agent itself.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.madkudu.com/madkudu-mcp/building-ai-agents-powered-by-madkudu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
