🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

agentlux

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agentlux

Multi-master Leica composition engine with dynamic color science, lens simulation, film grain, and decisive moment selection for autonomous vision agents.

latest
Source
npmnpm
Version
3.0.0
Version published
Maintainers
1
Created
Source

AgentLux

用 Agent 给你的照片注入徕卡德味。

One skill. Only Leica. Six master photographers. Zero compromise.

Agents: Your operational instructions are in SKILL.md. Read that file for the complete step-by-step workflow, trigger conditions, error recovery guide, and code templates. This README is the reference manual.

Philosophy

AgentLux does one thing and does it with absolute conviction: it transforms any photograph into a Leica-grade image through the eyes of the world's greatest 35mm photographers. It does not ask the user what they want. It knows.

  • Only Leica. Every color matrix, every vignette curve, every grain particle is calibrated to real Leica hardware: M10, M9 CCD, M Monochrom, M6 bodies; Summilux, Noctilux, Summicron, Elmarit glass.
  • Only Masters. Bresson's decisive geometry. Alex Webb's layered color. Fan Ho's chiaroscuro. Koudelka's panoramic austerity. Salgado's monumental humanity. Moriyama's raw provocation. The system picks the right eye for your image.
  • Only Opinionated. No sliders. No presets menu. No "which filter do you want?" The Curator Agent analyzes your image and makes every creative decision autonomously.
  • Only Restrained. A great curator knows when NOT to intervene. If your composition is already strong, it stays. If grain doesn't serve the image, it's skipped. Processing is proportional, never mechanical.

Architecture

┌─────────────┐     ┌──────────────────┐     ┌──────────────────┐
│  Input Image │────▶│  Curator Agent   │────▶│  Master Agent    │
│  (or Burst)  │     │  (Pass 1: VLM)   │     │  (Pass 2: VLM)   │
└─────────────┘     │                  │     │                  │
                    │  Selects:        │     │  Computes:       │
                    │  · Master style  │     │  · Crop box      │
                    │  · Color profile │     │  · Composition   │
                    │  · Lens character│     │    rule narrative │
                    │                  │     │                  │
                    │  Assesses:       │     │  OR: preserves   │
                    │  · Composition   │     │  original frame   │
                    │    quality       │     │  if excellent     │
                    │  · Grain needed? │     └────────┬─────────┘
                    │  · Vignette      │              │
                    │    intensity     │              ▼
                    │  · Processing    │  ┌──────────────────────┐
                    │    intensity     │  │  Image Pipeline      │
                    └──────────────────┘  │  (sharp, no AI)      │
                                          │                      │
                                          │  · Crop (if needed)  │
                                          │  · Leica color       │
                                          │    science (always)  │
                                          │  · Vignette          │
                                          │    (if appropriate)  │
                                          │  · Film grain        │
                                          │    (if appropriate)  │
                                          └──────────┬───────────┘
                                                     │
                                                     ▼
                                          ┌──────────────────────┐
                                          │  Output              │
                                          │  · JPEG file or URI  │
                                          │  · presentation text │
                                          │  · processing_applied│
                                          │  · composition_      │
                                          │    assessment        │
                                          └──────────────────────┘

For burst input, a Selector Agent runs before Pass 1 to pick the single strongest frame.

Install

npm install agentlux

Entry point: require('agentlux')agentlux.execute({ ... })

Agent skill instructions: SKILL.md

Quick Start

const agentlux = require('agentlux');

const result = await agentlux.execute({
    image_path: '/tmp/photo.jpg',           // absolute path to input
    output_path: '/tmp/agentlux_out.jpg',   // where to write the output JPEG
    language: 'zh',                          // match your conversation language
    delete_after: true                       // zero-retention: delete input after loading
});

if (result.status === 'success') {
    // result.output_path  → send this file to user
    // result.presentation → show this narrative to user
} else {
    // result.recovery_hint → follow this to fix the error
}

Parameters

ParameterTypeDefaultDescription
image_pathstringAbsolute path to a single input image. Required unless image_paths is used.
image_pathsstring[]Absolute paths for burst mode. Mutually exclusive with image_path.
output_pathstringAbsolute path to write output JPEG. If omitted, output is returned as image_data_uri (base64). Recommended for agent workflows.
languagestring"en"Language for all user-facing text (e.g. "zh", "ja", "fr"). Pass the language the agent is conversing in.
delete_afterbooleantrueDelete original file(s) after loading into memory.

