SentioCP offers a flexible and powerful framework for developer integration, enabling the design, customization, and expansion of AI agents with ease.
Whether you’re building new agents, connecting external services, or embedding SentioCP’s AI capabilities into your own applications, the framework provides all the necessary tools, APIs, and resources for seamless development and integration.
Key Features
Feature
Description
API Access
RESTful and WebSocket APIs for interacting with AI agents and system components.
SDKs
Official Software Development Kits available for major languages such as Python and JavaScript.
Custom Agent Creation
Templates and utilities for building task-specific or industry-specific agents.
Event Hooks
Define custom event listeners to trigger actions based on agent activity or user interactions.
Context Integration
Seamless access to decentralized context data within your custom applications.
Security Controls
Strong authentication and permission systems to protect user data and regulate agent access.
SDK Installation
Install the official SentioCP SDK from npm:
npm install @sentiocp/sdk
Set your API key in a .env file:
SENTIOCP_API_KEY="YOUR_SENTIOCP_API_KEY_HERE"
Example: Verifying AI Model Output
Below is a complete example of verifying AI outputs using the SentioCP SDK. This ensures transparency, integrity, and trust in AI-generated results.
// Import the SentioCP SDK – your gateway to decentralized AI verification import { SentioCP } from '@sentiocp/sdk';
// Initialize the SentioCP client with your API key
// Make sure SENTIOCP_API_KEY is set in your environment variables for production use.
// Const sci = new SentioCP({ apiKey: process.env.SENTIOCP_API_KEY, environment: 'production'
// Use 'production' for live deployments });
/**
Verifies the output of an AI model using SentioCP's decentralized attestation network.
@param {string} modelId - Identifier of the AI model (e.g., 'gpt-4o', 'custom-predictor').
@param {string} input - The input or prompt sent to the AI model.
@param {string} output - The AI-generated output to verify.
@returns {Promise<object|null>} Verification details if successful, otherwise null.
*/ async function verifyAIModelOutput(modelId, input, output)
{ console.log(\n--- Starting Verification for Model: ${modelId} ---);
console.log('Input:', input); console.log('Output:', output);
try { // Step 1: Create an Attestation console.log('Requesting attestation from SentioCP...');
const attestation = await sci.createAttestation({ modelId, input, output;
options: { includeProof: true, storagePolicy: 'persistent' } });
console.log(`✅ Attestation created! ID: ${attestation.id}`);
// Step 2: Verify the Attestation
console.log('Verifying attestation...');
const verification = await sci.verifyAttestation(attestation.id);
if (verification.isValid) {
console.log('✅ AI Output Verified Successfully!');
console.log(`Verification ID: ${verification.id}`);
return verification;
} else {
console.error('❌ Verification Failed!');
console.error(`Reason: ${verification.reason}`);
return null;
}
} catch (error) { console.error('An error occurred during verification:'); if (error.response) { console.error('API Error Status:', error.response.status); console.error('API Error Data:', error.response.data); } else if (error.request) { console.error('Network Error: No response from SentioCP API.'); } else { console.error('Error Message:', error.message); } throw error; } finally { console.log('--- Verification Complete ---'); } }
// --- Example Usage ---
verifyAIModelOutput( 'gpt-4o', 'What is the capital of France?', 'The capital of France is Paris.' ).then(result => { console.log(result ? 'Factual AI response check passed.' : 'Factual AI response check failed.'); });
verifyAIModelOutput( 'content-moderator-v1', 'Review the following text for hate speech: "I love sunny days!"', 'Classification: Clean. No hate speech detected.' ).then(result => { console.log(result ? 'Content moderation check passed.' : 'Content moderation check failed.'); }).catch(err => { console.error('Content moderation example encountered an error:', err); });