YepCode Core Concepts Rules
This file provides guidelines for LLMs to understand YepCode platform and its core concepts.
What is YepCode?
Section titled “What is YepCode?”YepCode is an enterprise-ready integration and automation platform that offers comprehensive features for API integrations, workflow automation, and data processing. It excels in providing enterprise-grade sandboxing and security measures specifically designed for running code generated by LLMs.
This offers developers a familiar coding environment, while handling all the infrastructure concerns, security measures, and dependency management automatically.
Core Concepts
Section titled “Core Concepts”Processes
Section titled “Processes”- Basic unit of execution in YepCode
- Contains business logic written in JavaScript (NodeJS v22) or Python (v3.13)
- Each process may have input parameters, that are defined using a JSON Schema file (parametersSchema.json) and can be accessed during execution using the
yepcode.context.parametersobject - If you use the YepCode CLI, the copy of your YepCode workspace in your local environment will have the following folder structure:
📦 <workspace-name> ┣ 📂 dependencies ┃ ┣ 📜 package.json ┃ ┣ 📜 requirements.txt ┣ 📂 modules ┃ ┣ 📂 <javascript-module-slug> ┃ ┃ ┗ 📜 <module-slug>.js ┃ ┣ 📂 <python-module-slug> ┃ ┃ ┗ 📜 <module-slug>.py ┃ ┣ 📂 <module-with-versions> ┃ ┃ ┣ 📂 versions ┃ ┃ ┃ ┣ 📂 v1.0 ┃ ┃ ┃ ┃ ┗ 📜 <module-slug>.js ┃ ┃ ┃ ┗ 📂 ... ┃ ┃ ┗ 📜 <module-slug>.js ┃ ┗ 📂 ... ┣ 📂 processes ┃ ┣ 📂 <javascript-process-slug> ┃ ┃ ┣ 📜 README.md ┃ ┃ ┣ 📜 index.js ┃ ┃ ┣ 📜 parametersSchema.json ┃ ┃ ┗ 📜 parameters.json ┃ ┣ 📂 <python-process-slug> ┃ ┃ ┣ 📜 README.md ┃ ┃ ┣ 📜 main.py ┃ ┃ ┣ 📜 parametersSchema.json ┃ ┃ ┗ 📜 parameters.json ┃ ┣ 📂 <process-slug-with-versions> ┃ ┃ ┣ 📂 versions ┃ ┃ ┃ ┣ 📂 v1.0 ┃ ┃ ┃ ┃ ┣ 📜 README.md ┃ ┃ ┃ ┃ ┣ 📜 index.js ┃ ┃ ┃ ┃ ┣ 📜 parametersSchema.json ┃ ┃ ┃ ┃ ┗ 📜 parameters.json ┃ ┃ ┃ ┗ 📂 ... ┃ ┃ ┣ 📜 README.md ┃ ┃ ┣ 📜 index.js ┃ ┃ ┣ 📜 parametersSchema.json ┃ ┃ ┗ 📜 parameters.json ┃ ┗ 📂 ... ┣ 📜 datastore.json ┣ 📜 variables.env ┣ 📜 variables.local.env ┣ 📜 .gitignore ┗ 📂 .yepcode
- `dependencies`: Dependencies' source code, containing both the python and javascript dependencies. - `package.json`: It will be a json file with the dependencies for the javascript dependencies. Just the content of the dependencies field in any standard package.json file. - `requirements.txt`: Python requirements.txt file with the dependencies for the python dependencies. - `processes`: Processes' source code, with one folder per process, containing process files. - `README.md`: Markdown file with the process description. - `index.js` or `index.py`: Process source code in JavaScript or Python. - `parametersSchema.json`: Parameters schema JSON file. - `parameters.json`: Sample input file dynamically generated. It will be used as default input file in local executions, but you may provide another one. - `versions`: if process has published versions, a new folder will exists and each version folder will have a process replica with the published contents. - `modules`: Modules' source code, with one folder per module, containing the module file. - `versions`: if module has published versions, a new folder will exists and each version folder will have a module replica with the published contents. - `variables.env`: Includes all team variables in .env file format (KEY=VALUE). - `variables.local.env`: Local environment variables that override `variables.env`. - `datastore.json`: YepCode datastore file. - `.gitignore`: Auto generated gitignore file. It will be used if you create a git repo for this directory to ignore sensitive resources (variables .env). - `.yepcode`: YepCode workspace metadata directory.Modules
Section titled “Modules”- Reusable code libraries shared across processes
- Help maintain DRY (Don’t Repeat Yourself) principle
- Support versioning for better code management
Execution Context
Section titled “Execution Context”- Each process runs in an isolated environment
- Has access to:
- Input parameters
- Environment variables
- Execution metadata
- Process information
- Team settings
- Request data (for webhooks)
Team Variables
Section titled “Team Variables”- Key-value pairs available across processes
- Can store sensitive information securely
- Accessible via environment variables or yepcode.env
Datastore
Section titled “Datastore”- Key-value storage system for data persistence
- Share data between process executions
- Available in paid plans with specific limits
- Useful for maintaining state and caching
- Can only store strings or numbers. If you need to store other types of data, you should convert them to strings before storing them.
General Rules
Section titled “General Rules”- Follow the language-specific code style guidelines
- Handle errors appropriately and provide meaningful error messages (errors may be thrown for failed executions)
- Use logging for debugging and tracking execution state
- Validate input parameters when needed
- Use environment variables for sensitive data
- Do not use hardcoded values and suggest to change it to input parameters or to env vars
- Use appropriate status codes for responses