\usemodule[filter]
\defineexternalfilter
[ASY]
[filtercommand={asy -tex "context" -View -outformat pdf -outname \externalfilteroutputfile\space \externalfilterinputfile},
output=\externalfilterbasefile.out,
readcommand=\typefile,
cache=force,
location=text,
continue=yes]
\starttext
\startASY[myplot]
draw((1,1)--(2,4));
\stopASY
\externalfigure[myplot]
\stoptext
Thanks
Jeroen