AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(frontend): Fix onboarding agent execution (#9822)
Krzysztof Czerwinskid1730d7b1d1a
diff --git a/autogpt_platform/frontend/src/app/onboarding/5-run/page.tsx b/autogpt_platform/frontend/src/app/onboarding/5-run/page.tsxindex 667217c6de..4a8e0f8bd2 100644--- a/autogpt_platform/frontend/src/app/onboarding/5-run/page.tsx+++ b/autogpt_platform/frontend/src/app/onboarding/5-run/page.tsx@@ -80,18 +80,23 @@ export default function Page() {if (!agent) {return;}- api.addMarketplaceAgentToLibrary(- storeAgent?.store_listing_version_id || "",- );api- .executeGraph(agent.id, agent.version, state?.agentInput || {})- .then(({ graph_exec_id }) => {- updateState({- onboardingAgentExecutionId: graph_exec_id,- });- router.push("/onboarding/6-congrats");+ .addMarketplaceAgentToLibrary(storeAgent?.store_listing_version_id || "")+ .then((libraryAgent) => {+ api+ .executeGraph(+ libraryAgent.graph_id,+ libraryAgent.graph_version,+ state?.agentInput || {},+ )+ .then(({ graph_exec_id }) => {+ updateState({+ onboardingAgentExecutionId: graph_exec_id,+ });+ router.push("/onboarding/6-congrats");+ });});- }, [api, agent, router, state?.agentInput]);+ }, [api, agent, router, state?.agentInput, storeAgent, updateState]);const runYourAgent = (<div className="ml-[54px] w-[481px] pl-5">