> For the complete documentation index, see [llms.txt](https://docs.valohai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.valohai.com/reusable-step-libraries/build-your-own-library.md).

# Build Your Own Library

Library steps refer to customizable and reusable executions that can be incorporated into Valohai projects. These steps can be either predefined by Valohai’s Ecosystem or custom ones created by users.

Unlike project-specific steps defined in each project’s own `valohai.yaml` file, library steps are shared across an entire organization.

This articles shows you how to add custom library steps from your public and private Git repositories. For instructions on how to build the library step, see the [Docker Image builder from the valohai-toolkit repository](https://github.com/valohai/valohai-toolkit/tree/master/docker_image_builder).

### Requirements <a href="#id-1-requirements" id="id-1-requirements"></a>

* A Git repository containing a `valohai.yaml` with at least one step and all the other required code files.
* Admin account in your Valohai organization.

### Add a Git-repository with library steps <a href="#id-2-use-a-public-git-repository" id="id-2-use-a-public-git-repository"></a>

* Click on `Hi, <username>!` in the top-right corner.
* Select `Manage <organization>`.
* Open the Libraries tab.
* Click on the Add a new Library button.
* Name your library. Note that the name can only consist of letters, numbers, underscores or hyphens.

<figure><img src="/files/jgqro40oe7H9bs2cjdK0" alt=""><figcaption></figcaption></figure>

#### Public Repositories <a href="#id-3-for-public-repositories" id="id-3-for-public-repositories"></a>

* Add **HTTPS URL of the public repository** in the respective field.
  * The URL looks like `git+https://github.com/<usename>/<repository>.git`

#### Private Repositories <a href="#id-4-for-private-repositories" id="id-4-for-private-repositories"></a>

* Add SSH URL of the private repository in the respective field.
  * The URL looks like `git@github.com:<username>/<repository>.git`
* Add the SSH private key in the field.
* You can either use the Generate new SSH key button in Valohai or generate the key on your command line with the following command

```shell
ssh-keygen -t rsa -b 4096 -f my-project-deploy-key
```

* Click on the **Add Library** button.
* Click on the **Update** button to fetch the commits.

You will need to add the public key as a deploy key for your repository, see the instructions for different hosting services under the [Git integration](/git-integration.md) section.

<figure><img src="/files/RXAhyE8MiRIw6ZsWTEBg" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.valohai.com/reusable-step-libraries/build-your-own-library.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
