I see different ways to interpret your question, so here are some options depending on your use case:
If by smooth velocity constraint you mean that velocities cannot be too high, you can use the VelocityLimit.
If you rather mean that velocity variations should not be too high, then you can derive from this class to additionally store/pass a current velocity parameter, and constraint the maximum deviation of the new velocity from the current one.
If by "weight" you refer to a penalization in the cost function (soft) rather than inequality constraints (hard), then you can take a look at tasks rather than limits.
And if your use case is more complex, you can also take a look at barriers, which are more general than limits and tasks.
how could we aplly velocity smooth constraint and weight