CrewAI + xLink in 5 Minutes

Add identity-based authentication to your CrewAI agents. Replace API keys with xLink for secure multi-agent collaboration.

+

Installation

Install the CrewAI xLink integration package:

npm install @private.me/crewai-xlink

Quick Start

Create a multi-agent crew with identity-based authentication:

import { CrewAIXLinkAgent } from '@private.me/crewai-xlink';

// Define your crew agents with xLink identity
const researcher = new CrewAIXLinkAgent({
  role: 'researcher',
  goal: 'Gather market intelligence',
  identity: {
    name: 'market-researcher',
    capabilities: ['data-analysis', 'web-search']
  },
  backstory: 'Expert at finding and analyzing market data'
});

const analyst = new CrewAIXLinkAgent({
  role: 'analyst',
  goal: 'Analyze research findings',
  identity: {
    name: 'data-analyst',
    capabilities: ['statistical-analysis', 'reporting']
  },
  backstory: 'Specialist in data interpretation and insights'
});

const writer = new CrewAIXLinkAgent({
  role: 'writer',
  goal: 'Create compelling reports',
  identity: {
    name: 'content-writer',
    capabilities: ['writing', 'summarization']
  },
  backstory: 'Professional technical writer'
});

// Establish secure agent-to-agent connections
await researcher.connect(analyst);
await analyst.connect(writer);

// Execute crew workflow
const crew = {
  agents: [researcher, analyst, writer],
  tasks: [
    { agent: researcher, description: 'Research AI trends' },
    { agent: analyst, description: 'Analyze findings' },
    { agent: writer, description: 'Write executive summary' }
  ]
};

const result = await crew.kickoff({
  topic: 'Enterprise AI Adoption 2026'
});

No API keys required. Each agent authenticates via xLink identity. Credentials never cross process boundaries.

Key Benefits

Identity-Based Auth

Each agent has its own identity and capabilities. No shared API keys across the crew.

Per-Agent Quotas

Enforce rate limits and resource quotas at the agent level, not the API key level.

Audit Trail

Track which agent performed which action. Full observability across multi-agent workflows.

Zero Token Management

No OAuth tokens to refresh. No credential rotation. xLink handles authentication automatically.

Cascading Failure Prevention

One agent failure doesn't cascade to the entire crew. Isolated authentication per agent.

CrewAI Native

Works with standard CrewAI patterns. Drop-in replacement for API key auth.

How It Works

The CrewAIXLinkAgent class extends CrewAI's base Agent with xLink identity:

1. Agent Identity Registration

Each agent registers its identity and capabilities when initialized. No manual credential management.

2. Secure Agent Connections

Agents establish authenticated connections using xLink's threshold sharing protocol. Each connection is cryptographically verified.

3. Capability-Based Access

Agents can only invoke capabilities they're authorized for. The trust registry enforces access policies automatically.

4. Automatic Authentication

All agent-to-agent communication is authenticated transparently. No code changes required in your crew workflows.

Advanced Usage

Dynamic Agent Teams

// Add agents to crew dynamically
const teamLead = new CrewAIXLinkAgent({
  role: 'team-lead',
  identity: { name: 'orchestrator', capabilities: ['delegation'] }
});

// Scale crew based on workload
if (workloadHigh) {
  const specialist = new CrewAIXLinkAgent({
    role: 'specialist',
    identity: { name: 'ml-specialist', capabilities: ['ml-training'] }
  });
  await teamLead.connect(specialist);
  crew.agents.push(specialist);
}

Trust Registry Integration

import { FileTrustRegistry } from '@private.me/xlink';

// Use persistent trust registry across crew instances
const registry = new FileTrustRegistry('./crew-trust-registry.json');

const agent = new CrewAIXLinkAgent({
  role: 'researcher',
  identity: { name: 'researcher-01' },
  trustRegistry: registry  // Share registry across all agents
});

Next Steps