first stab at agent api