{"id":39703600,"url":"https://github.com/trailheadapps/agent-script-recipes","last_synced_at":"2026-01-18T10:29:55.839Z","repository":{"id":328298641,"uuid":"1112387831","full_name":"trailheadapps/agent-script-recipes","owner":"trailheadapps","description":"A collection of easy-to-digest Agent Script examples.","archived":false,"fork":false,"pushed_at":"2026-01-05T09:12:23.000Z","size":718,"stargazers_count":56,"open_issues_count":9,"forks_count":25,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-06T01:18:38.170Z","etag":null,"topics":["agent","agentforce","script"],"latest_commit_sha":null,"homepage":"https://developer.salesforce.com/sample-apps/agent-script-recipes/getting-started/overview","language":"Apex","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trailheadapps.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-08T14:57:42.000Z","updated_at":"2026-01-05T16:55:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/trailheadapps/agent-script-recipes","commit_stats":null,"previous_names":["trailheadapps/agent-script-recipes"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/trailheadapps/agent-script-recipes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailheadapps%2Fagent-script-recipes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailheadapps%2Fagent-script-recipes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailheadapps%2Fagent-script-recipes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailheadapps%2Fagent-script-recipes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trailheadapps","download_url":"https://codeload.github.com/trailheadapps/agent-script-recipes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailheadapps%2Fagent-script-recipes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28534428,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","agentforce","script"],"created_at":"2026-01-18T10:29:55.736Z","updated_at":"2026-01-18T10:29:55.814Z","avatar_url":"https://github.com/trailheadapps.png","language":"Apex","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agent Script Recipes\n\n[![CI](https://github.com/trailheadapps/agent-script-recipes/actions/workflows/ci.yml/badge.svg)](https://github.com/trailheadapps/agent-script-recipes/actions/workflows/ci.yml)\n\nA collection of easy-to-digest [Agent Script](https://developer.salesforce.com/docs/einstein/genai/guide/agent-script.html) examples. Each recipe demonstrates how to build a specific agent behaviour in the fewest lines of script possible while following best practices. From \"Hello World\" interactions to sophisticated agent transitions, there's a recipe for that!\n\n\u003e [!IMPORTANT]\n\u003e The new Agentforce Builder is a beta service that is subject to the Beta Services Terms at [Agreements - Salesforce.com](https://www.salesforce.com/company/legal/) or your written Unified Pilot Agreement, and applicable terms in the [Product Terms Directory](https://ptd.salesforce.com/?_ga=2.247987783.1372150065.1709219475-629000709.1639001992). Use of this beta service consumes usage types per the [Agentforce and Generative AI Usage and Billing documentation](https://help.salesforce.com/s/articleView?id=ai.generative_ai_usage.htm) and is at the Customer's sole discretion.\n\n## Table of contents\n\n- [Prerequisites](#prerequisites)\n\n- [Installing the app using a Developer Edition Org](#installing-the-app-using-a-developer-edition-org)\n\n- [Optional installation instructions](#optional-installation-instructions)\n\n## Prerequisites\n\nMake sure to review the following prerequisites before installing the app.\n\n### Salesforce CLI Version\n\n\u003e [!IMPORTANT]\n\u003e This project requires Salesforce CLI with version `2.113.6` or greater.\n\n[Install the Salesforce CLI](https://developer.salesforce.com/tools/salesforcecli) or, check that your installed CLI version is greater than `2.113.6` by running `sf -v` in a terminal.\n\nIf you need to [update the Salesforce CLI](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_update_cli.htm), either run `sf update` or `npm install --global @salesforce/cli` depending on how you installed the CLI.\n\n### Feature Activation\n\n1. **Einstein:** Enable Einstein in your org. From **Setup**, search for **Einstein Setup** in Quick Find. Click on that entry and turn on the **Einstein** toggle.\n\n1. **Agentforce:** Enable Agentforce in your org. From **Setup**, search for **Agentforce** in Quick Find. Click on **Agentforce Agents**, and turn on the **Agentforce** toggle.\n\n### User Permissions\n\n**Prompt Template Manager:** Assign yourself the `Prompt Template Manager` permission set. You can either do this from **Setup** or with the Salesforce CLI by running this command:\n\n```bash\nsf org assign permset -n EinsteinGPTPromptTemplateManager\n```\n\n## Installing the app using a Developer Edition Org\n\nIf you don't have an org yet, you can sign up for a free [Developer Edition Org](https://developer.salesforce.com/signup).\n\n\u003e [!IMPORTANT]\n\u003e Make sure to start from a brand-new environment to avoid conflicts with previous work you may have done.\n\n1. Clone this repository:\n\n    ```bash\n    git clone https://github.com/trailheadapps/agent-script-recipes\n    cd agent-script-recipes\n    ```\n\n1. Authorize your Developer Edition org and provide it with an alias (**agent-script-recipes** in the command below):\n\n    ```bash\n    sf org login web -s -a agent-script-recipes\n    ```\n\n1. Deploy the app to your org:\n\n    ```bash\n    sf project deploy start -d force-app\n    ```\n\n1. Assign the `Agent_Script_Recipes_Data` and `Agent_Script_Recipes_App` permission sets to the default user:\n\n    ```bash\n    sf org assign permset -n Agent_Script_Recipes_Data\n    sf org assign permset -n Agent_Script_Recipes_App\n    ```\n\n1. Import some sample data:\n\n    ```bash\n    sf data import tree --plan data/data-plan.json\n    ```\n\n1. Open your org with the **Agentforce Studio** app displayed:\n\n    ```bash\n    sf org open -p \"/lightning/n/standard-AgentforceStudio?c__nav=agents\"\n    ```\n\n\u003e [!TIP]\n\u003e **Agentforce Studio** can be reached from the App Launcher. From there, click **View All** then select the **Agentforce Studio** app.\n\n**Post installation:** when working with the recipes, assign the **Agent Script Recipes Data** permission set to your agent user to avoid access issues.\n\n## Optional Installation Instructions\n\nThis repository contains several files that are relevant if you want to integrate modern web development tools into your Salesforce development processes or into your continuous integration/continuous deployment processes.\n\n### Code formatting\n\n[Prettier](https://prettier.io/) is a code formatter used to ensure consistent formatting across your code base. To use Prettier with Visual Studio Code, install [this extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) from the Visual Studio Code Marketplace. The [.prettierignore](/.prettierignore) and [.prettierrc](/.prettierrc) files are provided as part of this repository to control the behavior of the Prettier formatter.\n\n### Code linting\n\n[ESLint](https://eslint.org/) is a popular JavaScript linting tool used to identify stylistic errors and erroneous constructs. To use ESLint with Visual Studio Code, install [this extension](https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode-lwc) from the Visual Studio Code Marketplace. The [.eslintignore](/.eslintignore) file is provided as part of this repository to exclude specific files from the linting process in the context of Lightning Web Components development.\n\n### Pre-commit hook\n\nThis repository also comes with a [package.json](./package.json) file that makes it easy to set up a pre-commit hook that enforces code formatting and linting by running Prettier and ESLint every time you `git commit` changes.\n\nTo set up the formatting and linting pre-commit hook:\n\n1. Install [Node.js](https://nodejs.org) if you haven't already done so\n1. Run `npm install` in your project's root folder to install the ESLint and Prettier modules (Note: Mac users should verify that Xcode command line tools are installed before running this command.)\n\nPrettier and ESLint will now run automatically every time you commit changes. The commit will fail if linting errors are detected. You can also run the formatting and linting from the command line using the following commands (check out [package.json](./package.json) for the full list):\n\n```bash\nnpm run lint\nnpm run prettier\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailheadapps%2Fagent-script-recipes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrailheadapps%2Fagent-script-recipes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailheadapps%2Fagent-script-recipes/lists"}