Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credential ID Exports into Agent JSON #8919

Closed
Torantulino opened this issue Dec 9, 2024 — with Linear · 0 comments
Closed

Credential ID Exports into Agent JSON #8919

Torantulino opened this issue Dec 9, 2024 — with Linear · 0 comments
Assignees
Labels
bug Something isn't working platform/backend AutoGPT Platform - Back end

Comments

Copy link
Member

Torantulino commented Dec 9, 2024

Steps to reproduce:

1. On account/machine 1, export an agent using your own local credentials (not the shared cloud credentials) 2. (Try to) Import this agent on account/machine

2. It won't import due to the credentials in the Agent JSON being missing from your machine.

Basic Example Agents to reproduce with attached.

        "credentials": {
          "id": "6767232a-3407-4c34-85a3-6887d4969f0c",
          "title": "Anthropic Toran",
          "provider": "anthropic",
          "type": "api_key"
        },

Credentials Export test_v2.json

Credentials Flux Test_v1.json

The above snippet is included in the JSON of exported agents, preventing them from working on machines/accounts where this credential isn't present.

@Torantulino Torantulino added bug Something isn't working platform/frontend AutoGPT Platform - Front end labels Dec 9, 2024 — with Linear
@Torantulino Torantulino removed the platform/frontend AutoGPT Platform - Front end label Dec 9, 2024
@Torantulino Torantulino added the platform/backend AutoGPT Platform - Back end label Dec 9, 2024 — with Linear
@Bentlybro Bentlybro self-assigned this Dec 19, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 19, 2024
…9081)

### Changes 🏗️

This is for [Credential ID Exports into Agent JSON #8919
](#8919)

I have added a new function ``removeCredentials`` into
[``utils.ts``](https://github.com/Significant-Gravitas/AutoGPT/compare/dev...bently/open-2153-credential-id-exports-into-agent-json?expand=1#diff-db26a69e6fb7546dc621634f3c8ee6efa3639e72e02837f753af18b2fdddf7be)
which will go through and look for any "credentials" that are in the
JSON during a agent export, this will then remove them and let the user
download the file.

I have also added the same function to the importing of agents for old
agents that where exported that still contain the credentials, this
means that old agents can be imported with out breaking/causing issues.

When I say it looks for credentials I dont mean actual credentials like
api keys them self, in the JSON that is exported it contains the
following, this needs removing
```
"credentials": {
  "id": "6767232a-3407-4c34-85a3-6887d4969f0c",
  "title": "Anthropic Toran",
  "provider": "anthropic",
  "type": "api_key"
},
```

If there is a better way to go about this let me know!
@github-project-automation github-project-automation bot moved this to Done in Frontend Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform/backend AutoGPT Platform - Back end
Projects
Status: Done
Development

No branches or pull requests

2 participants