API.AI Agent Downloader
Programmatically download API.AI agent intents and entities for backup or analysis.
Usage
const agentDownloader = ;const fs = ; const agentName = 'agent_foo';const developerToken = 'abc123'; agentDownloader;
Note: Requests are throttled to 1 per second to avoid exceeding API.AI usage limits.
Summary format
An agent summary is an object with three keys:
name
: The name of the agent.entities
: An array of the agent's entity objects.intents
: An array of the agent's intent objects.
For example, something like:
name: 'pizzeria' entities: id: 'abc123' name: 'topping' entries: value: 'mushrooms' synonyms: 'mushrooms' 'shrooms' 'white mushrooms' ... ... intents: id: 'def456' name: 'order pizza' userSays: ... ...