ruvector/packages/agentic-synth/docs
Claude eb502bae55
docs: Add comprehensive security and runtime review documentation
Added detailed security audit and runtime testing documentation to ensure
safe installation and usage of @ruvector/agentic-synth package.

Files added:
- tests/manual-install-test.js: Comprehensive installation and runtime tests
- docs/SECURITY_REVIEW.md: Full security audit and review documentation

Key findings:
-  No hardcoded secrets or API keys
-  All credentials from environment variables
-  Comprehensive error handling
-  95.9% test pass rate (257/268)
-  Both ESM and CJS exports working
-  All CLI commands functional
-  Provider configuration properly respected

Package is ready for production use and npm installation.
2025-11-22 17:39:58 +00:00
..
test-reports docs: Add comprehensive final review report and pre-publish automation 2025-11-22 13:19:58 +00:00
ADVANCED_USAGE.md docs: Add comprehensive documentation suite for v0.1.0 2025-11-22 02:17:48 +00:00
API.md feat: Add agentic-synth package with comprehensive SDK and CLI 2025-11-21 22:09:46 +00:00
ARCHITECTURE.md feat: Add agentic-synth package with comprehensive SDK and CLI 2025-11-21 22:09:46 +00:00
ARCHITECTURE_SUMMARY.md feat: Add agentic-synth package with comprehensive SDK and CLI 2025-11-21 22:09:46 +00:00
BENCHMARK_SUMMARY.md fix: Resolve all critical issues for npm publication 2025-11-22 13:38:12 +00:00
BENCHMARKS.md feat: Add agentic-synth package with comprehensive SDK and CLI 2025-11-21 22:09:46 +00:00
CLI_FIX_SUMMARY.md fix: Resolve all critical issues for npm publication 2025-11-22 04:48:48 +00:00
CLI_USAGE.md fix: Resolve all critical issues for npm publication 2025-11-22 04:48:48 +00:00
CODE_QUALITY_SUMMARY.md docs: Add comprehensive code quality improvements summary 2025-11-22 14:13:29 +00:00
CONTRIBUTING.md fix: Resolve all critical issues for npm publication 2025-11-22 13:38:12 +00:00
DEPLOYMENT.md docs: Add comprehensive documentation suite for v0.1.0 2025-11-22 02:17:48 +00:00
DIRECTORY_STRUCTURE.md feat: Add agentic-synth package with comprehensive SDK and CLI 2025-11-21 22:09:46 +00:00
EXAMPLES.md feat: Add agentic-synth package with comprehensive SDK and CLI 2025-11-21 22:09:46 +00:00
FILES_CREATED.md fix: Resolve all critical issues for npm publication 2025-11-22 13:38:12 +00:00
FINAL_REVIEW.md fix: Resolve all critical issues for npm publication 2025-11-22 13:38:12 +00:00
FIXES_SUMMARY.md fix: Resolve all critical issues for npm publication 2025-11-22 13:38:12 +00:00
GITHUB_ISSUE.md feat: Add comprehensive CI/CD pipeline and quality documentation 2025-11-21 22:22:13 +00:00
IMPLEMENTATION.md fix: Resolve all critical issues for npm publication 2025-11-22 13:38:12 +00:00
IMPLEMENTATION_PLAN.md feat: Add agentic-synth package with comprehensive SDK and CLI 2025-11-21 22:09:46 +00:00
INTEGRATION.md feat: Add agentic-synth package with comprehensive SDK and CLI 2025-11-21 22:09:46 +00:00
INTEGRATIONS.md feat: Add agentic-synth package with comprehensive SDK and CLI 2025-11-21 22:09:46 +00:00
MISSION_COMPLETE.md fix: Resolve all critical issues for npm publication 2025-11-22 13:38:12 +00:00
NPM_PUBLISH_CHECKLIST.md fix: Resolve all critical issues for npm publication 2025-11-22 13:38:12 +00:00
OPTIMIZATION_GUIDE.md perf: Add comprehensive benchmark suite and optimization documentation 2025-11-21 22:50:53 +00:00
PERFORMANCE.md feat: Add agentic-synth package with comprehensive SDK and CLI 2025-11-21 22:09:46 +00:00
PERFORMANCE_REPORT.md fix: Resolve all critical issues for npm publication 2025-11-22 13:38:12 +00:00
PRODUCTION_READY_SUMMARY.md docs: Add production ready summary report 2025-11-22 13:42:43 +00:00
QUALITY_REPORT.md fix: Resolve all critical issues for npm publication 2025-11-22 13:38:12 +00:00
README.md feat: Add agentic-synth package with comprehensive SDK and CLI 2025-11-21 22:09:46 +00:00
SECURITY_REVIEW.md docs: Add comprehensive security and runtime review documentation 2025-11-22 17:39:58 +00:00
strict-mode-migration.md fix: Resolve all critical issues for npm publication 2025-11-22 04:48:48 +00:00
TEST_ANALYSIS_REPORT.md docs: Add comprehensive final review report and pre-publish automation 2025-11-22 13:19:58 +00:00
TEST_SUMMARY.md fix: Resolve all critical issues for npm publication 2025-11-22 13:38:12 +00:00
TROUBLESHOOTING.md feat: Add agentic-synth package with comprehensive SDK and CLI 2025-11-21 22:09:46 +00:00
VIDEO_DEMO_SCRIPT.md docs: Add comprehensive documentation suite for v0.1.0 2025-11-22 02:17:48 +00:00

