\defineexternalfilter
[ASY]
[filtercommand={asy -tex "context" -outformat pdf
-outname \externalfilteroutputfile},
output=\externalfilterbasefile.pdf,
cache=yes,
readcommand=\ReadImage,]
\define[1]\ReadImage{\externalfigure[#1]}
\starttext
Testing if we can include an asymptote image
\startplacefigure[location={here}, title={An Asymptote figure}]
\startASY
unitsize(1cm);
draw((-.1,0) -- (2,0), arrow=Arrow(TeXHead));
draw((0,-.1) -- (0,2), arrow=Arrow(TeXHead));
draw((0,0) .. (1,1) .. (2,sqrt(2)));
\stopASY
\stopplacefigure
\stoptext