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.
feat(platform): Add instructions field to agent submissions (#10931)
Zamil Majdy33679f3ffe93
diff --git a/autogpt_platform/backend/backend/data/graph.py b/autogpt_platform/backend/backend/data/graph.pyindex 68c57b9b64..7e69667d4c 100644--- a/autogpt_platform/backend/backend/data/graph.py+++ b/autogpt_platform/backend/backend/data/graph.py@@ -161,6 +161,7 @@ class BaseGraph(BaseDbModel):is_active: bool = Truename: strdescription: str+ instructions: str | None = Nonerecommended_schedule_cron: str | None = Nonenodes: list[Node] = []links: list[Link] = []@@ -705,6 +706,7 @@ class GraphModel(Graph):is_active=graph.isActive,name=graph.name or "",description=graph.description or "",+ instructions=graph.instructions,recommended_schedule_cron=graph.recommendedScheduleCron,nodes=[NodeModel.from_db(node, for_export) for node in graph.Nodes or []],links=list(diff --git a/autogpt_platform/backend/backend/server/v2/library/model.py b/autogpt_platform/backend/backend/server/v2/library/model.pyindex 19c67594d2..f4c1a35177 100644--- a/autogpt_platform/backend/backend/server/v2/library/model.py+++ b/autogpt_platform/backend/backend/server/v2/library/model.py@@ -43,6 +43,7 @@ class LibraryAgent(pydantic.BaseModel):name: strdescription: str+ instructions: str | None = Noneinput_schema: dict[str, Any] # Should be BlockIOObjectSubSchema in frontendoutput_schema: dict[str, Any]@@ -126,6 +127,7 @@ class LibraryAgent(pydantic.BaseModel):updated_at=updated_at,name=graph.name,description=graph.description,+ instructions=graph.instructions,input_schema=graph.input_schema,output_schema=graph.output_schema,credentials_input_schema=(diff --git a/autogpt_platform/backend/backend/server/v2/store/db.py b/autogpt_platform/backend/backend/server/v2/store/db.pyindex 62b17b6083..43bd03488e 100644--- a/autogpt_platform/backend/backend/server/v2/store/db.py+++ b/autogpt_platform/backend/backend/server/v2/store/db.py@@ -499,6 +499,7 @@ async def get_store_submissions(sub_heading=sub.sub_heading,slug=sub.slug,description=sub.description,+ instructions=getattr(sub, "instructions", None),image_urls=sub.image_urls or [],date_submitted=sub.date_submitted or datetime.now(tz=timezone.utc),status=sub.status,@@ -590,6 +591,7 @@ async def create_store_submission(video_url: str | None = None,image_urls: list[str] = [],description: str = "",+ instructions: str | None = None,sub_heading: str = "",categories: list[str] = [],changes_summary: str | None = "Initial Submission",@@ -661,6 +663,7 @@ async def create_store_submission(video_url=video_url,image_urls=image_urls,description=description,+ instructions=instructions,sub_heading=sub_heading,categories=categories,changes_summary=changes_summary,@@ -682,6 +685,7 @@ async def create_store_submission(videoUrl=video_url,imageUrls=image_urls,description=description,+ instructions=instructions,categories=categories,subHeading=sub_heading,submissionStatus=prisma.enums.SubmissionStatus.PENDING,@@ -712,6 +716,7 @@ async def create_store_submission(slug=slug,sub_heading=sub_heading,description=description,+ instructions=instructions,image_urls=image_urls,date_submitted=listing.createdAt,status=prisma.enums.SubmissionStatus.PENDING,@@ -744,6 +749,7 @@ async def edit_store_submission(categories: list[str] = [],changes_summary: str | None = "Update submission",recommended_schedule_cron: str | None = None,+ instructions: str | None = None,) -> backend.server.v2.store.model.StoreSubmission:"""Edit an existing store listing submission.@@ -824,6 +830,7 @@ async def edit_store_submission(categories=categories,changes_summary=changes_summary,recommended_schedule_cron=recommended_schedule_cron,+ instructions=instructions,)# For PENDING submissions, we can update the existing version@@ -840,6 +847,7 @@ async def edit_store_submission(subHeading=sub_heading,changesSummary=changes_summary,recommendedScheduleCron=recommended_schedule_cron,+ instructions=instructions,),)@@ -858,6 +866,7 @@ async def edit_store_submission(sub_heading=sub_heading,slug=current_version.StoreListing.slug,description=description,+ instructions=instructions,image_urls=image_urls,date_submitted=updated_version.submittedAt or updated_version.createdAt,status=updated_version.submissionStatus,@@ -899,6 +908,7 @@ async def create_store_version(video_url: str | None = None,image_urls: list[str] = [],description: str = "",+ instructions: str | None = None,sub_heading: str = "",categories: list[str] = [],changes_summary: str | None = "Initial submission",@@ -967,6 +977,7 @@ async def create_store_version(videoUrl=video_url,imageUrls=image_urls,description=description,+ instructions=instructions,categories=categories,subHeading=sub_heading,submissionStatus=prisma.enums.SubmissionStatus.PENDING,@@ -988,6 +999,7 @@ async def create_store_version(slug=listing.slug,sub_heading=sub_heading,description=description,+ instructions=instructions,image_urls=image_urls,date_submitted=datetime.now(),status=prisma.enums.SubmissionStatus.PENDING,@@ -1415,6 +1427,7 @@ async def review_store_submission("name": store_listing_version.name,"description": store_listing_version.description,"recommendedScheduleCron": store_listing_version.recommendedScheduleCron,+ "instructions": store_listing_version.instructions,},)@@ -1580,6 +1593,7 @@ async def review_store_submission(else ""),description=submission.description,+ instructions=submission.instructions,image_urls=submission.imageUrls or [],date_submitted=submission.submittedAt or submission.createdAt,status=submission.submissionStatus,@@ -1715,6 +1729,7 @@ async def get_admin_listings_with_versions(sub_heading=version.subHeading,slug=listing.slug,description=version.description,+ instructions=version.instructions,image_urls=version.imageUrls or [],date_submitted=version.submittedAt or version.createdAt,status=version.submissionStatus,diff --git a/autogpt_platform/backend/backend/server/v2/store/model.py b/autogpt_platform/backend/backend/server/v2/store/model.pyindex 2371d9f02d..ce2aabaa28 100644--- a/autogpt_platform/backend/backend/server/v2/store/model.py+++ b/autogpt_platform/backend/backend/server/v2/store/model.py@@ -49,6 +49,7 @@ class StoreAgentDetails(pydantic.BaseModel):creator_avatar: strsub_heading: strdescription: str+ instructions: str | None = Nonecategories: list[str]runs: intrating: float@@ -103,6 +104,7 @@ class StoreSubmission(pydantic.BaseModel):sub_heading: strslug: strdescription: str+ instructions: str | None = Noneimage_urls: list[str]date_submitted: datetime.datetimestatus: prisma.enums.SubmissionStatus@@ -157,6 +159,7 @@ class StoreSubmissionRequest(pydantic.BaseModel):video_url: str | None = Noneimage_urls: list[str] = []description: str = ""+ instructions: str | None = Nonecategories: list[str] = []changes_summary: str | None = Nonerecommended_schedule_cron: str | None = None@@ -168,6 +171,7 @@ class StoreSubmissionEditRequest(pydantic.BaseModel):video_url: str | None = Noneimage_urls: list[str] = []description: str = ""+ instructions: str | None = Nonecategories: list[str] = []changes_summary: str | None = Nonerecommended_schedule_cron: str | None = Nonediff --git a/autogpt_platform/backend/backend/server/v2/store/routes.py b/autogpt_platform/backend/backend/server/v2/store/routes.pyindex 7a6fd1bea9..770ebad6e6 100644--- a/autogpt_platform/backend/backend/server/v2/store/routes.py+++ b/autogpt_platform/backend/backend/server/v2/store/routes.py@@ -532,6 +532,7 @@ async def create_submission(video_url=submission_request.video_url,image_urls=submission_request.image_urls,description=submission_request.description,+ instructions=submission_request.instructions,sub_heading=submission_request.sub_heading,categories=submission_request.categories,changes_summary=submission_request.changes_summary or "Initial Submission",@@ -578,6 +579,7 @@ async def edit_submission(video_url=submission_request.video_url,image_urls=submission_request.image_urls,description=submission_request.description,+ instructions=submission_request.instructions,sub_heading=submission_request.sub_heading,categories=submission_request.categories,changes_summary=submission_request.changes_summary,diff --git a/autogpt_platform/backend/migrations/20250916193100_add_instructions_field/migration.sql b/autogpt_platform/backend/migrations/20250916193100_add_instructions_field/migration.sqlnew file mode 100644index 0000000000..cb70134ff2--- /dev/null+++ b/autogpt_platform/backend/migrations/20250916193100_add_instructions_field/migration.sql@@ -0,0 +1,53 @@+-- Add instructions field to AgentGraph and StoreListingVersion tables and update StoreSubmission view++BEGIN;++-- AddColumn+ALTER TABLE "AgentGraph" ADD COLUMN "instructions" TEXT;++-- AddColumn+ALTER TABLE "StoreListingVersion" ADD COLUMN "instructions" TEXT;++-- Drop the existing view+DROP VIEW IF EXISTS "StoreSubmission";++-- Recreate the view with the new instructions field+CREATE VIEW "StoreSubmission" AS+SELECT+ sl.id AS listing_id,+ sl."owningUserId" AS user_id,+ slv."agentGraphId" AS agent_id,+ slv.version AS agent_version,+ sl.slug,+ COALESCE(slv.name, '') AS name,+ slv."subHeading" AS sub_heading,+ slv.description,+ slv.instructions,+ slv."imageUrls" AS image_urls,+ slv."submittedAt" AS date_submitted,+ slv."submissionStatus" AS status,+ COALESCE(ar.run_count, 0::bigint) AS runs,+ COALESCE(avg(sr.score::numeric), 0.0)::double precision AS rating,+ slv.id AS store_listing_version_id,+ slv."reviewerId" AS reviewer_id,+ slv."reviewComments" AS review_comments,+ slv."internalComments" AS internal_comments,+ slv."reviewedAt" AS reviewed_at,+ slv."changesSummary" AS changes_summary,+ slv."videoUrl" AS video_url,+ slv.categories+FROM "StoreListing" sl+ JOIN "StoreListingVersion" slv ON slv."storeListingId" = sl.id+ LEFT JOIN "StoreListingReview" sr ON sr."storeListingVersionId" = slv.id+ LEFT JOIN (+ SELECT "AgentGraphExecution"."agentGraphId", count(*) AS run_count+ FROM "AgentGraphExecution"+ GROUP BY "AgentGraphExecution"."agentGraphId"+ ) ar ON ar."agentGraphId" = slv."agentGraphId"+WHERE sl."isDeleted" = false+GROUP BY sl.id, sl."owningUserId", slv.id, slv."agentGraphId", slv.version, sl.slug, slv.name,+ slv."subHeading", slv.description, slv.instructions, slv."imageUrls", slv."submittedAt",+ slv."submissionStatus", slv."reviewerId", slv."reviewComments", slv."internalComments",+ slv."reviewedAt", slv."changesSummary", slv."videoUrl", slv.categories, ar.run_count;++COMMIT;diff --git a/autogpt_platform/backend/schema.prisma b/autogpt_platform/backend/schema.prismaindex 48eae403d0..f48cf62ed1 100644--- a/autogpt_platform/backend/schema.prisma+++ b/autogpt_platform/backend/schema.prisma@@ -110,6 +110,7 @@ model AgentGraph {name String?description String?+ instructions String?recommendedScheduleCron String?isActive Boolean @default(true)@@ -757,6 +758,7 @@ model StoreListingVersion {videoUrl String?imageUrls String[]description String+ instructions String?categories String[]isFeatured Boolean @default(false)diff --git a/autogpt_platform/backend/snapshots/agt_details b/autogpt_platform/backend/snapshots/agt_detailsindex f62d013a50..0718ccab5d 100644--- a/autogpt_platform/backend/snapshots/agt_details+++ b/autogpt_platform/backend/snapshots/agt_details@@ -11,6 +11,7 @@"creator_avatar": "avatar1.jpg","sub_heading": "Test agent subheading","description": "Test agent description",+ "instructions": null,"categories": ["category1","category2"diff --git a/autogpt_platform/backend/snapshots/grph_single b/autogpt_platform/backend/snapshots/grph_singleindex 98fe6a0cf0..9c56c9bd07 100644--- a/autogpt_platform/backend/snapshots/grph_single+++ b/autogpt_platform/backend/snapshots/grph_single@@ -15,6 +15,7 @@"required": [],"type": "object"},+ "instructions": null,"is_active": true,"links": [],"name": "Test Graph",diff --git a/autogpt_platform/backend/snapshots/grphs_all b/autogpt_platform/backend/snapshots/grphs_allindex 102878391b..d023a2b1ea 100644--- a/autogpt_platform/backend/snapshots/grphs_all+++ b/autogpt_platform/backend/snapshots/grphs_all@@ -15,6 +15,7 @@"required": [],"type": "object"},+ "instructions": null,"is_active": true,"name": "Test Graph","output_schema": {diff --git a/autogpt_platform/backend/snapshots/lib_agts_search b/autogpt_platform/backend/snapshots/lib_agts_searchindex 0b8198e923..4da74a6ab4 100644--- a/autogpt_platform/backend/snapshots/lib_agts_search+++ b/autogpt_platform/backend/snapshots/lib_agts_search@@ -11,6 +11,7 @@"updated_at": "2023-01-01T00:00:00","name": "Test Agent 1","description": "Test Description 1",+ "instructions": null,"input_schema": {"type": "object","properties": {}@@ -42,6 +43,7 @@"updated_at": "2023-01-01T00:00:00","name": "Test Agent 2","description": "Test Description 2",+ "instructions": null,"input_schema": {"type": "object","properties": {}diff --git a/autogpt_platform/backend/snapshots/sub_success b/autogpt_platform/backend/snapshots/sub_successindex 5f46f4a434..a3816c4384 100644--- a/autogpt_platform/backend/snapshots/sub_success+++ b/autogpt_platform/backend/snapshots/sub_success@@ -7,6 +7,7 @@"sub_heading": "Test agent subheading","slug": "test-agent","description": "Test agent description",+ "instructions": null,"image_urls": ["test.jpg"],diff --git a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/AgentRunsView.tsx b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/AgentRunsView.tsxindex c7c59378d2..38ed01ddc6 100644--- a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/AgentRunsView.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/AgentRunsView.tsx@@ -65,6 +65,7 @@ export function AgentRunsView() {}/></div>+<RunsSidebaragent={agent}selectedRunId={selectedRun}diff --git a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/RunAgentModal/components/ModalHeader/ModalHeader.tsx b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/RunAgentModal/components/ModalHeader/ModalHeader.tsxindex 570bd44170..527475fe2f 100644--- a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/RunAgentModal/components/ModalHeader/ModalHeader.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/RunAgentModal/components/ModalHeader/ModalHeader.tsx@@ -2,6 +2,8 @@ import { Badge } from "@/components/atoms/Badge/Badge";import { LibraryAgent } from "@/app/api/__generated__/models/libraryAgent";import { Text } from "@/components/atoms/Text/Text";import { ShowMoreText } from "@/components/molecules/ShowMoreText/ShowMoreText";+import { ClockIcon, InfoIcon } from "@phosphor-icons/react";+import { humanizeCronExpression } from "@/lib/cron-expression-utils";interface ModalHeaderProps {agent: LibraryAgent;@@ -9,6 +11,7 @@ interface ModalHeaderProps {export function ModalHeader({ agent }: ModalHeaderProps) {const isUnknownCreator = agent.creator_name === "Unknown";+return (<div className="space-y-4"><div className="flex items-center gap-3">@@ -26,6 +29,30 @@ export function ModalHeader({ agent }: ModalHeaderProps) {>{agent.description}</ShowMoreText>++ {/* Schedule recommendation tip */}+ {agent.recommended_schedule_cron && !agent.has_external_trigger && (+ <div className="mt-4 flex items-center gap-2">+ <ClockIcon className="h-4 w-4 text-gray-500" />+ <p className="text-sm text-gray-600">+ <strong>Tip:</strong> For best results, run this agent{" "}+ {humanizeCronExpression(+ agent.recommended_schedule_cron,+ ).toLowerCase()}+ </p>+ </div>+ )}++ {/* Setup Instructions */}+ {agent.instructions && (+ <div className="mt-4 flex items-start gap-2">+ <InfoIcon className="mt-0.5 h-4 w-4 flex-shrink-0 text-gray-500" />+ <div className="text-sm text-gray-600">+ <strong>Setup Instructions:</strong>{" "}+ <span className="whitespace-pre-wrap">{agent.instructions}</span>+ </div>+ </div>+ )}</div></div>);diff --git a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/RunAgentModal/components/ModalRunSection/ModalRunSection.tsxindex 2a22b8c4ac..f7bd3dbf3f 100644--- a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx@@ -4,6 +4,7 @@ import SchemaTooltip from "@/components/SchemaTooltip";import { CredentialsInput } from "@/app/(platform)/library/agents/[id]/components/AgentRunsView/components/CredentialsInputs/CredentialsInputs";import { useRunAgentModalContext } from "../../context";import { RunAgentInputs } from "../../../RunAgentInputs/RunAgentInputs";+import { InfoIcon } from "@phosphor-icons/react";import { Text } from "@/components/atoms/Text/Text";import { toDisplayName } from "@/components/integrations/helper";import { getCredentialTypeDisplayName } from "./helpers";@@ -64,6 +65,21 @@ export function ModalRunSection() {</div>)}+ {/* Instructions */}+ {agent.instructions && (+ <div className="mb-4 flex items-start gap-2 rounded-md border border-blue-200 bg-blue-50 p-3">+ <InfoIcon className="mt-0.5 h-4 w-4 text-blue-600" />+ <div>+ <h4 className="text-sm font-medium text-blue-900">+ How to use this agent+ </h4>+ <p className="mt-1 whitespace-pre-wrap text-sm text-blue-800">+ {agent.instructions}+ </p>+ </div>+ </div>+ )}+{/* Credentials inputs */}{Object.entries(agentCredentialsInputFields || {}).map(([key, inputSubSchema]) => (diff --git a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/OldAgentLibraryView/components/agent-run-draft-view.tsx b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/OldAgentLibraryView/components/agent-run-draft-view.tsxindex a479a5e8f1..995214424c 100644--- a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/OldAgentLibraryView/components/agent-run-draft-view.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/OldAgentLibraryView/components/agent-run-draft-view.tsx@@ -16,7 +16,8 @@ import ActionButtonGroup from "@/components/agptui/action-button-group";import type { ButtonAction } from "@/components/agptui/types";import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";import { IconCross, IconPlay, IconSave } from "@/components/ui/icons";-import { CalendarClockIcon, Trash2Icon, ClockIcon } from "lucide-react";+import { CalendarClockIcon, Trash2Icon } from "lucide-react";+import { ClockIcon, InfoIcon } from "@phosphor-icons/react";import { humanizeCronExpression } from "@/lib/cron-expression-utils";import { ScheduleTaskDialog } from "@/components/cron-scheduler-dialog";import { CredentialsInput } from "@/app/(platform)/library/agents/[id]/components/AgentRunsView/components/CredentialsInputs/CredentialsInputs";@@ -587,6 +588,19 @@ export function AgentRunDraftView({</div>)}+ {/* Setup Instructions */}+ {graph.instructions && (+ <div className="flex items-start gap-2 rounded-md border border-violet-200 bg-violet-50 p-3">+ <InfoIcon className="mt-0.5 h-4 w-4 flex-shrink-0 text-violet-600" />+ <div className="text-sm text-violet-800">+ <strong>Setup Instructions:</strong>{" "}+ <span className="whitespace-pre-wrap">+ {graph.instructions}+ </span>+ </div>+ </div>+ )}+{(agentPreset || graph.has_external_trigger) && (<>{/* Preset name and description */}diff --git a/autogpt_platform/frontend/src/app/api/openapi.json b/autogpt_platform/frontend/src/app/api/openapi.jsonindex e6b5eba9db..770a5890d3 100644--- a/autogpt_platform/frontend/src/app/api/openapi.json+++ b/autogpt_platform/frontend/src/app/api/openapi.json@@ -4713,6 +4713,10 @@},"name": { "type": "string", "title": "Name" },"description": { "type": "string", "title": "Description" },+ "instructions": {+ "anyOf": [{ "type": "string" }, { "type": "null" }],+ "title": "Instructions"+ },"recommended_schedule_cron": {"anyOf": [{ "type": "string" }, { "type": "null" }],"title": "Recommended Schedule Cron"@@ -4753,6 +4757,10 @@},"name": { "type": "string", "title": "Name" },"description": { "type": "string", "title": "Description" },+ "instructions": {+ "anyOf": [{ "type": "string" }, { "type": "null" }],+ "title": "Instructions"+ },"recommended_schedule_cron": {"anyOf": [{ "type": "string" }, { "type": "null" }],"title": "Recommended Schedule Cron"@@ -5292,6 +5300,10 @@},"name": { "type": "string", "title": "Name" },"description": { "type": "string", "title": "Description" },+ "instructions": {+ "anyOf": [{ "type": "string" }, { "type": "null" }],+ "title": "Instructions"+ },"recommended_schedule_cron": {"anyOf": [{ "type": "string" }, { "type": "null" }],"title": "Recommended Schedule Cron"@@ -5638,6 +5650,10 @@},"name": { "type": "string", "title": "Name" },"description": { "type": "string", "title": "Description" },+ "instructions": {+ "anyOf": [{ "type": "string" }, { "type": "null" }],+ "title": "Instructions"+ },"recommended_schedule_cron": {"anyOf": [{ "type": "string" }, { "type": "null" }],"title": "Recommended Schedule Cron"@@ -5712,6 +5728,10 @@},"name": { "type": "string", "title": "Name" },"description": { "type": "string", "title": "Description" },+ "instructions": {+ "anyOf": [{ "type": "string" }, { "type": "null" }],+ "title": "Instructions"+ },"recommended_schedule_cron": {"anyOf": [{ "type": "string" }, { "type": "null" }],"title": "Recommended Schedule Cron"@@ -5912,6 +5932,10 @@},"name": { "type": "string", "title": "Name" },"description": { "type": "string", "title": "Description" },+ "instructions": {+ "anyOf": [{ "type": "string" }, { "type": "null" }],+ "title": "Instructions"+ },"input_schema": {"additionalProperties": true,"type": "object",@@ -7335,6 +7359,10 @@"creator_avatar": { "type": "string", "title": "Creator Avatar" },"sub_heading": { "type": "string", "title": "Sub Heading" },"description": { "type": "string", "title": "Description" },+ "instructions": {+ "anyOf": [{ "type": "string" }, { "type": "null" }],+ "title": "Instructions"+ },"categories": {"items": { "type": "string" },"type": "array",@@ -7487,6 +7515,10 @@"sub_heading": { "type": "string", "title": "Sub Heading" },"slug": { "type": "string", "title": "Slug" },"description": { "type": "string", "title": "Description" },+ "instructions": {+ "anyOf": [{ "type": "string" }, { "type": "null" }],+ "title": "Instructions"+ },"image_urls": {"items": { "type": "string" },"type": "array",@@ -7577,6 +7609,10 @@"title": "Description","default": ""},+ "instructions": {+ "anyOf": [{ "type": "string" }, { "type": "null" }],+ "title": "Instructions"+ },"categories": {"items": { "type": "string" },"type": "array",@@ -7618,6 +7654,10 @@"title": "Description","default": ""},+ "instructions": {+ "anyOf": [{ "type": "string" }, { "type": "null" }],+ "title": "Instructions"+ },"categories": {"items": { "type": "string" },"type": "array",diff --git a/autogpt_platform/frontend/src/components/contextual/PublishAgentModal/components/AgentInfoStep/AgentInfoStep.tsx b/autogpt_platform/frontend/src/components/contextual/PublishAgentModal/components/AgentInfoStep/AgentInfoStep.tsxindex 5d579c26e5..d7a09390d2 100644--- a/autogpt_platform/frontend/src/components/contextual/PublishAgentModal/components/AgentInfoStep/AgentInfoStep.tsx+++ b/autogpt_platform/frontend/src/components/contextual/PublishAgentModal/components/AgentInfoStep/AgentInfoStep.tsx@@ -163,6 +163,21 @@ export function AgentInfoStep({)}/>+ <FormField+ control={form.control}+ name="instructions"+ render={({ field }) => (+ <Input+ id={field.name}+ label="Instructions"+ type="textarea"+ placeholder="Explain to users how to run this agent and what to expect"+ error={form.formState.errors.instructions?.message}+ {...field}+ />+ )}+ />+<FormFieldcontrol={form.control}name="recommendedScheduleCron"diff --git a/autogpt_platform/frontend/src/components/contextual/PublishAgentModal/components/AgentInfoStep/helpers.ts b/autogpt_platform/frontend/src/components/contextual/PublishAgentModal/components/AgentInfoStep/helpers.tsindex 3f00e97e3a..9d7fe46962 100644--- a/autogpt_platform/frontend/src/components/contextual/PublishAgentModal/components/AgentInfoStep/helpers.ts+++ b/autogpt_platform/frontend/src/components/contextual/PublishAgentModal/components/AgentInfoStep/helpers.ts@@ -41,6 +41,13 @@ export const publishAgentSchema = z.object({.min(1, "Description is required").max(1000, "Description must be less than 1000 characters"),recommendedScheduleCron: z.string().optional(),+ instructions: z+ .string()+ .optional()+ .refine(+ (val) => !val || val.length <= 2000,+ "Instructions must be less than 2000 characters",+ ),});export type PublishAgentFormData = z.infer<typeof publishAgentSchema>;@@ -56,4 +63,5 @@ export interface PublishAgentInfoInitialData {description: string;additionalImages?: string[];recommendedScheduleCron?: string;+ instructions?: string;}diff --git a/autogpt_platform/frontend/src/components/contextual/PublishAgentModal/components/AgentInfoStep/useAgentInfoStep.ts b/autogpt_platform/frontend/src/components/contextual/PublishAgentModal/components/AgentInfoStep/useAgentInfoStep.tsindex 4682b6d506..7f42951e65 100644--- a/autogpt_platform/frontend/src/components/contextual/PublishAgentModal/components/AgentInfoStep/useAgentInfoStep.ts+++ b/autogpt_platform/frontend/src/components/contextual/PublishAgentModal/components/AgentInfoStep/useAgentInfoStep.ts@@ -45,6 +45,7 @@ export function useAgentInfoStep({category: "",description: "",recommendedScheduleCron: "",+ instructions: "",},});@@ -66,6 +67,7 @@ export function useAgentInfoStep({category: initialData.category,description: initialData.description,recommendedScheduleCron: initialData.recommendedScheduleCron || "",+ instructions: initialData.instructions || "",});}}, [initialData, form]);@@ -94,6 +96,7 @@ export function useAgentInfoStep({name: data.title,sub_heading: data.subheader,description: data.description,+ instructions: data.instructions || null,image_urls: images,video_url: data.youtubeLink || "",agent_id: selectedAgentId || "",diff --git a/autogpt_platform/frontend/src/lib/autogpt-server-api/types.ts b/autogpt_platform/frontend/src/lib/autogpt-server-api/types.tsindex 46f2fa2d1a..ca5f1e9a02 100644--- a/autogpt_platform/frontend/src/lib/autogpt-server-api/types.ts+++ b/autogpt_platform/frontend/src/lib/autogpt-server-api/types.ts@@ -298,6 +298,7 @@ export type GraphMeta = {is_active: boolean;name: string;description: string;+ instructions?: string | null;recommended_schedule_cron: string | null;forked_from_id?: GraphID | null;forked_from_version?: number | null;@@ -428,6 +429,7 @@ export type LibraryAgent = {updated_at: Date;name: string;description: string;+ instructions?: string | null;input_schema: GraphIOSchema;output_schema: GraphIOSchema;credentials_input_schema: CredentialsInputSchema;@@ -746,6 +748,7 @@ export type StoreSubmission = {name: string;sub_heading: string;description: string;+ instructions?: string;image_urls: string[];date_submitted: string;status: SubmissionStatus;@@ -777,6 +780,7 @@ export type StoreSubmissionRequest = {video_url?: string;image_urls: string[];description: string;+ instructions?: string | null;categories: string[];changes_summary?: string;recommended_schedule_cron?: string | null;