cusom automcomplete helper

Is there some docs/tutorial that I can use to create my own autocomplete helper ?
Looking at the code of the existing helpers I can’t easily figure out how they work.
I want to base off solr - but a custom grammar.

There’s the documentation for show-hint, but that’s about it.