AutoGPT/autogpt_platform/backend/test
Abhimanyu Yadav 0872da1969
fix(store) : Download agent from store if user is not logged in (#9121)
- resolves - #9120 

### Changes 

- Added a new endpoint to download agent files as JSON, allowing users
to retrieve agent data by store listing version ID and version number.
- Introduced a new `get_agent` function in the database module to fetch
agent details and prepare the graph data for download.
- Enhanced the frontend `AgentInfo` component to include a download
button, which triggers the download of the agent file.
- Integrated loading state and user feedback via toast notifications
during the download process.
- Updated the API client to support the new download functionality.

### Demo video 



https://github.com/user-attachments/assets/6744a753-297f-4ccc-abde-f56ca24ed2d5

### Example Json

```json
{
  "id": "14378095-4cc5-41ea-975e-bd0bce010bea",
  "version": 1,
  "is_active": true,
  "is_template": false,
  "name": "something",
  "description": "1",
  "nodes": [
    {
      "id": "6914efa0-e4fa-4ce8-802c-d5577cf061b6",
      "block_id": "aeb08fc1-2fc1-4141-bc8e-f758f183a822",
      "input_default": {},
      "metadata": {
        "position": {
          "x": 756,
          "y": 452.5
        }
      },
      "input_links": [],
      "output_links": [],
      "webhook_id": null,
      "graph_id": "14378095-4cc5-41ea-975e-bd0bce010bea",
      "graph_version": 1,
      "webhook": null
    }
  ],
  "links": [],
  "input_schema": {
    "type": "object",
    "properties": {},
    "required": []
  },
  "output_schema": {
    "type": "object",
    "properties": {},
    "required": []
  }
}
```

---------

Co-authored-by: SwiftyOS <craigswift13@gmail.com>
2025-01-03 17:21:15 +00:00
..
block feat(backend): Track LLM token usage + LLM blocks cleanup (#8367) 2024-10-22 18:13:27 -05:00
data fix(store) : Download agent from store if user is not logged in (#9121) 2025-01-03 17:21:15 +00:00
executor chore(platform):Refactor GraphExecution naming clash and remove unused Graph Execution functions (#8939) 2024-12-11 15:41:15 +00:00
server feat(platform): Introduced Agent Execution Block (#8533) 2024-11-12 13:03:15 +07:00
util fix(backend): Add stricter URL validation for block requests (#8890) 2024-12-06 04:21:24 +00:00
__init__.py fix(platform): Enable auth on local-backend mode by default (#8405) 2024-10-23 03:39:15 +00:00
conftest.py refactor(platform/rest): Update REST API to use standard FastAPI structure (#8519) 2024-11-04 18:12:21 +07:00
test_data_creator.py feat(platform): Agent Store V2 (#8874) 2024-12-13 16:35:02 +00:00