Success Response

FieldTypeDescription
status"success"
presentationstringReady-to-show narrative of all creative decisions. Show this to the user.
output_pathstringPath to output JPEG (only if output_path was provided)
image_data_uristringBase64 JPEG data URI (only if output_path was NOT provided)
master_photographerstringe.g. "Fan Ho"
master_stylestringe.g. "Light & Shadow Geometry"
master_rationalestringWhy this master was chosen
composition_rulestringThe master's compositional explanation
coordinatesobject{x, y, width, height, rule} — the crop applied
color_profilestringe.g. "Leica M Monochrom"
color_rationalestringWhy this color grade
lens_profilestringe.g. "Noctilux-M 50mm f/0.95 ASPH"
lens_rationalestringWhy this lens character
composition_assessmentobject{quality, crop_applied, crop_rationale} — how the existing composition was evaluated. quality: "excellent" / "good" / "fair" / "poor"
processing_appliedobject{cropped, grain_applied, grain_rationale, vignette_level, color_graded} — what processing was actually applied
burst_selectionobject(Burst only) {selected_index, total_images, rationale}
source_file_deletionstring"deleted" / "partial" / "delete_failed" / "disabled"

Error Response

FieldTypeDescription
status"error"
error_codestringMachine-readable error type
messagestringHuman-readable description
recovery_hintstringWhat the agent should do next to resolve the error
detailsobject|nullAdditional context (e.g. HTTP status)

VLM Provider Configuration

AgentLux auto-detects the VLM provider from available API keys. Set at least one:

PriorityProviderAPI KeyDefault Model
1 (highest)CustomAGENTLUX_CUSTOM_BASE_URL + AGENTLUX_CUSTOM_API_KEYconfigurable
2AnthropicANTHROPIC_API_KEYclaude-sonnet-4-20250514
3OpenAIOPENAI_API_KEYgpt-4o
4GoogleGOOGLE_API_KEYgemini-1.5-pro

Override the model for any agent role:

VariableControlsExample
AGENTLUX_CURATOR_MODELCurator Agent (image analysis + style selection)claude-sonnet-4-20250514
AGENTLUX_MASTER_MODELMaster Agent (crop computation)gpt-4o
AGENTLUX_SELECTOR_MODELBurst Selector (decisive moment)defaults to curator model

Model names determine provider routing. claude-* → Anthropic, gpt-* / o1-* / o3-* → OpenAI, gemini-* → Google, anything else → Custom API.

Other Environment Variables

VariableDefaultDescription
AGENTLUX_LANGUAGEenDefault language for user-facing text. Overridden by language parameter per call.
AGENTLUX_MAX_IMAGE_BYTES31457280 (30MB)Maximum input image size
AGENTLUX_MAX_BURST_SIZE20Maximum number of images in burst mode
AGENTLUX_VLM_TIMEOUT_MS15000VLM request timeout
AGENTLUX_VLM_MAX_RETRIES2VLM retry count for transient errors

The Six Masters

KeyPhotographerStyleBest For
bressonHenri Cartier-BressonThe Decisive MomentGeometric tension, street moments, golden ratio
webbAlex WebbComplex Color LayeringDense multi-layer scenes, saturated color
fan_hoFan HoLight & Shadow GeometryDramatic chiaroscuro, lone figures, architecture
koudelkaJosef KoudelkaPanoramic High-ContrastSweeping landscapes, stark geometry, wide frames
salgadoSebastiao SalgadoEpic Human DocumentaryHuman dignity, environmental portraits, monumental
moriyamaDaido MoriyamaProvoke-Era Raw StreetRaw energy, blur, fragments, anti-classical

The Five Color Profiles

KeyProfileCharacter
m10Leica M10 DigitalWarm, micro-contrast punch, slightly desaturated. The modern Leica digital look.
m9_ccdLeica M9 CCDRich reds, warm shadows, filmic saturation. The legendary CCD 德味.
m_monochromLeica M MonochromHigh-contrast B&W with extreme tonal range. Fine sensor grain.
m6_trix400M6 + Kodak Tri-X 400Gritty high-contrast B&W. Heavy film grain. Classic photojournalism.
m6_portra400M6 + Kodak Portra 400Warm pastels, lifted shadows, beautiful skin tones. Fine grain.

License

MIT

Keywords

openclaw

FAQs

Package last updated on 05 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts