Significant-Gravitas/AutoGPT · error · ValueError

Preset inputs and credentials must be provided together

Error message

Preset inputs and credentials must be provided together

What it means

Error "Preset inputs and credentials must be provided together" thrown in Significant-Gravitas/AutoGPT.

Source

Thrown at autogpt_platform/backend/backend/api/features/library/db.py:2155

        NotFoundError: If attempting to update a non-existent preset.
    """
    current = await get_preset(user_id, preset_id)  # assert ownership
    if not current:
        raise NotFoundError(f"Preset #{preset_id} not found for user #{user_id}")
    logger.debug(
        f"Updating preset #{preset_id} ({repr(current.name)}) for user #{user_id}",
    )
    async with transaction() as tx:
        update_data: prisma.types.AgentPresetUpdateInput = {}
        if name:
            update_data["name"] = name
        if description:
            update_data["description"] = description
        if is_active is not None:
            update_data["isActive"] = is_active
        if inputs or credentials:
            if not (inputs and credentials):
                raise ValueError(
                    "Preset inputs and credentials must be provided together"
                )
            update_data["InputPresets"] = {
                "create": [
                    prisma.types.AgentNodeExecutionInputOutputCreateWithoutRelationsInput(  # noqa
                        name=name, data=SafeJson(data)
                    )
                    for name, data in {
                        **inputs,
                        **{
                            key: creds_meta.model_dump(exclude_none=True)
                            for key, creds_meta in credentials.items()
                        },
                    }.items()
                ],
            }
            # Existing InputPresets must be deleted, in a separate query
            await prisma.models.AgentNodeExecutionInputOutput.prisma(tx).delete_many(

View on GitHub (pinned to 9c8bb5550f)

Solutions

  1. Provide both inputs and credentials, or neither, in the preset request.
  2. Fix the client to send a complete preset payload.

When it happens

Trigger: Thrown at autogpt_platform/backend/backend/api/features/library/db.py:2155 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14). Data as JSON: /api/errors/2a9d502eb5a4daf5. Report an issue: GitHub.