ACIR Files for Alexa Conversations
The Alexa Conversations Description Language (ACDL) compiler generates Alexa Conversations Intermediate Representation (ACIR) files from ACDL files. ACIR files are also called ACIR modules. ACIR is the common representation of artifacts across all tooling related to Alexa Conversations. The following diagram shows where ACIR files fit into the ACDL authoring workflow.
File location
After you compile your skill by using the Alexa Skills Kit Command-Line Interface (ASK CLI), the ACIR files are in <skill-directory>/skill-package/build/
.
The ACDL compiler generates ACIR files from the files in <skill-directory>/skill-package/conversations/
.
File contents
ACIR files contain a structured set of expressions in JSON format. You don't need to modify ACIR files, because the ASK CLI generates ACIR files when you compile the skill. When you deploy the skill, the ASK CLI creates a skill package out of the ACIR files and pushes the skill package to the Alexa cloud. For instructions on how to compile and deploy an Alexa Conversations skill using the ASK CLI, see Tutorial: Create an Alexa Conversations Skill with ACDL.
Example
The following ACIR file example is from the Weather Bot quick-start template that you can use when you create an Alexa Conversations skill by using the ASK CLI.
{
"schema" : "https://amazonalexa.com/ask/2020/12/Module",
"expressions" : [ {
"kind" : "ActionDeclaration",
"name" : "default.getWeather",
"arguments" : [ {
"name" : "cityName",
"type" : {
"kind" : "TypeReference",
"name" : "com.amazon.ask.types.builtins.AMAZON.US_CITY"
}
}, {
"name" : "date",
"type" : {
"kind" : "TypeReference",
"name" : "com.amazon.ask.types.builtins.AMAZON.DATE"
}
} ],
"returnType" : {
"kind" : "TypeReference",
"name" : "default.WeatherResult"
}
}, {
"kind" : "TypeDeclaration",
"name" : "default.CityAndDate",
"properties" : {
"date" : {
"type" : {
"kind" : "TypeReference",
"name" : "com.amazon.ask.types.builtins.AMAZON.DATE"
},
"optional" : false
},
"cityName" : {
"type" : {
"kind" : "TypeReference",
"name" : "com.amazon.ask.types.builtins.AMAZON.US_CITY"
},
"optional" : false
}
}
}, {
"kind" : "TypeDeclaration",
"name" : "default.WeatherResult",
"properties" : {
"cityName" : {
"type" : {
"kind" : "TypeReference",
"name" : "com.amazon.ask.types.builtins.AMAZON.US_CITY"
},
"optional" : false
},
"lowTemp" : {
"type" : {
"kind" : "TypeReference",
"name" : "com.amazon.ask.types.builtins.AMAZON.NUMBER"
},
"optional" : false
},
"highTemp" : {
"type" : {
"kind" : "TypeReference",
"name" : "com.amazon.ask.types.builtins.AMAZON.NUMBER"
},
"optional" : false
}
}
}, {
"kind" : "QualifiedNameDeclaration",
"name" : "default.getWeatherEvent",
"type" : {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.ask.conversations.UtteranceEvent",
"arguments" : [ {
"kind" : "TypeReference",
"name" : "default.CityAndDate"
} ]
},
"expression" : {
"kind" : "Call",
"name" : "com.amazon.alexa.ask.conversations.utterances",
"genericArguments" : [ {
"kind" : "TypeReference",
"name" : "default.CityAndDate"
} ],
"arguments" : {
"samples" : {
"kind" : "Call",
"name" : "com.amazon.alexa.ask.conversations.expression",
"genericArguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.List",
"arguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.List",
"arguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.String"
} ]
} ]
} ],
"arguments" : {
"items" : [ {
"kind" : "Literal",
"type" : {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.String"
},
"value" : "What's the weather {date} in {cityName}"
}, {
"kind" : "Literal",
"type" : {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.String"
},
"value" : "what is the weather {date}"
}, {
"kind" : "Literal",
"type" : {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.String"
},
"value" : "How is the weather {date}"
}, {
"kind" : "Literal",
"type" : {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.String"
},
"value" : "How is weather in {cityName} {date}"
}, {
"kind" : "Literal",
"type" : {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.String"
},
"value" : "how is weather"
}, {
"kind" : "Literal",
"type" : {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.String"
},
"value" : "can you please give me weather report for {date}"
} ]
}
}
}
}
}, {
"kind" : "DialogDeclaration",
"name" : "default.Weather",
"returnType" : {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.Nothing"
},
"samples" : [ {
"kind" : "Sample",
"expressions" : [ {
"kind" : "NameDeclaration",
"name" : "weatherRequest",
"type" : {
"kind" : "TypeReference",
"name" : "default.CityAndDate"
},
"expression" : {
"kind" : "Call",
"name" : "com.amazon.alexa.ask.conversations.expect",
"arguments" : {
"act" : "com.amazon.alexa.ask.conversations.Invoke",
"event" : "default.getWeatherEvent"
}
}
}, {
"kind" : "Call",
"name" : "com.amazon.alexa.ask.conversations.ensure",
"arguments" : {
"requestArgs" : {
"kind" : "Call",
"name" : "com.amazon.alexa.ask.conversations.expression",
"genericArguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.List",
"arguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.ask.conversations.Args",
"arguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.ask.conversations.RequestArguments"
} ]
} ]
} ],
"arguments" : {
"items" : [ {
"kind" : "Call",
"name" : "com.amazon.alexa.ask.conversations.expression",
"arguments" : {
"response" : "prompts.request_city_apla",
"arguments" : {
"kind" : "Call",
"name" : "com.amazon.alexa.ask.conversations.expression",
"genericArguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.List",
"arguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.List",
"arguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.ask.conversations.Argument"
} ]
} ]
} ],
"arguments" : {
"items" : [ "default.getWeather.arguments.cityName" ]
}
}
}
}, {
"kind" : "Call",
"name" : "com.amazon.alexa.ask.conversations.expression",
"arguments" : {
"response" : "prompts.request_date_apla",
"arguments" : {
"kind" : "Call",
"name" : "com.amazon.alexa.ask.conversations.expression",
"genericArguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.List",
"arguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.List",
"arguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.ask.conversations.Argument"
} ]
} ]
} ],
"arguments" : {
"items" : [ "default.getWeather.arguments.date" ]
}
}
}
}, {
"kind" : "Call",
"name" : "com.amazon.alexa.ask.conversations.expression",
"arguments" : {
"response" : "prompts.request_city_apla",
"arguments" : {
"kind" : "Call",
"name" : "com.amazon.alexa.ask.conversations.expression",
"genericArguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.List",
"arguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.schema.List",
"arguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.ask.conversations.Argument"
} ]
} ]
} ],
"arguments" : {
"items" : [ "default.getWeather.arguments.cityName", "default.getWeather.arguments.date" ]
}
}
}
} ]
}
}
}
}, {
"kind" : "NameDeclaration",
"name" : "weatherResult",
"type" : {
"kind" : "TypeReference",
"name" : "default.WeatherResult"
},
"expression" : {
"kind" : "Call",
"name" : "default.getWeather",
"arguments" : {
"date" : "weatherRequest.date",
"cityName" : "weatherRequest.cityName"
}
}
}, {
"kind" : "Call",
"name" : "com.amazon.alexa.ask.conversations.response",
"arguments" : {
"act" : {
"kind" : "Call",
"name" : "com.amazon.alexa.ask.conversations.expression",
"genericArguments" : [ {
"kind" : "TypeReference",
"name" : "com.amazon.alexa.ask.conversations.Notify"
} ],
"arguments" : {
"actionName" : "default.getWeather"
}
},
"payload" : {
"kind" : "Call",
"name" : "com.amazon.alexa.ask.conversations.expression",
"arguments" : {
"weatherResult" : "weatherResult"
}
},
"response" : "prompts.weather_apla"
}
} ]
} ]
} ]
}
Related topics
Last updated: Nov 27, 2023