The number one requirement for something like that to work is the target needs to consume the bean. Personally, if I felt something bean like in a drink of mine, I would spit it out. My drinks don't have bean-like things in them.
An exception might be boba. Popping boba is something you're expected to consume and pop. Cyanide hidden in a popping boba would work.
As for what you put the cyanide capsule in, that depends 100% on what you want to put it in. You can put it in anything you want. From history:
During World War II, British and American secret services developed the "L-pill" (lethal pill) which was given to agents going behind enemy lines. It was an oval capsule, approximately the size of a pea, consisting of a thin-walled glass ampoule covered in brown rubber to protect against accidental breakage and filled with a concentrated solution of potassium cyanide. It could be carried in the mouth, shaped as a false tooth; if it was accidentally swallowed it would pass harmlessly through the body. To use, the agent would bite down on the pill, crushing the ampoule to release the fast-acting poison. Brain death occurs within minutes and the heartbeat quickly stops.
Note that every aspect of that container had a rationale behind it There was nothing forced. They chose to make the capsule exactly that way. It also shows just how small the capsule can be.