---
name: "agentlabs-porter"
description: "Export and import Qiscus AgentLabs bot JSON via the pekabgt API — back up, clone, migrate, or restore a bot config with a single command."
type: skill
roles: ["Engineering"]
activities: ["Bot Building", "Migration"]
tags: ["AgentLabs", "Import", "Export", "Migration", "Porter"]
owner: "Yayan Adipraja"
sourceUrl: "https://drive.google.com/drive/folders/1WxREsjPY9q0e7pkn-bLtJgqc6u0jTkxK"
---

# agentlabs-porter

> Export and import Qiscus AgentLabs bot JSON via the pekabgt API — back up, clone, migrate, or restore a bot config with a single command.

## Overview

agentlabs-porter wraps the Qiscus AgentLabs `pekabgt` export/import API in two scripts, so Claude can back up, clone, migrate, or restore an AgentLabs bot config on request — "export this bot", "back up the bot", "import bot JSON into `<code>`", "clone bot from staging".

The token-hop chain (Omnichannel login → AgentLabs token exchange → export or import) is hidden inside the skill's client library. The entry-point scripts emit a one-line JSON status envelope on stdout, so Claude can report success or failure without ever ingesting the bot JSON itself — which can be huge and may contain embeddings.

## Capabilities

| Command | What it does |
| --- | --- |
| Export | Saves the bot config as `<bot_code>-<UTC>.json`; supports custom output path |
| Import | Two-step upload (`import/check` → `import`) that restores a JSON config into a bot code |

Both commands accept credential and base-URL overrides; the default AgentLabs base is `https://api-chatbot.qiscus.com`.

## When to Use

- Snapshotting a bot before making risky changes
- Cloning a bot from staging into a prod-test environment
- Restoring a bot from a previous JSON backup

Not for: editing bot intents in the UI, running chatbot test scenarios, or general AgentLabs questions.

## How to Access

1. Get the skill folder from the [shared Drive folder](https://drive.google.com/drive/folders/1WxREsjPY9q0e7pkn-bLtJgqc6u0jTkxK)
2. One-time setup:

```bash
cp agentlabs-porter/.env.example agentlabs-porter/.env
# fill OMNICHANNEL_EMAIL, OMNICHANNEL_PASSWORD
pip install requests python-dotenv
```

3. Export a bot:

```bash
python agentlabs-porter/scripts/export_bot.py --bot-code <BOT_CODE>
```

4. Import a bot:

```bash
python agentlabs-porter/scripts/import_bot.py --bot-code <BOT_CODE> --file <path-to.json>
```

> Keep your `.env` out of version control — it holds your Omnichannel credentials. The skill's repo ignores `*.env` by default.

## Example Prompts

```
Export bot ABC123 and save the snapshot before I change its intents.
```

```
Clone the staging bot: export bot STG456, then import the JSON into PRD789.
```

## Related Tools

- [agentlabs-blueprint](/tools/agentlabs-blueprint/) — design a new bot blueprint from requirements
- [AgentLabs LLM Builder](/tools/agentlabs-llm-builder/) — generate importable AgentLabs JSON from a PRD
