[sc-kpm] Base library for agents (issue #146)