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
- Get the skill folder from the shared Drive folder
- One-time setup:
cp agentlabs-porter/.env.example agentlabs-porter/.env# fill OMNICHANNEL_EMAIL, OMNICHANNEL_PASSWORDpip install requests python-dotenv- Export a bot:
python agentlabs-porter/scripts/export_bot.py --bot-code <BOT_CODE>- Import a bot:
python agentlabs-porter/scripts/import_bot.py --bot-code <BOT_CODE> --file <path-to.json>Keep your
.envout of version control — it holds your Omnichannel credentials. The skill’s repo ignores*.envby 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 — design a new bot blueprint from requirements
- AgentLabs LLM Builder — generate importable AgentLabs JSON from a PRD