# Lumifig > Lumifig (https://lumifig.app) is a web editor for scientific and engineering figures: neural-network architectures, > circuits, process flow diagrams, lab setups, molecules, control loops and more. Every figure stays editable. ## Drawing a figure for a user Option A (best): use the MCP server at https://lumifig.app/mcp (Streamable HTTP, no sign-in). Tools: search_components, list_categories, get_figure_format, create_figure. create_figure returns a link; the user opens it and the figure appears as a new, editable project. Option B: write the JSON format below in one code block. The user pastes it into Lumifig (left bar → IMAGE → "Import from an AI assistant"). Find component ids: GET https://lumifig.app/api/components?q=distillation+column (optional: &category=&limit=20) ## Figure format Lumifig figure format (v1) A figure is a JSON object: { "lumifig": 1, "title": "Short figure title", "direction": "right", // auto-layout flow: "right" (default) or "down" "nodes": [ { "id": "a", "type": "", "label": "Main text", "sublabel": "Second line", "color": "blue", "x": 0, "y": 0, "w": 140, "h": 85 } ], "edges": [ { "from": "a", "to": "b", "label": "optional", "style": "solid|dashed|dotted", "arrow": "forward|none|both|backward" } ], "groups": [ { "label": "Encoder", "nodes": ["a", "b"], "color": "gray" } ] } Rules - Only "nodes" is required. Node ids must be unique; edges refer to node ids. - "type" should be a component id from the Lumifig library (find them with search_components). Plain words also work ("box", "decision", "database", "conv", "attention", "pump") and are matched to the closest component; unknown types become a generic labelled box. - Leave out x/y to let Lumifig lay the figure out (recommended). If you give positions, give them for every node, in pixels, x to the right and y downwards; typical boxes are 140×85. - color: one of blue, purple, teal, orange, yellow, green, red, gray, pink, indigo, cyan, lime, amber, emerald, coral, violet, slate, brown, rose, ruby, magenta, lavender (hex is mapped to the nearest). - Keep labels short (they are drawn inside the component). Use "sublabel" for sizes or details. - Chemical structures: give a node "type": "molecule" and "smiles": "" (e.g. "CC(=O)Oc1ccccc1C(=O)O"); Lumifig draws the 2D structure and uses "label" as the caption under it. Use a "reaction arrow" (type "rx_fwd") between reactants and products for reaction schemes. - Everything stays editable in Lumifig afterwards, so prefer a clean structure over pixel detail. Example: an image-classification pipeline { "lumifig": 1, "title": "ResNet classifier", "direction": "right", "nodes": [ {"id": "in", "type": "box", "label": "Input image", "sublabel": "3×224×224"}, {"id": "stem", "type": "conv", "label": "Conv 7×7, 64", "color": "blue"}, {"id": "res", "type": "ly_residual", "label": "Residual ×16", "color": "blue"}, {"id": "gap", "type": "ly_gap", "label": "Global AvgPool"}, {"id": "fc", "type": "ly_linear", "label": "FC 1000", "color": "orange"}, {"id": "out", "type": "ly_softmax", "label": "Softmax"} ], "edges": [ {"from": "in", "to": "stem"}, {"from": "stem", "to": "res"}, {"from": "res", "to": "gap"}, {"from": "gap", "to": "fc"}, {"from": "fc", "to": "out"} ], "groups": [ {"label": "Backbone", "nodes": ["stem", "res"]} ] } ## Component categories (key: name (count)) - electronics: Electronic Circuits & Logic Gates (83) - shapes: Parametric Polygons & Basic Geometry (50) - flowchart: Flowchart, Process & BPMN (35) - llm: LLM, GenAI & Computer Vision (13) - math: Math, Charts & Hardware (5) - digital: Digital Logic, ICs & Embedded (138) - mcu: MCU & Dev Boards (8) - arrows: Block Arrows & Connectors (14) - bpmn: BPMN 2.0 Business Processes (26) - uml: UML, ER & Software Architecture (22) - cloud: Cloud, DevOps, Network & Security (52) - ai_apps: LLM Apps, Agents & MLOps (50) - hardware: Hardware, IoT & Sensors (20) - dl_layers: Neural Network Layers & Blocks (106) - vision: Stereo Vision, 3D & Image Data (32) - formula: Formulas, Losses & Metrics (74) - charts: Charts, Tables & Diagrams (45) - ui: UI / Wireframe & Screens (27) - annotation: Notes, Annotations & Highlights (13) - arch_blocks: Famous Architecture Blocks (CNN · Transformer · Generative) (75) - stereo_blocks: Stereo Matching Modules (30) - chem_mol: Chemistry: Molecules & MOF Linkers (128) - chem_fg: Chemistry: Functional Groups (24) - chem_draw: Chemistry: Atoms, Bonds & Reaction Arrows (37) - chem_process: Chem. Eng.: Process & PFD / P&ID Equipment (46) - chem_lab: Chemistry: Laboratory Equipment (37) - chem_analysis: Chemistry: Spectroscopy & Characterization (26) - chem_materials: Chemistry: Crystals, Orbitals & Periodic Table (107) - chem_safety: Chemistry: Safety & Notation (15) - disc_civil: Civil Engineering (35) - disc_power: Electrical Power Systems (13) - disc_tel: Telecommunications & Signals (23) - disc_ctrl: Control Systems (10) - disc_bio: Bioengineering, Molecular Biology & Genetics (42) - disc_arch: Architecture (26) - disc_urban: Urban & Regional Planning (18) - disc_phys: Physics (34) - disc_mat: Materials Science & Engineering (13) - disc_env: Environmental Engineering (17) - disc_food: Food Engineering (14) - disc_math: Mathematics (20) - disc_comm: Communication, Media & Journalism (19) - disc_cs: Computer Science: Data Structures & Systems (16) - disc_stats: Statistics & Data Analysis (13) - disc_mech: Mechanical & Aerospace Engineering (34) - disc_earth: Earth & Geosciences (53) - disc_econ: Economics, Business & Social Sciences (56) - disc_med: Medicine & Biomedical (37) - med_models: Medicine — Clinical Models & Curves (106) - med_symbols: Medicine — Anatomy, Devices & Symbols (221) - med_equations: Medicine — Key Equations & Indices (86) - mech_models: Mechanical & Aerospace — Models & Curves (122) - mech_symbols: Mechanical & Aerospace — Symbols & Machine Elements (195) - mech_equations: Mechanical & Aerospace — Key Equations (79) - life_models: Life Sciences — Models & Curves (104) - life_symbols: Life Sciences — Cells, Molecules, Organisms & Lab (168) - life_equations: Life Sciences — Key Equations (91) - earth_models: Earth & Geosciences — Models & Curves (97) - earth_symbols: Earth & Geosciences — Map, Lithology, Weather & Field Symbols (164) - earth_equations: Earth & Geosciences — Key Equations (94) - econ_models: Economics & Social Sciences — Models & Curves (92) - econ_symbols: Economics & Social Sciences — Finance, Business & Society Icons (141) - econ_equations: Economics & Social Sciences — Key Equations (125) - phys_models: Physics & Mathematics — Models, Functions & Curves (119) - phys_symbols: Physics & Mathematics — Optics, Mechanics, Quantum & Math Symbols (154) - phys_equations: Physics & Mathematics — Key Equations (137) - proc_models: Chemical, Process & Food Eng. — Models & Curves (95) - proc_symbols: Chemical, Process & Food Eng. — P&ID, Equipment & Food Plant Symbols (147) - proc_equations: Chemical, Process & Food Eng. — Key Equations (93) - civil_models: Civil, Architecture & Urban — Models & Curves (87) - civil_symbols: Civil, Architecture & Urban — Plan, MEP, Structural & Site Symbols (156) - civil_equations: Civil, Architecture & Urban — Key Equations (91) - cs_models: Computer Science & Software — Models & Curves (76) - cs_symbols: Computer Science & Software — Hardware, Theory, DevOps & Security Symbols (141) - cs_equations: Computer Science & Software — Key Equations (94)