> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truthlocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MAIP integrations

> Connect your AI agents to the tools and platforms your team already uses.

# MAIP integrations

The Machine Agent Identity Protocol (MAIP) ships with integrations that bring agent identity, receipts, and trust scoring into your existing workflows. Each integration generates cryptographic receipts automatically, so every action has a verifiable audit trail.

<Note>
  **Prerequisites:** You need a Truthlocks account with an API key and at least one registered agent. See the [machine identity guide](/guides/machine-identity) to register your first agent.
</Note>

<Tip>
  Browse and filter all available integrations on the [Integrations Hub](https://truthlocks.com/resources/integrations). You can search by category, framework, or platform to find the right connector for your stack.
</Tip>

## Developer tools

### VS Code extension

A sidebar panel for browsing receipts, generating receipts from your editor, and viewing trust data. Install it from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=truthlocks.maip-vscode).

**What it does:**

* Browse and search MAIP receipts from the sidebar
* Generate receipts for code changes directly from the editor
* View agent trust scores and receipt chains

**Installation:**

1. Open VS Code and go to the Extensions view (`Ctrl+Shift+X` / `Cmd+Shift+X`).
2. Search for "Truthlocks MAIP".
3. Click **Install**.

Alternatively, install from the command line:

```bash theme={null}
code --install-extension truthlocks.maip-vscode
```

After installing, open the MAIP sidebar panel and enter your API key and agent ID to connect.

### JetBrains plugin

MAIP integration for IntelliJ, PyCharm, and WebStorm with the same receipt browsing and generation capabilities as the VS Code extension.

### Neovim plugin

A Lua-native plugin for Neovim that integrates MAIP receipts, agent management, and trust scores into your editor. Includes Telescope integration for searching receipts and a statusline component for displaying agent status.

**Setup with lazy.nvim:**

```lua theme={null}
{
  "truthlocks/maip-neovim",
  config = function()
    require("maip").setup({
      api_key = vim.env.TRUTHLOCKS_API_KEY,
      agent_id = "maip-agent:01JXXXX",
    })
  end,
}
```

**Available commands:**

| Command         | Description                                   |
| :-------------- | :-------------------------------------------- |
| `:MaipReceipt`  | Create a receipt for the current buffer       |
| `:MaipReceipts` | List recent receipts in a split               |
| `:MaipTrust`    | Show the trust score for the configured agent |
| `:MaipAgent`    | Display agent status and metadata             |
| `:MaipSearch`   | Open the Telescope receipt picker             |

**Telescope integration:**

Use `:MaipSearch` or call `require("telescope").extensions.maip.receipts()` to open a fuzzy-finder over your receipts. Results show the receipt ID, type, and timestamp. Press `<CR>` to view full details in a split buffer.

**Statusline component:**

Add the agent trust score to your statusline by calling the provider function. For example, with lualine:

```lua theme={null}
require("lualine").setup({
  sections = {
    lualine_x = {
      { require("maip").statusline, cond = require("maip").is_active },
    },
  },
})
```

The component displays the agent ID and current trust score, and updates automatically when you create receipts or refresh trust data.

**Auto-receipt on save:**

Enable automatic receipt generation whenever you write a buffer by setting `auto_receipt = true` in your setup call:

```lua theme={null}
require("maip").setup({
  api_key = vim.env.TRUTHLOCKS_API_KEY,
  agent_id = "maip-agent:01JXXXX",
  auto_receipt = true,
})
```

### MCP Server

