Add plugin API and docs