Skip to content
Skillv1.0.0

bambu-studio-ai

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing tas

by baneeishaque(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from baneeishaque/ljt-520_openclaw-backup (skills/heyixuan2/bambu-studio-ai/SKILL.md). Install upstream with npx skills add baneeishaque/ljt-520_openclaw-backup --skill bambu-studio-ai. Copyright stays with the author.

πŸ–¨οΈ Bambu Studio AI

Request β†’ Collect Info β†’ Search/Generate β†’ Analyze(11pt) β†’ [Colorize] β†’ Slice β†’ Preview(chat) β†’ Preview(BS) β†’ Confirm β†’ Print β†’ Monitor

Pre-check: If config.json does not exist β†’ run First-Time Setup before any operation.


Quick Reference

I want to... Command
Printer status python3 scripts/bambu.py status
Print progress python3 scripts/bambu.py progress
Printer hardware info python3 scripts/bambu.py info
Start a print python3 scripts/bambu.py print <file> --confirmed
Pause / Resume / Cancel python3 scripts/bambu.py pause|resume|cancel
Speed mode python3 scripts/bambu.py speed silent|standard|sport|ludicrous
Light on/off python3 scripts/bambu.py light on|off
AMS filament info python3 scripts/bambu.py ams
Camera snapshot python3 scripts/bambu.py snapshot
Send G-code python3 scripts/bambu.py gcode "G28"
Notification python3 scripts/bambu.py notify --message "done"
Generate 3D (text) python3 scripts/generate.py text "desc" --wait (--raw skips auto-enhancement)
Generate 3D (image) python3 scripts/generate.py image photo.jpg --wait
Download model python3 scripts/generate.py download <task_id>
Analyze model python3 scripts/analyze.py model.stl --orient --repair --material PLA
Multi-color python3 scripts/colorize.py model.glb --height 80 --max_colors 8 -o out.obj (tunable: --min-pct, --no-merge, --island-size, --smooth)
Slice python3 scripts/slice.py model.stl --orient --arrange --quality fine
Slice (specific setup) python3 scripts/slice.py model.stl --printer A1 --filament "Bambu PETG Basic"
List slicer profiles python3 scripts/slice.py --list-profiles
Preview (quick) python3 scripts/preview.py model.stl
Preview (HQ Blender) python3 scripts/preview.py model.stl --hq
Search models python3 scripts/search.py "phone stand" --limit 5
Monitor print python3 scripts/monitor.py --auto-pause
Check deps python3 scripts/doctor.py

All scripts support --help. generate.py auto-enhances prompts and limits size to printer build volume.


Overall Flow

User Request
    β”‚
    β–Ό
Information Collection
    β”‚
    β–Ό
Decision 1: Model Source
    β”œβ”€ A: Internet Search (preferred default)
    β”œβ”€ B: AI Generate (single-color)
    β”œβ”€ C: AI Generate (multi-color)
    └─ D: User-provided file
    β”‚
    β–Ό
Model Processing (analyze β†’ repair β†’ orient β†’ [colorize] β†’ slice)
    β”‚
    β–Ό
Report Results to User
    β”‚
    β–Ό
β›” Open in Bambu Studio β†’ User Inspects
    β”‚
    β–Ό
User Confirms ("looks good" / "print it")
    β”‚
    β–Ό
Decision 2: Print Method
    β”œβ”€ E: Auto Print (bambu.py print --confirmed)
    └─ F: Manual Print (user handles in Bambu Studio)
    β”‚
    β–Ό
Print Monitoring (auto print only, or on user request)

Step 1: Information Collection

Collect before proceeding:

Model requirements:

  • What to print (object description)
  • Target dimensions β€” MUST ask before generating ("How big? e.g., 80mm tall")
  • Style / appearance (optional)

Print parameters:

  • Single-color or multi-color (AMS)
  • Material (default: PLA)
  • Quality: draft / standard / fine / extra (optional)
  • Purpose: functional or decorative (optional, affects walls + infill)

Model source β€” ask user:

"Do you want me to:

  1. πŸ”Ž Search online β€” existing models, usually higher quality
  2. 🎨 AI generate β€” custom model from scratch
  3. 🀷 Not sure β€” I'll search first, generate if nothing fits"

Default: search first. Common objects (phone stand, hook, vase) almost always exist online.


Step 2: Model Source (Decision Point 1)

Workflow A β€” Internet Search (preferred)

  1. search.py "query" --limit 5 β†’ MakerWorld, Printables, Thingiverse, Thangs
  2. Present results with name, source, URL
  3. User selects β†’ download β†’ validate format (STL/OBJ/3MF)
  4. β†’ Model Processing

If no good results β†’ offer AI generate.

Workflow B β€” AI Generate (single-color)

  1. First-time disclaimer (once): "AI models depend on provider + prompt. NOT production-ready β€” always review in Bambu Studio."
  2. Confirm dimensions
  3. generate.py text "prompt" --wait β†’ auto-enhances, auto-limits to build volume
  4. β†’ Model Processing

Workflow C β€” AI Generate (multi-color)

  1. Same disclaimer as B
  2. Confirm dimensions + desired colors
  3. generate.py text "prompt" --wait β†’ textured GLB
  4. colorize.py model.glb --height <size> --max_colors 8 β†’ vertex-color OBJ
    • Pixel HSV classify β†’ greedy area-based color select β†’ CIELAB assign β†’ vertex color
    • No shadow removal needed β€” HSV classification bypasses baked lighting
  5. Show quantized texture preview to user β€” send the _preview.png image
  6. Analyze results and suggest tuning if needed:
    • Report detected colors with names, hex codes, and percentages
    • If small but meaningful colors were lost (e.g., <1% features like eyes, accessories): β†’ Suggest: --min-pct 0 (keep all colors above 0.1%)
    • If similar colors are merged incorrectly (e.g., yellow body + brown pants): β†’ Suggest: --no-merge (disable family mutual exclusion)
    • If too many artifact colors appear: β†’ Suggest: higher --min-pct or --island-size
    • If boundaries are too noisy or too smooth: β†’ Suggest: adjust --smooth (0=none, 5=default, higher=smoother)
  7. If user requests changes β†’ re-run colorize with adjusted params β†’ show new preview
  8. When user approves β†’ Model Processing

Colorize tunable parameters:

Parameter Default Effect
--max_colors N 8 Maximum colors (hard limit ≀8 for AMS)
--min-pct X 0.1 Min family % threshold (0=keep all, 5=aggressive filter)
--no-merge off Disable family group exclusion (all 12 families independent)
--island-size N 1000 Remove isolated patches < N pixels (0=disabled)
--smooth N 5 Majority vote boundary passes (0=raw, higher=smoother)

Workflow D β€” User-Provided File

  1. Validate format (STL/OBJ/3MF/GLB), convert if needed
  2. β†’ Model Processing

Step 3: Model Processing

All models MUST go through this. No exceptions.

Analysis (11-point check):

analyze.py model.stl --orient --repair --material PLA --purpose functional

Checks: dimensional tolerance, wall thickness, load direction, overhangs (>45Β°), print orientation, floating parts, layer height, infill rate, wall count, top layers, material compatibility. Also: watertight, manifold, build volume fit.

Auto-repair: Fix normals, fill holes, remove degenerate faces.

Auto-orient: Optimal stability, auto unit detection (meters→mm).

Report to user (MANDATORY):

  • Printability score (X/10)
  • Warnings and issues
  • Repairs performed
  • Recommended settings (layer height, infill, walls, temps, supports)

Example: "Score 8/10. Repaired 58K non-manifold edges. Walls: 1.5mm βœ… Overhangs: 3.2% βœ… Recommended: 0.20mm layers, 20% infill, PLA 210Β°C."

Slice (skip if user will slice in Bambu Studio):

slice.py model.stl --orient --arrange --quality standard

Auto-detects printer + nozzle. Quality: draft(0.24) / standard(0.20) / fine(0.12) / extra(0.08). Output: .3mf with G-code.


Step 4: User Confirmation

β›” MANDATORY β€” NEVER SKIP

  1. Open in Bambu Studio: open -a "BambuStudio" model_sliced.3mf
  2. Tell user to inspect:

    "I've opened the model in Bambu Studio. Please check:

    • Does it look correct? Missing or deformed parts?
    • Floating/disconnected pieces?
    • Correct size? (check dimensions in bottom bar)
    • Any red warnings?
    • Slice and check: estimated time, filament usage, supports. Let me know when ready!"
  3. WAIT for explicit confirmation.

β›” NEVER auto-print. AI models frequently have errors analysis can't fully catch.

  1. Ask print method:
    • Direct automatic printing β†’ Workflow E
    • Manual in Bambu Studio β†’ Workflow F

Step 5: Print Execution (Decision Point 2)

Workflow E β€” Auto Print

  1. bambu.py print model.3mf --confirmed
  2. Confirm: "Print started!"
  3. β†’ Monitoring

Workflow F β€” Manual Print

  • Model already open in Bambu Studio
  • User adjusts settings and prints manually
  • Agent does NOT auto-print or auto-monitor
  • CAN monitor on request

Step 6: Print Monitoring

Trigger: Auto print (Workflow E) or user request. Requires LAN mode + consent.

⚠️ Always ask: "Want me to monitor? Auto-pause on serious issues?"

Anomaly Severity Action
Progress stall >10min Warning Alert user
Temperature anomaly Critical Alert + auto-pause
Print failure/error Critical Alert + auto-pause
Unexpected pause Warning Alert user
Bed detachment Critical Auto-pause + alert
Spaghetti Critical Auto-pause + alert

Silent when normal. Progress summary every 30 min. Completion notification.


First-Time Setup

Triggered when config.json doesn't exist. Conversational:

  1. Printer model β€” A1 Mini, A1, P1S, P2S, X1C, X1E, H2C, H2S, H2D
  2. Connection β€” LAN (recommended: IP + serial + access code) or Cloud (email + password, limited)
  3. 3D generation (optional) β€” Meshy, Tripo, Printpal, 3D AI Studio + API key
  4. Notifications β€” auto / Discord / iMessage / Telegram / etc.
  5. Save β€” config.json + .secrets.json (chmod 600, git-ignored)
  6. Verify (ask permission) β€” test connection, camera, AMS
  7. Summary

Environment & Dependencies

Required: python3, pip3

pip3 install bambulabs-api bambu-lab-cloud-api requests trimesh numpy Pillow ddgs

Optional: ffmpeg (camera), Bambu Studio (preview/slicing), Blender 4.0+ (multi-color + HQ preview), OrcaSlicer (CLI slicing)

Env vars (override config.json): BAMBU_MODE, BAMBU_MODEL, BAMBU_EMAIL, BAMBU_IP, BAMBU_SERIAL, BAMBU_3D_PROVIDER

Secrets (.secrets.json, chmod 600): password, access_code, 3d_api_key. All user-provided, never shipped.


Common Issues

Problem Fix
SSL handshake error (LAN) Normal (self-signed certs). Handled automatically.
API method not found pip3 install --upgrade bambulabs-api (v2.6.6+)
Can't connect (LAN) LAN Mode ON + correct IP + same network
Cloud verification code Wait for email, enter once. Token cached 24h.
Camera timeout Wake printer (tap screen), check IP.
AI model has holes/floating parts Expected. Always run analyze.py --repair.

Known Limitations

Feature Status
Single-color pipeline βœ… Stable
Multi-color (colorize) βœ… Auto-detect ≀8 colors, vertex-color OBJ β†’ BS color merge dialog
CLI slicing βœ… OrcaSlicer backend (BS CLI SEGFAULT in v2.5.0)
End-to-end auto-print πŸ”œ Requires Bambu Studio preview step

Reference Documents

  • references/model-specs.md β€” All 9 printer specifications
  • references/bambu_filament_colors.json β€” Bambu Lab 43-color palette (reference only, colorize v4 uses texture-native colors)
  • references/bambu-mqtt-protocol.md β€” MQTT protocol
  • references/bambu-cloud-api.md β€” Cloud API
  • references/3d-generation-apis.md β€” Provider API endpoints
  • references/3d-prompt-guide.md β€” Prompt engineering for 3D

License

MIT Β· GitHub: https://github.com/heyixuan2/bambu-studio-ai

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/baneeishaque-ljt-520-openclaw-backup-bambu-studio-ai/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

baneeishaque-ljt-520-openclaw-backup-bambu-studio-ai.ocm.jsonjson
{
  "ocm": "1",
  "id": "baneeishaque-ljt-520-openclaw-backup-bambu-studio-ai",
  "kind": "skill",
  "name": "bambu-studio-ai",
  "description": "Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pipeline: search β†’ generate β†’ analyze β†’ colorize β†’ slice β†’ print β†’ monitor. Supports all 9 Bambu Lab printers (A1 Mini, A1, P1S, P2S, X1C, X1E, H2C, H2S, H2D).",
  "publisher": "baneeishaque",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "3d-printing",
      "bambu-lab",
      "ams",
      "text-to-3d",
      "slicing",
      "print-monitoring",
      "multi-color",
      "github"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pipeline: search β†’ generate β†’ analyze β†’ colorize β†’ slice β†’ print β†’ monitor. Supports all 9 Bambu Lab printers (A1 Mini, A1, P1S, P2S, X1C, X1E, H2C, H2S, H2D)."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github",
      "repository": "https://github.com/baneeishaque/ljt-520_openclaw-backup",
      "path": "skills/heyixuan2/bambu-studio-ai/SKILL.md",
      "ref": "e7d5728ce0b5428e03af6d334d2465422d3d9bff",
      "url": "https://github.com/baneeishaque/ljt-520_openclaw-backup/blob/e7d5728ce0b5428e03af6d334d2465422d3d9bff/skills/heyixuan2/bambu-studio-ai/SKILL.md",
      "key": "baneeishaque/ljt-520_openclaw-backup/skills/heyixuan2/bambu-studio-ai/SKILL.md"
    }
  },
  "instructions": "# πŸ–¨οΈ Bambu Studio AI\n\nRequest β†’ Collect Info β†’ Search/Generate β†’ Analyze(11pt) β†’ [Colorize] β†’ Slice β†’ Preview(chat) β†’ Preview(BS) β†’ Confirm β†’ Print β†’ Monitor\n\nPre-check: If `config.json` does not exist β†’ run First-Time Setup before any operation.\n\n---\n\n## Quick Reference\n\n| I want to... | Command |\n|---|---|\n| Printer status | `python3 scripts/bambu.py status` |\n| Print progress | `python3 scripts/bambu.py progress` |\n| Printer hardware info | `python3 scripts/bambu.py info` |\n| Start a print | `python3 scripts/bambu.py print <file> --confirmed` |\n| Pause / Resume / Cancel | `python3 scripts/b",
  "cost": {
    "context_tokens": 2843
  }
}

Fetch it by URL: GET /api/v1/registry/baneeishaque-ljt-520-openclaw-backup-bambu-studio-ai/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.