A [Model Context Protocol](https://modelcontextprotocol.io/) server that exposes 20 tools, 4 resources, and 3 prompts for AI assistants to interact with the MAIP platform. Use this to give your AI coding assistants direct access to agent registration, receipt generation, and trust score queries.

**Example configuration:**

```json theme={null}
{
  "mcpServers": {
    "truthlocks-maip": {
      "command": "truthlocks-mcp",
      "env": {
        "TRUTHLOCKS_API_KEY": "tl_live_your_api_key"
      }
    }
  }
}
```

## Team collaboration

### Slack

Slash commands let your team query receipts, trust scores, and agent status directly from Slack. Interactive Block Kit layouts display receipt details, risk summaries, and dashboards inline.

**Available commands:**

| Command                  | Description                                     |
| :----------------------- | :---------------------------------------------- |
| `/maip-receipt <id>`     | Look up a receipt by ID and display its details |
| `/maip-trust <agent_id>` | Show the current trust score for an agent       |
| `/maip-agent <agent_id>` | Display agent status, scopes, and metadata      |
| `/maip-help`             | List all available MAIP commands                |

### Linear

Issue and comment events in Linear automatically create MAIP receipts. You can verify receipts and post trust scores as comments, with bidirectional sync between Linear and the MAIP platform.

### Notion

Automatically creates Receipts, Agents, and Trust Scores databases in your Notion workspace. Syncs receipts incrementally, generates audit report pages, and updates Notion in real time via webhooks.

## CI/CD

### GitHub Action

Automatically generate MAIP receipts for commits, pull requests, releases, CI runs, and build artifacts. Verification results appear as GitHub Check Runs with trust score badges on your PRs.

**Example workflow:**

```yaml theme={null}
name: MAIP receipts
on:
  push:
    branches: [main]
  pull_request:

jobs:
  maip:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: truthlocks/maip-action@v1
        with:
          api-key: ${{ secrets.TRUTHLOCKS_API_KEY }}
          agent-id: ${{ secrets.MAIP_AGENT_ID }}
```

## AI model connectors

Python connectors that generate a MAIP receipt for every AI model call, capturing token counts, cost estimates, and SHA-256 content hashes. Prompts and responses are hashed — not stored — for privacy.

### Supported frameworks

| Framework   | Install                             |
| :---------- | :---------------------------------- |
| LangChain   | `pip install truthlocks-langchain`  |
| LlamaIndex  | `pip install truthlocks-llamaindex` |
| CrewAI      | `pip install truthlocks-crewai`     |
| AutoGen     | `pip install truthlocks-autogen`    |
| OpenAI      | `pip install truthlocks-openai`     |
| Anthropic   | `pip install truthlocks-anthropic`  |
| AWS Bedrock | `pip install truthlocks-bedrock`    |

**Example with LangChain:**

```python theme={null}
from truthlocks_langchain import TruthlocksCallback

callback = TruthlocksCallback(
    api_key="tl_live_your_api_key",
    agent_id="maip-agent:01JXXXX"
)

# Every LLM call now generates a MAIP receipt
chain.invoke({"input": "Summarize this document"}, config={"callbacks": [callback]})
```

## Data and ML pipelines

### Kafka connector

Go middleware that generates MAIP data-flow receipts for Kafka messages. Supports batched flushing and exposes operational metrics for monitoring.

### Event streaming

A multi-backend event streaming gateway that generates MAIP receipts for messages flowing through your data pipelines. Use it when you need receipt-backed audit trails for event-driven architectures.

**Supported backends:**

| Backend         | Description                                               |
| :-------------- | :-------------------------------------------------------- |
| Kafka           | Apache Kafka message receipts with batched flushing       |
| AWS EventBridge | Publish and subscribe to EventBridge events with receipts |
| AWS Kinesis     | Kinesis stream records with receipt generation            |
| NATS            | NATS messaging with receipt-backed delivery               |
| Redis Streams   | Redis Streams pub/sub with automatic receipts             |

Each backend includes built-in deduplication, retry middleware, and operational metrics. Configure the gateway to connect to one or more backends and every message automatically gets a MAIP data-flow receipt.

**Example configuration:**

```python theme={null}
from truthlocks_streaming import StreamingGateway

gateway = StreamingGateway(
    api_key="tl_live_your_api_key",
    agent_id="maip-agent:01JXXXX",
    backends=[
        {
            "type": "kafka",
            "brokers": ["localhost:9092"],
            "topic": "events",
            "batch_size": 100,
        },
        {
            "type": "redis",
            "url": "redis://localhost:6379",
            "stream": "receipts",
        },
    ],
)

# Every message published through the gateway generates a MAIP data-flow receipt
gateway.publish("events", {"action": "user.login", "user_id": "u_123"})
```

You can run multiple backends simultaneously. The gateway deduplicates messages across backends using content hashes, retries failed deliveries with exponential backoff, and exposes Prometheus-compatible metrics at `/metrics`.

<Tip>
  If you only need Kafka receipts without the multi-backend gateway, use the standalone [Kafka connector](#kafka-connector) instead.
</Tip>

### MLflow plugin

Python plugin that generates cryptographic receipts for every MLflow model run, providing provenance proof for your ML experiments.

```python theme={null}
import mlflow
from truthlocks_mlflow import TruthlocksPlugin

mlflow.set_tracking_uri("http://localhost:5000")
TruthlocksPlugin.enable(api_key="tl_live_your_api_key", agent_id="maip-agent:01JXXXX")

with mlflow.start_run():
    # Your training code — a receipt is created automatically
    mlflow.log_metric("accuracy", 0.95)
```

### DVC plugin

Python plugin for creating MAIP receipts on DVC data versioning operations. Each `dvc push` or `dvc pull` generates a receipt linking the data version to your agent identity.

### Delta Lake plugin

Python plugin for generating receipts on Delta Lake table operations. Tracks table writes, schema changes, and compaction events with cryptographic provenance.

## Docker

You can run MAIP integration services as Docker containers instead of installing them locally. Official images are available for the CLI, MCP Server, event streaming gateway, and Slack integration.

### Environment variables

Every MAIP container requires at least the two core variables below. Some services accept additional configuration.

| Variable               | Required   | Description                                 |
| :--------------------- | :--------- | :------------------------------------------ |
| `TRUTHLOCKS_API_KEY`   | Yes        | Your Truthlocks API key                     |
| `MAIP_AGENT_ID`        | Yes        | The agent ID to associate with this service |
| `SLACK_BOT_TOKEN`      | Slack only | Bot token for the Slack integration         |
| `SLACK_SIGNING_SECRET` | Slack only | Signing secret for verifying Slack requests |

### Run an individual service

Pull and run any MAIP service image directly. Pass your API key and agent ID as environment variables.

```bash theme={null}
docker run -e TRUTHLOCKS_API_KEY=tl_live_your_api_key \
  -e MAIP_AGENT_ID=maip-agent:01JXXXX \
  truthlocks/maip-mcp-server:latest
```

**Available images:**

| Image                          | Description                                                                                                   |
| :----------------------------- | :------------------------------------------------------------------------------------------------------------ |
| `truthlocks/cli`               | The [Truthlocks CLI](/guides/protect-cli) for minting attestations, managing issuers, and generating receipts |
| `truthlocks/maip-mcp-server`   | The [MCP Server](#mcp-server) exposing 20 tools for AI assistants                                             |
| `truthlocks/maip-event-stream` | The [event streaming gateway](#event-streaming) for receipt-backed data pipelines                             |
| `truthlocks/maip-slack`        | The [Slack integration](#slack) for querying receipts and trust scores from Slack                             |

### Run the full MAIP stack

Use Docker Compose to start all MAIP services together. This is the fastest way to get started with self-hosted MAIP integrations for local development and testing.

Create a `docker-compose.yml` file:

```yaml theme={null}
version: "3.8"
services:
  cli:
    image: truthlocks/cli:latest
    environment:
      TRUTHLOCKS_API_KEY: ${TRUTHLOCKS_API_KEY}
      MAIP_AGENT_ID: ${MAIP_AGENT_ID}

  mcp-server:
    image: truthlocks/maip-mcp-server:latest
    environment:
      TRUTHLOCKS_API_KEY: ${TRUTHLOCKS_API_KEY}
      MAIP_AGENT_ID: ${MAIP_AGENT_ID}

  event-stream:
    image: truthlocks/maip-event-stream:latest
    environment:
      TRUTHLOCKS_API_KEY: ${TRUTHLOCKS_API_KEY}
      MAIP_AGENT_ID: ${MAIP_AGENT_ID}

  slack:
    image: truthlocks/maip-slack:latest
    environment:
      TRUTHLOCKS_API_KEY: ${TRUTHLOCKS_API_KEY}
      MAIP_AGENT_ID: ${MAIP_AGENT_ID}
      SLACK_BOT_TOKEN: ${SLACK_BOT_TOKEN}
      SLACK_SIGNING_SECRET: ${SLACK_SIGNING_SECRET}
```

Then start the stack:

```bash theme={null}
export TRUTHLOCKS_API_KEY=tl_live_your_api_key
export MAIP_AGENT_ID=maip-agent:01JXXXX
docker compose up
```

<Tip>
  You can also run a subset of services by specifying them explicitly — for example, `docker compose up mcp-server event-stream` to start only those two.
</Tip>

## Next steps

<CardGroup cols={2}>
  <Card title="Machine identity" href="/guides/machine-identity" icon="fingerprint">
    Register your first agent and understand the MAIP protocol.
  </Card>

  <Card title="Agent authorization" href="/guides/agent-authorization" icon="key">
    Configure scopes, sessions, and tool access for your agents.
  </Card>

  <Card title="Downloads" href="https://truthlocks.com/resources/downloads" icon="download">
    Get the CLI, SDKs, IDE plugins, and Docker images.
  </Card>

  <Card title="Integrations hub" href="https://truthlocks.com/resources/integrations" icon="grid-2">
    Browse all integrations by category.
  </Card>
</CardGroup>
