← Back to all apps

YepCode

Developer toolsby YepCode S.L.
Launched Mar 3, 2026 on ChatGPT

YepCode lets you build custom AI tools using your own code with JSON Schema-defined inputs, executed in an isolated sandbox with access to any npm or PyPI package and secure environment variables.

Define reusable processes in Node.js or Python, expose them as callable AI tools, and execute them on demand or on a schedule. Every run is logged and auditable, enabling traceable, production-grade AI integrations.

Built for developers who need programmable, observable AI tool execution.

1ChatGPT Tools
YepCode S.L.Developer
Developer toolsCategory

Available Tools

Execute LLM-generated code in YepCode’s remote and secure sandboxes

run_code
Full Description

This tool is ideal when your AI agent needs to handle tasks that don’t have a predefined tool available — but could be solved by writing and running a custom script.

It supports JavaScript and Python, both with external dependencies (NPM or PyPI), so it’s perfect for:

  • Complex data transformations
  • API calls to services not yet integrated
  • Custom logic implementations
  • One-off utility scripts
  • To use files as input, first upload them to YepCode Storage using the upload storage MCP tools. Then, access them in your code using the yepcode.storage helper methods to download the files.

* To generate and output files, create them in the local execution storage, then upload them to YepCode Storage using the yepcode.storage helpers. Once uploaded, you can download them using the download storage MCP tool.

Tip: First try to find a tool that matches your task, but if not available, try generating the code and running it here.

Parameters (2 required)
Required
codestring