agentic-synth

AI-powered synthetic data generation with Gemini and OpenRouter integration.

Features

  • 🤖 Multi-Provider Support: Gemini and OpenRouter APIs
  • High Performance: Context caching and request optimization
  • 📊 Multiple Data Types: Time-series, events, and structured data
  • 🔄 Streaming Support: Real-time data generation with npx midstreamer
  • 🤝 Automation Ready: Hooks integration with npx agentic-robotics
  • 💾 Optional Vector DB: Integration with ruvector
  • 🎯 Type-Safe: Full TypeScript support

Installation

npm install agentic-synth

Quick Start

As SDK

import { createSynth } from 'agentic-synth';

const synth = createSynth({
  provider: 'gemini',
  apiKey: process.env.GEMINI_API_KEY
});

// Generate time-series data
const result = await synth.generateTimeSeries({
  count: 100,
  interval: '1h',
  metrics: ['temperature', 'humidity'],
  trend: 'up'
});

console.log(result.data);

As CLI

# Generate time-series data
npx agentic-synth generate timeseries --count 100 --output data.json

# Generate events
npx agentic-synth generate events --count 50 --schema events.json

# Generate structured data
npx agentic-synth generate structured --count 20 --format csv

Configuration

Environment Variables

GEMINI_API_KEY=your_gemini_api_key
OPENROUTER_API_KEY=your_openrouter_api_key

Config File (synth.config.json)

{
  "provider": "gemini",
  "model": "gemini-2.0-flash-exp",
  "cacheStrategy": "memory",
  "cacheTTL": 3600,
  "maxRetries": 3,
  "timeout": 30000
}

Data Types

Time-Series

Generate temporal data with trends and seasonality:

const result = await synth.generateTimeSeries({
  count: 100,
  startDate: new Date(),
  interval: '1h',
  metrics: ['cpu', 'memory', 'disk'],
  trend: 'up',
  seasonality: true,
  noise: 0.1
});

Events

Generate event logs with realistic distributions:

const result = await synth.generateEvents({
  count: 1000,
  eventTypes: ['click', 'view', 'purchase'],
  distribution: 'poisson',
  userCount: 50,
  timeRange: {
    start: new Date('2024-01-01'),
    end: new Date('2024-12-31')
  }
});

Structured Data

Generate structured records with custom schemas:

const result = await synth.generateStructured({
  count: 50,
  schema: {
    id: { type: 'string', required: true },
    name: { type: 'string', required: true },
    email: { type: 'string', required: true },
    age: { type: 'number', required: true }
  },
  format: 'json'
});

Advanced Features

Streaming

const synth = createSynth({ streaming: true });

for await (const dataPoint of synth.generateStream('timeseries', {
  count: 1000,
  interval: '1m',
  metrics: ['value']
})) {
  console.log(dataPoint);
}

Batch Generation

const batches = [
  { count: 100, metrics: ['temperature'] },
  { count: 200, metrics: ['humidity'] },
  { count: 150, metrics: ['pressure'] }
];

const results = await synth.generateBatch('timeseries', batches, 3);

Caching

const synth = createSynth({
  cacheStrategy: 'memory',
  cacheTTL: 3600 // 1 hour
});

// First call generates, second call uses cache
const result1 = await synth.generate('timeseries', options);
const result2 = await synth.generate('timeseries', options); // Cached

Model Routing

// Automatic fallback chain
const synth = createSynth({
  provider: 'gemini',
  fallbackChain: ['openrouter']
});

// Or specify model directly
const result = await synth.generate('timeseries', {
  ...options,
  model: 'gemini-1.5-pro'
});

CLI Reference

Commands

# Generate data
agentic-synth generate <type> [options]

# Interactive mode
agentic-synth interactive

# Manage config
agentic-synth config [init|show|set]

# Show examples
agentic-synth examples

Options

-c, --count <number>       Number of records
-o, --output <file>        Output file path
-f, --format <format>      Output format (json, csv)
--provider <provider>      AI provider (gemini, openrouter)
--model <model>           Model name
--schema <file>           Schema file (JSON)
--config <file>           Config file path
--stream                  Enable streaming
--cache                   Enable caching

Integration

With Midstreamer

import { createSynth } from 'agentic-synth';
import { createStreamer } from 'midstreamer';

const synth = createSynth({ streaming: true });
const streamer = createStreamer();

for await (const data of synth.generateStream('timeseries', options)) {
  await streamer.send(data);
}

With Agentic-Robotics

import { createSynth } from 'agentic-synth';
import { createHooks } from 'agentic-robotics';

const synth = createSynth({ automation: true });
const hooks = createHooks();

hooks.on('generate:before', async (options) => {
  console.log('Generating data...', options);
});

hooks.on('generate:after', async (result) => {
  console.log('Generated:', result.metadata);
});

API Reference

See API.md for complete API documentation.

Examples

Check the examples/ directory for more usage examples.

License

MIT