sample agent source code