This is not currently possible in After Effects. After Effects can add items from a library to your project, but you can not add items from your project to a library.
For Illustrator files, you can add the selected objects or layers to your library from within Illustrator. Same for Photoshop.
In a future update for After Effects we could add the ability for After Effects to add content to your library. There's a lot of different types of content After Effects could add: files in your project, shape layers, text layers, effect presets, scripts, etc. Currently we think it would be most useful and interesting to add effect presets and scripts, but you should tell us what you think by filing a feature request: http://adobe.com/go/wish
It would be nice to be able to save or export individual Comps simply. (maybe there is a way I don't know about?).
Often I create something for a project and want to save it as an asset.
It would be great if I could right click on a comp in the project panel and have the option to save it as a native AE file ONLY with the files that are associated with that comp.
The way I do it now is I save my project, delete everything except the comp I want to save and it's associated files then save by a new name.
Then I re-open my project and continue working.
Being able to quickly save individual comps would be great.
Sorry if there is already a way...
I'm pretty much a beginner & occasionally quite stupid.
EDIT...example me not noticing the link for feature requests and posting here.
But maybe there is a way to do what I am suggesting, so I will wait to see if someone tells me this is already possible before I request it.