ace-ai
v1.1.4
Published
ACE SDK for generating synthetic data and ensuring security and compliance with PII and HIPAA regulations. Includes MCP server protection.
Maintainers
Readme
ACE SDK
The ACE SDK is a JavaScript library that provides tools for generating synthetic data and ensuring security and compliance with PII and HIPAA regulations. It also includes specialized protections for MCP (Model Context Protocol) servers.
Real-World Use Case
The ACE SDK was developed to solve critical security challenges in healthcare AI applications. In a real-world scenario, a large healthcare provider, CareConnect, used the ACE SDK to secure their AI-powered patient chatbot "CareBot". The SDK helped them:
- Prevent accidental exposure of credentials and secrets
- Protect against unauthorized access to MCP servers
- Handle PII and HIPAA data safely
- Ensure all patient data remained within the US
- Optimize costs while maintaining robust security
For a detailed walkthrough of this use case, see ACE_SDK_Use_Case.md.
Installation
npm install ace-aiUsage
const ace = require('ace-ai');
// Generate synthetic data
const schema = {
name: 'name',
email: 'email',
age: 'number'
};
const data = ace.synthetic.generate(schema);
console.log(data);
// Security and compliance
const text = 'This is a test';
console.log(ace.security.scanForSecrets(text));
console.log(ace.security.containsPII(text));
console.log(ace.security.containsHIPAA(text));
console.log(ace.security.sanitizeText(text));
// MCP server protection
const request = { data: 'some data' };
console.log(ace.mcp.protectHost(request));
console.log(ace.mcp.validateBeforeLLM(text));
console.log(ace.mcp.ensureUSResidency(text, 'US'));Demo
To see the ACE SDK in action, run the demo script:
node demo.jsThis demo showcases how the ACE SDK protects against security risks in a healthcare AI application, demonstrating all key features.
API
ace.synthetic.generate(schema)
Generates synthetic data based on a schema.
schema(Object): The schema to generate data from.
Returns: Object - The generated synthetic data.
ace.security.scanForSecrets(text)
Scans for secrets in a string.
text(String): The text to scan.
Returns: Boolean - True if secrets are found, false otherwise.
ace.security.containsPII(text)
Checks if a string contains PII.
text(String): The text to check.
Returns: Boolean - True if PII is found, false otherwise.
ace.security.containsHIPAA(text)
Checks if a string contains HIPAA data.
text(String): The text to check.
Returns: Boolean - True if HIPAA data is found, false otherwise.
ace.security.sanitizeText(text)
Sanitizes a string by removing PII and HIPAA data.
text(String): The text to sanitize.
Returns: String - The sanitized text.
ace.mcp.protectHost(request)
Protects the MCP host application by validating incoming requests.
request(Object): The incoming request object.
Returns: Boolean - True if request is safe, false otherwise.
ace.mcp.validateBeforeLLM(data)
Validates data before sending to LLM to prevent PII/HIPAA leakage.
data(String): The data to validate.
Returns: Object - Validation result with sanitized data.
ace.mcp.ensureUSResidency(data, destination)
Ensures HIPAA data doesn't leave the US.
data(String): The data to check.destination(String): The destination country code.
Returns: Boolean - True if data can be sent, false otherwise.
License
MIT
