Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,23 @@ Extracted from production systems at Juspay and battle-tested at enterprise scal

## What's New (Q1 2026)

| Feature | Version | Description | Guide |
| ----------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| **Memory** | v9.12.0 | Per-user condensed memory that persists across conversations. LLM-powered condensation with S3, Redis, or SQLite backends. | [Memory Guide](docs/features/memory.md) |
| **Context Window Management** | v9.2.0 | 4-stage compaction pipeline with auto-detection, budget gate at 80% usage, per-provider token estimation | [Context Compaction Guide](docs/features/context-compaction.md) |
| **Tool Execution Control** | v9.3.0 | `prepareStep` and `toolChoice` support for per-step tool enforcement in multi-step agentic loops. API-level control over tool calls. | [API Reference](docs/api/type-aliases/GenerateOptions.md#preparestep) |
| **File Processor System** | v9.1.0 | 17+ file type processors with ProcessorRegistry, security sanitization, SVG text injection | [File Processors Guide](docs/features/file-processors.md) |
| **RAG with generate()/stream()** | v9.2.0 | Pass `rag: { files }` to generate/stream for automatic document chunking, embedding, and AI-powered search. 10 chunking strategies, hybrid search, reranking. | [RAG Guide](docs/features/rag.md) |
| **External TracerProvider Support** | v8.43.0 | Integrate NeuroLink with existing OpenTelemetry instrumentation. Prevents duplicate registration conflicts. | [Observability Guide](docs/features/observability.md) |
| **Server Adapters** | v8.43.0 | Multi-framework HTTP server with Hono, Express, Fastify, Koa support. Full CLI for server management with foreground/background modes. | [Server Adapters Guide](docs/guides/server-adapters/index.md) |
| **Title Generation Events** | v8.38.0 | Emit `conversation:titleGenerated` event when conversation title is generated. Supports custom title prompts via `NEUROLINK_TITLE_PROMPT`. | [Conversation Memory Guide](docs/conversation-memory.md) |
| **Video Generation with Veo** | v8.32.0 | Video generation using Veo 3.1 (`veo-3.1`). Realistic video generation with many parameter options | [Video Generation Guide](docs/features/video-generation.md) |
| **Image Generation with Gemini** | v8.31.0 | Native image generation using Gemini 2.0 Flash Experimental (`imagen-3.0-generate-002`). High-quality image synthesis directly from Google AI. | [Image Generation Guide](docs/image-generation-streaming.md) |
| **HTTP/Streamable HTTP Transport** | v8.29.0 | Connect to remote MCP servers via HTTP with authentication headers, automatic retry with exponential backoff, and configurable rate limiting. | [HTTP Transport Guide](docs/mcp-http-transport.md) |
| Feature | Version | Description | Guide |
| ----------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| **External TracerProvider Support** | v8.43.0 | Integrate NeuroLink with existing OpenTelemetry instrumentation. Prevents duplicate registration conflicts. | [Observability Guide](docs/features/observability.md) |
| **Server Adapters** | v8.43.0 | Multi-framework HTTP server with Hono, Express, Fastify, Koa support. Full CLI for server management with foreground/background modes. | [Server Adapters Guide](docs/guides/server-adapters/index.md) |
| **Title Generation Events** | v8.38.0 | Emit `conversation:titleGenerated` event when conversation title is generated. Supports custom title prompts via `NEUROLINK_TITLE_PROMPT`. | [Conversation Memory Guide](docs/conversation-memory.md) |
| **Video Generation with Veo** | v8.32.0 | Video generation using Veo 3.1 (`veo-3.1`). Realistic video generation with many parameter options | [Video Generation Guide](docs/features/video-generation.md) |
| **Image Generation with Gemini** | v8.31.0 | Native image generation using Gemini 2.0 Flash Experimental (`imagen-3.0-generate-002`). High-quality image synthesis directly from Google AI. | [Image Generation Guide](docs/image-generation-streaming.md) |
| **RAG with generate()/stream()** | v9.2.0 | Pass `rag: { files }` to generate/stream for automatic document chunking, embedding, and AI-powered search. 10 chunking strategies, hybrid search, reranking. | [RAG Guide](docs/features/rag.md) |
| **HTTP/Streamable HTTP Transport** | v8.29.0 | Connect to remote MCP servers via HTTP with authentication headers, automatic retry with exponential backoff, and configurable rate limiting. | [HTTP Transport Guide](docs/mcp-http-transport.md) |

- **Memory** – Per-user condensed memory that persists across all conversations. Automatically retrieves and stores memory on each `generate()`/`stream()` call. Supports S3, Redis, and SQLite storage with LLM-powered condensation. → [Memory Guide](docs/features/memory.md)
- **External TracerProvider Support** – Integrate NeuroLink with applications that already have OpenTelemetry instrumentation. Supports auto-detection and manual configuration. → [Observability Guide](docs/features/observability.md)
- **Server Adapters** – Deploy NeuroLink as an HTTP API server with your framework of choice (Hono, Express, Fastify, Koa). Full CLI support with `serve` and `server` commands for foreground/background modes, route management, and OpenAPI generation. → [Server Adapters Guide](docs/guides/server-adapters/index.md)
- **Title Generation Events** – Emit real-time events when conversation titles are auto-generated. Listen to `conversation:titleGenerated` for session tracking. → [Conversation Memory Guide](docs/conversation-memory.md#title-generation-events)
- **Custom Title Prompts** – Customize conversation title generation with `NEUROLINK_TITLE_PROMPT` environment variable. Use `${userMessage}` placeholder for dynamic prompts. → [Conversation Memory Guide](docs/conversation-memory.md#customizing-the-title-prompt)
- **Video Generation** – Transform images into 8-second videos with synchronized audio using Google Veo 3.1 via Vertex AI. Supports 720p/1080p resolutions, portrait/landscape aspect ratios. → [Video Generation Guide](docs/features/video-generation.md)
- **PPT Generation** – Create professional PowerPoint presentations from text prompts with 35 slide types (title, content, charts, timelines, dashboards, composite layouts), 5 themes, and optional AI-generated images. Works with Vertex AI, OpenAI, Anthropic, Google AI, Azure, and Bedrock. → [PPT Generation Guide](docs/features/ppt-generation.md)
- **Image Generation** – Generate images from text prompts using Gemini models via Vertex AI or Google AI Studio. Supports streaming mode with automatic file saving. → [Image Generation Guide](docs/image-generation-streaming.md)
- **RAG with generate()/stream()** – Just pass `rag: { files: ["./docs/guide.md"] }` to `generate()` or `stream()`. NeuroLink auto-chunks, embeds, and creates a search tool the AI can invoke. 10 chunking strategies, hybrid search, 5 reranker types. → [RAG Guide](docs/features/rag.md)
- **HTTP/Streamable HTTP Transport for MCP** – Connect to remote MCP servers via HTTP with authentication headers, retry logic, and rate limiting. → [HTTP Transport Guide](docs/mcp-http-transport.md)
Expand Down
3 changes: 3 additions & 0 deletions docs-site/config/redirects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ const sectionReorganizationRedirects: PluginOptions["redirects"] = [
{ from: "/image-generation", to: "/docs/features/image-generation" },
{ from: "/video-generation", to: "/docs/features/video-generation" },
{ from: "/video", to: "/docs/features/video-generation" },
{ from: "/ppt-generation", to: "/docs/features/ppt-generation" },
{ from: "/ppt", to: "/docs/features/ppt-generation" },
{ from: "/powerpoint", to: "/docs/features/ppt-generation" },

// Enterprise features redirects
{ from: "/hitl", to: "/docs/features/hitl" },
Expand Down
1 change: 1 addition & 0 deletions docs-site/scripts/sync-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,7 @@ const LINK_MAPPINGS: Record<string, string> = {
"auto-evaluation": "/features/auto-evaluation",
interactive: "/demos/interactive",
"video-generation": "/features/video-generation",
"ppt-generation": "/features/ppt-generation",
"conversation-history": "/features/conversation-history",
"mcp-tools-showcase": "/features/mcp-tools-showcase",
"provider-orchestration": "/features/provider-orchestration",
Expand Down
1 change: 1 addition & 0 deletions docs-site/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const sidebars: SidebarsConfig = {
"features/tts",
"features/audio-input",
"features/video-generation",
"features/ppt-generation",
"features/pdf-support",
"features/csv-support",
"features/office-documents",
Expand Down
13 changes: 12 additions & 1 deletion docs/cli-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,25 @@ npx @juspay/neurolink gen "Analyze this problem" --provider google-ai --model ge

**Video Generation Options (Veo 3.1):**

- `--outputMode <mode>` - Output mode: 'text' (default) or 'video'
- `--outputMode <mode>` - Output mode: 'text' (default), 'video', or 'ppt'
- `--image <path>` - Path to input image file for image-based video generation (required for video mode, e.g., ./input.jpg)
- `--videoOutput <path>` - Path to save generated video file (e.g., ./output.mp4)
- `--videoResolution <res>` - Video resolution: '720p' or '1080p' (default: 720p)
- `--videoLength <seconds>` - Video duration: 4, 6, or 8 seconds (default: 6)
- `--videoAspectRatio <ratio>` - Aspect ratio: '9:16' (portrait) or '16:9' (landscape, default: 16:9)
- `--videoAudio <bool>` - Include synchronized audio (default: true)

**PPT Generation Options:**

- `--outputMode ppt` - Set output mode to PPT generation
- `--pptOutput <path>` or `--po <path>` - Path to save generated PPTX file (e.g., ./presentation.pptx)
- `--pptTheme <theme>` - Theme: 'modern', 'corporate', 'creative', 'minimal', or 'dark' (default: AI-selected)
- `--pptAudience <audience>` - Audience: 'business', 'students', 'technical', or 'general' (default: AI-selected)
- `--pptTone <tone>` - Tone: 'professional', 'casual', 'educational', or 'persuasive' (default: AI-selected)
- `--pptPages <number>` or `--pages <number>` - Number of slides to generate (5-50, default: 10)
- `--pptAspectRatio <ratio>` - Aspect ratio: '16:9' (default) or '4:3'
- `--pptNoImages` - Disable AI image generation for slides (AI images are enabled by default)

Comment thread
Tafheem-Ahemad-Juspay marked this conversation as resolved.
**Output Example:**

```
Expand Down
64 changes: 63 additions & 1 deletion docs/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,25 @@ npx @juspay/neurolink gen "Write code" --provider openai

| Flag | Type | Default | Description |
| ---------------------- | ------- | ------- | ------------------------------------------------------------------------- |
| `--outputMode` | string | `text` | Output mode: 'text' or 'video' |
| `--outputMode` | string | `text` | Output mode: 'text', 'video', or 'ppt' |
| `--image` | string | none | Path to an input image to base the generated video on (e.g., ./input.png) |
| `--videoOutput`, `-vo` | string | none | Path to save generated video (e.g., ./output.mp4) |
| `--videoResolution` | string | `720p` | Video resolution: '720p' or '1080p' |
| `--videoLength` | number | `6` | Video duration in seconds: 4, 6, or 8 |
| `--videoAspectRatio` | string | `16:9` | Aspect ratio: '9:16' (portrait) or '16:9' (landscape) |
| `--videoAudio` | boolean | `true` | Include synchronized audio |

### PPT Generation (AI Presentations)

- `--outputMode` (string, default: `text`) — Output mode: `text`, `video`, or `ppt`
- `--pptPages`, `--pages` (number, default: `10`) — Number of slides to generate (5-50)
- `--pptTheme` (string, default: AI-selected) — Theme: `modern`, `corporate`, `creative`, `minimal`, or `dark`
- `--pptAudience` (string, default: AI-selected) — Audience: `business`, `students`, `technical`, or `general`
- `--pptTone` (string, default: AI-selected) — Tone: `professional`, `casual`, `educational`, or `persuasive`
- `--pptNoImages` (boolean, default: `false`) — Disable AI image generation (AI images are enabled by default in CLI)
- `--pptAspectRatio` (string, default: `16:9`) — Aspect ratio: `16:9` or `4:3`
- `--pptOutput`, `--po` (string, default: auto-generated) — Path to save generated presentation

## Usage Examples

### Basic Text Generation
Expand Down Expand Up @@ -309,6 +320,57 @@ npx @juspay/neurolink generate "Vertical scroll animation" \

> **Note:** Video generation requires Vertex AI credentials. See [Video Generation Guide](./features/video-generation.md).

## PPT Generation Examples

Generate AI-powered PowerPoint presentations:

```bash
# Basic PPT generation
npx @juspay/neurolink generate "Introduction to Machine Learning" \
--outputMode ppt \
--pptPages 10 \
--pptOutput ./ml-presentation.pptx

# With theme and audience customization
npx @juspay/neurolink generate "Quarterly Sales Report Q4 2025" \
--provider vertex \
--model gemini-2.5-pro \
--outputMode ppt \
--pptPages 15 \
--pptTheme corporate \
--pptAudience business \
--pptTone professional \
--pptOutput ./q4-report.pptx

# Creative presentation with AI-generated images
npx @juspay/neurolink generate "Future of Space Tourism" \
--outputMode ppt \
--pptPages 12 \
--pptTheme creative \
--pptOutput ./space-tourism.pptx

# Technical documentation with dark theme
npx @juspay/neurolink generate "Kubernetes Architecture Deep Dive" \
--provider anthropic \
--model claude-3-5-sonnet \
--outputMode ppt \
Comment thread
Tafheem-Ahemad-Juspay marked this conversation as resolved.
--pptPages 20 \
--pptTheme dark \
--pptAudience technical \
--pptTone educational \
--pptOutput ./k8s-architecture.pptx

# Disable AI image generation
npx @juspay/neurolink generate "Company Brand Guidelines" \
--outputMode ppt \
--pptPages 8 \
--pptTheme minimal \
--pptNoImages \
--pptOutput ./brand-guidelines.pptx
```

> **Note:** PPT generation works with multiple AI providers. See [PPT Generation Guide](./features/ppt-generation.md).

## Environment Variables

See the [Environment Variables](./getting-started/environment-variables.md) documentation for complete configuration options.
Expand Down
21 changes: 21 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,27 @@ export GOOGLE_CLOUD_LOCATION="us-central1"

See [Video Generation Guide](features/video-generation.md) for complete setup and usage.

### **PPT Generation (PowerPoint Presentations)**

Generate professional PowerPoint presentations with supported providers (Vertex AI, Google AI, OpenAI, Anthropic, Azure OpenAI, and Bedrock) using compatible text models.

```bash
# Use your existing provider credentials (any of these):
export GOOGLE_VERTEX_PROJECT="your-project-id" # For Vertex AI
export OPENAI_API_KEY="sk-..." # For OpenAI
export ANTHROPIC_API_KEY="sk-ant-..." # For Anthropic
export GOOGLE_AI_API_KEY="..." # For Google AI Studio
```

**Optional: Enable AI Image Generation for Slides**

```bash
# Gemini model for slide image generation (optional)
export VERTEX_IMAGE_MODEL="gemini-2.0-flash-exp"
```

See [PPT Generation Guide](features/ppt-generation.md) for complete setup and usage.

Comment thread
Tafheem-Ahemad-Juspay marked this conversation as resolved.
### **Regional Routing**

Set region-specific variables to control latency and compliance.
Expand Down
74 changes: 74 additions & 0 deletions docs/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ Video generation via Veo 3.1 on Vertex AI may encounter specific error condition
- **VIDEO_QUOTA_EXCEEDED** - Vertex AI quota or rate limit exceeded
- **VIDEO_REGION_UNAVAILABLE** - Veo 3.1 not available in specified region

### PPT Generation Errors

PPT (PowerPoint) generation may encounter specific error conditions:

- **PPT_PLANNING_FAILED** - AI content planning process failed
- **PPT_INVALID_AI_RESPONSE** - AI returned invalid or malformed slide data
- **PPT_IMAGE_GENERATION_FAILED** - AI image generation failed for visual slides
- **PPT_ASSEMBLY_FAILED** - PPTX file assembly failed
- **PPT_FILE_WRITE_FAILED** - Could not write presentation to disk
- **PPT_INVALID_INPUT** - Invalid input parameters (prompt length, page count, theme, etc.)
- **PPT_TIMEOUT** - Presentation generation exceeded timeout

## Error Recovery

### Automatic Retry
Expand Down Expand Up @@ -101,6 +113,68 @@ try {
}
```

### PPT Generation Error Handling

**Example: Handling PPT generation errors**

```typescript
import { NeuroLink, PPTError } from "@juspay/neurolink";

const neurolink = new NeuroLink();

try {
const result = await neurolink.generate({
input: {
text: "Quarterly Business Review",
},
provider: "vertex",
model: "gemini-2.5-pro",
output: {
mode: "ppt",
ppt: {
pages: 15,
theme: "corporate",
audience: "business",
generateAIImages: true,
},
},
timeout: 300, // 5 minutes for PPT generation
});

if (result.ppt) {
console.log(`Presentation saved: ${result.ppt.filePath}`);
console.log(`Total slides: ${result.ppt.totalSlides}`);
}
} catch (error) {
// Use your logger for production: logger.error('PPT generation failed', { code: error.code, error })
if (error.code === "PPT_PLANNING_FAILED") {
console.error(
"Content planning failed. Try a more specific prompt or different model.",
);
} else if (error.code === "PPT_INVALID_AI_RESPONSE") {
console.error(
"AI returned invalid response. Retry with a different model.",
);
} else if (error.code === "PPT_IMAGE_GENERATION_FAILED") {
console.error("Image generation failed. Try with generateAIImages: false.");
} else if (error.code === "PPT_ASSEMBLY_FAILED") {
console.error("PPTX assembly failed. Check file system permissions.");
} else if (error.code === "PPT_FILE_WRITE_FAILED") {
console.error(
"Could not write file. Check disk space and output path permissions.",
);
} else if (error.code === "PPT_INVALID_INPUT") {
console.error(
"Invalid input. Check pages (5-50), theme, and prompt length.",
);
} else if (error.code === "PPT_TIMEOUT") {
console.error("Generation timed out. Reduce pages or disable AI images.");
} else {
console.error("PPT generation failed:", error.message);
}
}
```

**CLI Error Handling:**

```bash
Expand Down
1 change: 1 addition & 0 deletions docs/features/audio-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,7 @@ const neurolink = new NeuroLink({

- [TTS Integration Guide](tts.md) - Complete Text-to-Speech documentation
- [Video Generation](video-generation.md) - AI-powered video with audio
- [PPT Generation](ppt-generation.md) - AI-powered PowerPoint presentations

**Multimodal Capabilities:**

Expand Down
Loading
Loading