Skip to main content

Integrations Overview

ASCEND provides enterprise-grade governance for AI agents through multiple integration patterns. All integrations route through our authorization center for policy evaluation, approval workflows, and compliance audit trails.

Integration Status

AI Agent Frameworks

FrameworkIntegration TypeStatusSource Code
MCP ServerPython ExampleExample Availableascend-ai-sdk
LangChainPython SDKExample Availableascend-ai-sdk
Custom AgentsREST API + SDKExample Availableascend-ai-sdk
Claude CodeDocumentationPlanned-
AutoGPTDocumentationPlanned-

Backend Integration Examples

PatternPurposeStatusPackage
AWS LambdaServerless governanceExample Availableascend-ai-sdk
FastAPI MiddlewareAPI governanceExample Availableascend-ai-sdk
Webhook HandlerEvent-driven workflowsExample Availableascend-ai-sdk

Integration Architecture

┌─────────────────────────────────────────────────────────────────────────┐
│ YOUR AI INFRASTRUCTURE │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ LangChain │ │ MCP │ │ Custom │ │ AWS Lambda │ │
│ │ Agent │ │ Server │ │ Agents │ │ Function │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │ │
│ └────────────────┴────────────────┴────────────────┘ │
│ │ │
│ ┌────────▼────────┐ │
│ │ AscendClient │ │
│ │ Python SDK │ │
│ └────────┬────────┘ │
│ │ │
└───────────────────────────────────┼──────────────────────────────────────┘

┌─────────▼─────────┐
│ ASCEND PLATFORM │
│ • Risk Engine │
│ • Policy Engine │
│ • Workflows │
│ • Audit Logs │
└─────────┬─────────┘

┌─────────────────────┼─────────────────────┐
│ │ │
┌─────────▼─────────┐ ┌────────▼────────┐ ┌─────────▼─────────┐
│ Slack/Teams │ │ Splunk │ │ ServiceNow │
│ (Approvals) │ │ (SIEM) │ │ (Tickets) │
└───────────────────┘ └─────────────────┘ └───────────────────┘

Quick Integration Guide

1. Choose Your Integration Pattern

If you're building...Use this integration
MCP-compatible toolsMCP Server Example
LangChain agentsLangChain Integration
Custom Python agentsPython SDK
Serverless functionsAWS Lambda example
API backendsFastAPI middleware example

2. Install SDK

pip install ascend-ai-sdk

3. Basic Integration Pattern

All integrations follow this pattern:

from ascend import AscendClient
import os

# Initialize client
client = AscendClient(
api_url=os.getenv('ASCEND_API_URL', 'https://pilot.owkai.app'),
api_key=os.getenv('ASCEND_API_KEY')
)

4. Test Connection

client = AscendClient()

# Test connectivity
health = client.test_connection()
print(f"Connection: {health['status']}")

Integration Examples

Example 1: LangChain Agent with Governance

from ascend import AscendClient

# Initialize client
client = AscendClient(
api_key=os.getenv("ASCEND_API_KEY"),
base_url="https://pilot.owkai.app"
)

def governed_database_query(query: str, database: str = "production"):
"""Execute database query with governance"""

# Determine action type
if query.upper().startswith("SELECT"):
action_type = "database_read"
elif query.upper().startswith(("INSERT", "UPDATE")):
action_type = "database_write"
elif query.upper().startswith("DELETE"):
action_type = "database_delete"

# Submit to ASCEND for governance
result = client.execute_action(
action_type=action_type,
description=f"Execute SQL: {query}",
tool_name="postgresql",
target_system=f"{database}-db",
risk_context={
"database": database,
"is_production": database == "production",
}
)

if result.requires_approval:
print(f"⏳ Waiting for approval...")
status = client.wait_for_approval(result.action_id, timeout=300)
print(f"✅ Approved by: {status.reviewed_by}")

# Execute actual query
return execute_query(query)

Example 2: MCP Server with Governance Gateway

async def execute_governed_tool(tool_name: str, arguments: dict):
"""Execute MCP tool with ASCEND governance"""

# Evaluate with ASCEND
evaluation = await governance_client.evaluate_action(
server_id="mcp-enterprise-tools",
namespace="database",
verb="execute",
resource=f"database://{arguments.get('database')}",
parameters=arguments
)

if evaluation["decision"] == "DENY":
return {"error": "Action blocked by governance policy"}

elif evaluation["decision"] == "REQUIRE_APPROVAL":
print(f"⏳ Waiting for approval...")
approval = await governance_client.wait_for_approval(
evaluation["action_id"],
timeout=300
)
if not approval["approved"]:
return {"error": "Action rejected by approver"}

# Execute tool
result = await _execute_tool(tool_name, arguments)
return {"result": result}

Example 3: AWS Lambda with Governance

from ascend.boto3_patch import enable_governance

# Enable governance BEFORE importing boto3
enable_governance(
api_key=os.getenv("ASCEND_API_KEY"),
base_url="https://pilot.owkai.app",
risk_threshold=70,
auto_approve_below=30,
agent_id="aws-lambda-agent"
)

import boto3

def lambda_handler(event, context):
"""All boto3 calls are now governed"""
s3 = boto3.client("s3")

# Low-risk: auto-approved
buckets = s3.list_buckets()

# High-risk: requires approval
s3.delete_bucket(Bucket="production-data")

Integration Best Practices

1. Environment Variables

# .env
ASCEND_API_URL=https://pilot.owkai.app
ASCEND_API_KEY=ascend_admin_your_key_here

2. Consistent Agent IDs

# Good
agent_id = "customer-service-agent-v2"
agent_id = "data-analyst-production"

# Bad
agent_id = "agent1"
agent_id = str(uuid4()) # Random IDs make tracking difficult

3. Rich Risk Context

result = client.execute_action(
action_type="database_delete",
description="Delete old audit logs",
tool_name="postgresql",
risk_context={
"database": "production",
"table": "audit_logs",
"where_clause": "created_at < '2025-01-01'",
"estimated_rows": 10000,
"is_production": True,
"has_backup": True
}
)

4. Error Handling

from ascend import AuthorizationDeniedError, TimeoutError as AscendTimeoutError

try:
result = client.execute_action(...)

if result.requires_approval:
status = client.wait_for_approval(result.action_id, timeout=300)

execute_action()

except AuthorizationDeniedError as e:
logger.error(f"Action rejected: {e.rejection_reason}")
notify_security_team(e)

except AscendTimeoutError:
logger.warning("Approval timeout - action not executed")

Available Endpoints

Core Governance API

POST   /api/v1/actions/submit              # Submit action for evaluation
GET /api/v1/actions/{id}/status # Check approval status
GET /api/v1/actions # List recent actions
GET /api/deployment-info # API version info
GET /health # Health check

MCP Governance API

POST   /mcp/governance/evaluate           # Evaluate MCP action
POST /mcp/servers/register # Register MCP server
GET /mcp/servers # List registered servers
POST /mcp/policies # Create governance policy

Monitoring Integrations

Health Check

response = requests.get(
"https://pilot.owkai.app/health",
headers={"Authorization": f"Bearer {api_key}"}
)
print(response.json()) # {"status": "healthy"}

Recent Actions

response = requests.get(
"https://pilot.owkai.app/api/v1/actions",
headers={"Authorization": f"Bearer {api_key}"}
)
actions = response.json()

Getting Help

  • Integration Issues: Install ascend-ai-sdk and review the included examples
  • API Documentation: See API Reference

Next Steps