[Yandex Cloud documentation](../../../index.md) > [Yandex DataSphere](../../index.md) > [Step-by-step guides](../index.md) > DataSphere Jobs > Working with a service agent from a job

# Working with a service agent from a job

You can work with other services from [jobs](../../concepts/jobs/index.md) using a [service agent](../../../iam/concepts/service-control.md#service-agent). A service agent is a special service account under which DataSphere projects will perform actions in other Yandex Cloud services.

To work with other services from jobs:

1. [Create](../community/create-ssa.md) a service agent and enable it in the [community](../../concepts/community.md).
1. [Run](work-with-jobs.md) the job. The service agent token will be saved to a file and will be available from the `SA_TOKEN_FILENAME` environment variable.
1. Use the `SA_TOKEN_FILENAME` variable to work with other services. For example, this is how you can get the contents of the [Yandex Lockbox](../../../lockbox/index.md) secret using the API:

   ```bash
   curl --header "Authorization: Bearer $(cat $SA_TOKEN_FILENAME)" \
     https://payload.lockbox.api.cloud.yandex.net/lockbox/v1/secrets/<secret_ID>/payload
   ```

   Result:

   ```text
   {
    "entries": [
     {
      "key": "my-key",
      "textValue": "key-example"
     }
    ],
    "versionId": "e6qlcb7fqtt6********"
   }
   ```