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

CommandWhat it does
ExportSaves the bot config as <bot_code>-<UTC>.json; supports custom output path
ImportTwo-step upload (import/checkimport) 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
  2. One-time setup:
cp agentlabs-porter/.env.example agentlabs-porter/.env
# fill OMNICHANNEL_EMAIL, OMNICHANNEL_PASSWORD
pip install requests python-dotenv
  1. Export a bot:
python agentlabs-porter/scripts/export_bot.py --bot-code <BOT_CODE>
  1. Import a bot:
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.