Execute code snippets within agent

Enable execution of code snippets within the agent.