Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion autogpt_platform/backend/backend/server/v2/library/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ async def add_store_agent_to_library(
)
return library_model.LibraryAgent.from_db(existing_library_agent)

# Create LibraryAgent entry
# Create LibraryAgent entry with marketplace name/description
added_agent = await prisma.models.LibraryAgent.prisma().create(
data={
"User": {"connect": {"id": user_id}},
Expand All @@ -714,6 +714,9 @@ async def add_store_agent_to_library(
"graphVersionId": {"id": graph.id, "version": graph.version}
}
},
"name": store_listing_version.name, # Use marketplace name
# Use marketplace description
"description": store_listing_version.description,
"isCreatedByUser": False,
},
include=library_agent_include(
Expand Down
8 changes: 6 additions & 2 deletions autogpt_platform/backend/backend/server/v2/library/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,12 @@ def from_db(
creator_image_url=creator_image_url,
status=status,
updated_at=updated_at,
name=graph.name,
description=graph.description,
# Use custom name/description if set (e.g., from marketplace),
# otherwise fall back to graph's name/description
name=agent.name if agent.name else graph.name,
description=(
agent.description if agent.description else graph.description
),
instructions=graph.instructions,
input_schema=graph.input_schema,
output_schema=graph.output_schema,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- AlterTable
ALTER TABLE "platform"."LibraryAgent" ADD COLUMN "name" TEXT,
ADD COLUMN "description" TEXT;

-- AddComment
COMMENT ON COLUMN "platform"."LibraryAgent"."name" IS 'Optional custom name override (e.g., from marketplace). If set, takes precedence over AgentGraph name.';
COMMENT ON COLUMN "platform"."LibraryAgent"."description" IS 'Optional custom description override (e.g., from marketplace). If set, takes precedence over AgentGraph description.';
5 changes: 5 additions & 0 deletions autogpt_platform/backend/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ model LibraryAgent {

imageUrl String?

// Optional custom name/description override (e.g., from marketplace)
// If set, these take precedence over AgentGraph name/description
name String?
description String?

agentGraphId String
agentGraphVersion Int
AgentGraph AgentGraph @relation(fields: [agentGraphId, agentGraphVersion], references: [id, version], onDelete: Restrict)
Expand Down
Loading