API Reference
Complete API documentation for Project X SDK.
Authentication
All API requests require authentication using an API key. Include your API key in theX-API-Key header.
Core Methods
createAgent()
Creates a new agent identity.
const agent = await projectX.createAgent({
name: 'MyAgent',
capabilities: ['read', 'write'],
metadata: { version: '1.0' }
});verifyAgent()
Verifies an agent's identity and returns its current reputation score.
const verification = await projectX.verifyAgent(agentId); console.log(verification.reputationScore);
checkPermission()
Checks if an agent has permission to perform a specific action.
const allowed = await projectX.checkPermission( agentId, 'resource:write' );
Error Handling
The SDK throws typed errors that you can catch and handle appropriately in your application.