Source: https://atomicwork.docs.pageloop.ai/product/ai-workforce/code-library

# Code library

Some jobs don't have a native workflow action or MCP tool yet, such as resetting a password in a particular way or reassigning a pending approver to their manager. The Code library is where you keep JavaScript scripts for those jobs, so you write a script once and run it from both your workflows and your AI Coworkers.

To open it, go to **AI Workforce > AI Registry > Code library**.

## What's in the library

The library lists every script in your organization, with its **Title**, **Status**, **Last modified** and **Created by** details. Use **Search** or the filter to find a script, and the three-dot menu (**⋮**) on a row to act on it.

- **Draft** scripts are still being worked on and aren't available to run yet.

- **Published** scripts are live. A published script can also show **Has draft** when someone is editing a new version that hasn't been published.

Atomicwork adds some scripts for you, which show **System** as their creator. For example, **Okta — Reset password** issues a one-time Okta password reset link and unlocks the account first if it's locked out, and **Entra ID — Reset password** resets an employee's Entra ID (Azure AD) password to a temporary one that they must change at next sign-in.

## Create a script

Go to **AI Workforce > AI Registry > Code library** and click **Create**. A new script starts as a draft, and becomes available to workflows and AI Coworkers once it's published.

We'd recommend giving each script a description that says what it changes and what it returns. That's what people, and AI Assist, read when deciding whether to reuse it.

## Write scripts with AI Assist

Click **AI assist** on the Code library page or inside a script to have AI Assist write, explain or fix a script from a plain-language description. You can also ask about the library as a whole, for example "What do these scripts cover?" See [AI Assist](/product/ai-knowledge/ai-assist).

## Related articles

- [Code actions](/product/enterprise-workflows/actions-and-integrations/code-actions): running custom code inside a workflow.
- [Setting up an AI Coworker](/product/ai-workforce/setting-up-an-ai-coworker)