Here you can find the general rules for YepCode coding: # JavaScript Code Rules ## Quick Reference | Aspect | Guideline | | ----------------------- | ---------------------------------- | | **Runtime** | Node.js v22 | | **Main file (process)** | `index.js` | | **Entry point** | `async function main()` | | **Export (required)** | `module.exports = { main }` | | **Parameters** | `yepcode.context.parameters` | | **Variables** | `process.env.X` or `yepcode.env.X` | | **Modules** | `yepcode.import("module-slug")` | ### Critical Rules * ✅ **Always** export `main` with `module.exports = { main }` * ❌ **Never** call `main()` directly * ✅ **Always** use `async/await` for async operations * ✅ **Always** add `try/catch` around the main flow for actionable errors * ❌ **Never** use dynamic module names with `yepcode.import()`—module names must be **hardcoded strings** (e.g. `yepcode.import("module-name")`), not variables * ✅ Use **const** or **let**; avoid **var** ## Process Template ```javascript async function main() { // Access input parameters const { parameters } = yepcode.context; // Your code here // Return result return { message: "Success!" }; } module.exports = { main }; ``` ## Helpers Usage * Access execution info: `const { id, comment } = yepcode.execution;` * Access process info: `const { id: processId, name: processName } = yepcode.execution.process;` * Access schedule info (if present): `const { id: scheduleId, comment: scheduleComment } = yepcode.execution.schedule;` * Access team timezone: `const timezone = yepcode.execution.timezone;` * Use environment variables: `const apiKey = process.env.API_KEY; // or yepcode.env.API_KEY` * Import YepCode modules: `const { myFunc } = yepcode.import("module-name");` * Caution: module names must be **hardcoded strings** (no variables) * Import with version: `const { myFunc } = yepcode.import("module-name", "v1.0");` * Run another process: `await yepcode.processes.run("process-identifier", options);` ## Logging ```javascript console.log("INFO message"); console.debug("DEBUG message"); console.info("INFO message"); console.warn("WARNING message"); console.error("ERROR message"); ``` ## Dependencies Management * You may use external npm packages * Just add the require statement to the code and the package will be installed automatically * If package import name is different than the package name, you must use the `@add-package` comment: ```javascript // @add-package axios const axios = require("axios"); ``` ## Local Disk ```javascript const path = require("path"); // Calculate the path to the temporary file const filePath = path.join(process.env.TMP_DATA_DIR, "myfile.txt"); // Writing a file const fs = require("fs"); fs.writeFileSync(filePath, "Hello from YepCode!"); ``` ## Datastore ```js // Setting a value await yepcode.datastore.set("key", "value"); // Setting a object value await yepcode.datastore.set("key", JSON.stringify({ name: "John", age: 30 })); // Getting a value const value = await yepcode.datastore.get("key"); // Deleting a value await yepcode.datastore.del("key"); ``` ## Storage ```js const fs = require("node:fs"); const path = require("node:path"); const localPath = path.join(process.env.TMP_DATA_DIR, "localfile.txt"); // Uploading a file await yepcode.storage.upload("path/myfile.txt", fs.createReadStream(localPath)); // Listing files const files = await yepcode.storage.list(); // Downloading a file const stream = await yepcode.storage.download("path/myfile.txt"); stream.pipe(fs.createWriteStream(localPath)); // Deleting a file await yepcode.storage.delete("path/myfile.txt"); ``` ## Return Values ### Standard Return ```javascript return { message: "Success!" }; ``` ### Custom HTTP Status Codes * This is the format for custom HTTP status codes: ```javascript return { status: 404, body: { message: "Not found" }, headers: { "Content-Type": "application/json" } }; ``` ## Transient Results ```javascript return { transient: true, data: sensitiveData, }; ``` ## Do & Don’t **Do** * Export `main` with `module.exports = { main }`. * Use async/await for asynchronous work. * Validate parameters at the start; throw clear errors for missing or invalid input. * Use environment variables (e.g. `process.env.API_KEY`) for secrets; never hardcode them. * Use try/catch around the main flow and log or re-throw with clear messages. * Log important steps; never log secrets. **Don’t** * Never call `main()` in your code—YepCode invokes it. * Never hardcode API keys, passwords, or tokens. * Don’t forget to export: `module.exports = { main }`. * Don’t use **var**; use **const** or **let**. * Don’t ignore errors; wrap risky operations in try/catch. * Don’t use dynamic module names: `yepcode.import(moduleName)` is wrong; use `yepcode.import("module-name")`. # Python Code Rules ## Quick Reference | Aspect | Guideline | | ----------------------- | -------------------------------------- | | **Runtime** | Python 3.13 | | **Main file (process)** | `main.py` | | **Entry point** | `def main()` | | **Parameters** | `yepcode.context.parameters` | | **Variables** | `os.getenv("X")` or `yepcode.env.X` | | **Modules** | `yepcode.import_module("module-slug")` | ### Critical Rules * ✅ **Always** define a `main()` function * ❌ **Never** call `main()` directly * ✅ **Always** add `try/except` around the main flow for actionable errors * ✅ Follow **PEP 8** (and add type hints when useful) * ✅ **Always** use **snake\_case** for variables and functions * ❌ **Never** use dynamic module names with `yepcode.import_module()`—module names must be **hardcoded strings** (e.g. `yepcode.import_module("module-name")`), not variables ## Process Template ```python def main(): # Access input parameters parameters = yepcode.context.parameters # Your code here # Return result return { "message": "Success!" } ``` ## Helpers Usage * Access execution info: `execution_id = yepcode.execution.id` * Access process info: `process_id = yepcode.execution.process.id` * Access schedule info (if present): `scheduleId, scheduleComment = yepcode.execution.schedule.id, yepcode.execution.schedule.comment` * Access team timezone: `timezone = yepcode.execution.timezone` * Use environment variables: `api_key = os.getenv("API_KEY") # or yepcode.env.API_KEY` * Import YepCode modules: `client = yepcode.import_module("module-name")` * Caution: module names must be **hardcoded strings** (no variables) * Import with version: `client = yepcode.import_module("module-name", "v1.0")` * Run another process: `yepcode.processes.run("process-identifier", options)` ## Logging ```python print("INFO message") # Generates INFO level log logger.debug("DEBUG message") logger.info("INFO message") logger.warn("WARNING message") logger.error("ERROR message") ``` ## Dependencies Management * You may use external pip packages. * Just add the `import` statement and the package will be installed automatically. * If the **package name** differs from the **import name**, use the `@add-package` comment: ```python # @add-package requests import requests ``` ## Local Disk ```python import os # Calculate the path to the temporary file file_path = os.path.join(os.environ.get("TMP_DATA_DIR"), "myfile.txt") # Writing a file with open(file_path, 'w') as f: f.write('Hello from YepCode!') ``` ## Datastore ```python import json # Setting a value yepcode.datastore.set("key", "value") # Setting a object value yepcode.datastore.set("key", json.dumps({ "name": "John", "age": 30 })) # Getting a value value = yepcode.datastore.get("key") # Deleting a value yepcode.datastore.delete("key") ``` ## Storage ```python import os local_path = os.path.join(os.environ.get("TMP_DATA_DIR"), "localfile.txt") # Uploading a file with open(local_path, "rb") as f: obj = yepcode.storage.upload("path/myfile.txt", f) print("Uploaded:", obj.name, obj.size, obj.link) # Listing files objects = yepcode.storage.list() # Downloading a file content = yepcode.storage.download("path/myfile.txt") with open(local_path, "wb") as f: f.write(content) # Deleting a file yepcode.storage.delete("path/myfile.txt") ``` ## Return Values ### Standard Return ```python return { "message": "Success!" } ``` ### Custom HTTP Status Codes * This is the format for custom HTTP status codes: ```python return { "status": 404, "body": { "message": "Not found" }, "headers": { "Content-Type": "application/json" } } ``` ## Transient Results ```python return { "transient": True, "data": sensitive_data } ``` ## Do & Don’t **Do** * Define `main()` and avoid calling it directly. * Validate parameters at the start; raise meaningful errors for missing or invalid input. * Use environment variables (e.g. `os.getenv("API_KEY")`) for secrets; never hardcode them. * Use try/except around the main flow and log or re-raise with clear messages. * Use **snake\_case** for variables and functions; follow PEP 8. * Use type hints where helpful. * Log important steps; never log secrets. **Don’t** * Never call `main()` in your code—YepCode invokes it. * Never hardcode API keys, passwords, or tokens. * Don’t use **camelCase** in Python; use snake\_case. * Don’t ignore errors; wrap risky operations in try/except. * Don’t use dynamic module names: `yepcode.import_module(module_name)` is wrong; use `yepcode.import_module("module-name")`. * Don’t rely on global variables for state; pass state through parameters or return values. false

optionsobject