0.1.0 • Published 5 months ago
@astrasyncai/sdk v0.1.0
AstraSync SDK
Universal TypeScript/Node.js SDK for registering AI agents with AstraSync's blockchain-based compliance platform.
Features
- 🚀 Auto-detection for 5 major agent formats (MCP, Letta, ACP, OpenAI, AutoGPT)
- 🔐 Blockchain compliance layer for AI agents
- 📊 Trust score calculation based on agent metadata
- 🛠️ Beautiful CLI with progress indicators
- 📦 Zero configuration - works out of the box
- 🔍 TypeScript support with full type safety
Installation
npm install @astrasyncai/sdkOr install globally for CLI usage:
npm install -g @astrasyncai/sdkQuick Start
Using the SDK
import { AstraSync } from '@astrasyncai/sdk';
const client = new AstraSync({
developerEmail: 'your-email@example.com'
});
// Register any supported agent format
const result = await client.register(agentData);
console.log(`Agent registered: ${result.agentId}`);Using the CLI
# Register an agent from a file
astrasync register agent.json --email your@email.com
# Or with environment variable
export ASTRASYNC_EMAIL=your@email.com
astrasync register agent.json
# Verify an agent exists
astrasync verify TEMP-123456
# Check API health
astrasync healthSupported Agent Formats
The SDK automatically detects and supports:
- MCP (Model Context Protocol) - Anthropic's protocol
- Letta (formerly MemGPT) - .af files and JSON
- ACP (Agent Communication Protocol) - IBM's protocol
- OpenAI Assistants API format
- AutoGPT agent configurations
API Reference
new AstraSync(options)
Create a new AstraSync client.
const client = new AstraSync({
developerEmail: 'developer@example.com',
apiUrl: 'https://api.astrasync.ai' // optional
});client.register(agentData)
Register an agent with auto-format detection.
client.verify(agentId)
Check if an agent ID exists in the system.
client.detect(agentData)
Detect agent format without registering.
client.health()
Check API health status.
Examples
See the examples/ directory for complete examples.
Development
# Clone the repository
git clone https://github.com/AstraSyncAI/astrasync-node-sdk
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm testLicense
MIT © AstraSync AI
0.1.0
5 months ago