more function and examples for embedded agent