Integration Guide

SDK installation, Monitor vs Proxy modes, multi-provider support, CI/CD integration, MCP Server, API versioning, and best practices.

SDK Installation

AgentAIShield provides official SDKs for Node.js and Python with identical feature sets.

Node.js: npm install @agentaishield/sdk

Python: pip install agentaishield

Python Quick Start

from agentaishield import AgentAIShield

# Initialize the client
aais = AgentAIShield(api_key='aais_...')

# Monitor mode (fire-and-forget)
aais.monitor(
    agent_id='chatbot-v1',
    messages=[{'role': 'user', 'content': 'Hello!'}],
    response={'content': 'Hi there!'}
)

# Proxy mode (inline scanning)
response = aais.proxy.chat.completions.create(
    agent_id='chatbot-v1',
    model='gpt-4',
    messages=[{'role': 'user', 'content': 'Hello!'}]
)

Node.js Quick Start

const { AgentAIShield } = require('@agentaishield/sdk');

// Initialize the client
const aais = new AgentAIShield({ apiKey: 'aais_...' });

// Monitor mode (fire-and-forget)
await aais.monitor({
  agentId: 'chatbot-v1',
  messages: [{ role: 'user', content: 'Hello!' }],
  response: { content: 'Hi there!' }
});

// Proxy mode (inline scanning)
const response = await aais.proxy.chat.completions.create({
  agentId: 'chatbot-v1',
  model: 'gpt-4',
  messages: [{ role: 'user', content: 'Hello!' }]
});

Dual Authentication

AgentAIShield supports two authentication methods:

All trust verification and TrustShield endpoints accept BOTH authentication methods, making it seamless to use features from the dashboard without creating an API key first.

Multi-Provider Support

OpenAI, Anthropic, Google (Gemini), Mistral, Cohere, Azure OpenAI. Unified interface across all providers.

CI/CD Integration

GitHub Actions, GitLab CI, CircleCI. Run security scans in your pipeline before deployment.

← Back to Training Hub

Last verified: March 2026 · Report an issue