You can access the collections from the CommandsFeature plugin, (e.g. with HostContext.GetPlugin<CommandsFeature>()) which are maintained in rolling Concurrent Queues whilst the summaries are contained within a Concurrent Dictionary:
Commands are not assigned an Id so you’re unlikely to implement what you want.
We intend on creating a backgrounds job feature to execute APIs and Commands that would be persisted which is more aligned to this feature, but we haven’t started on that yet.