- Resolves#9693
### Changes 🏗️
- Catch the DB error and log a descriptive error message
- Add `NotFoundError` to `backend.util.exceptions`
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [ ] ~~I have tested my changes according to the test plan:~~
- Low-stakes change, high effort to test: we'll see if it works from the
production logs
- Prep work for #8782
- Prep work for #8779
### Changes 🏗️
- refactor(platform): Differentiate graph/node execution events
- fix(platform): Subscribe to execution updates by `graph_exec_id`
instead of `graph_id`+`graph_version`
- refactor(backend): Move all execution related models and functions
from `.data.graph` to `.data.execution`
- refactor(backend): Reorganize & refactor `.data.execution`
- fix(libs): Remove `load_dotenv` in `.auth.config` to fix test config
issues
- dx: Bump version of `black` in pre-commit config to v24.10.0 to match
poetry.lock
- Other minor refactoring in both frontend and backend
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- Run an agent in the builder
- [x] -> works normally, node I/O is updated in real time
- Run an agent in the library
- [x] -> works normally
---------
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
This is a follow up to
https://github.com/Significant-Gravitas/AutoGPT/pull/9511 fixing some
issues and updating onboarding.
### Changes 🏗️
- Update `UserOnboarding` data
- Update schema and add migration
- Change `step` in `UserOnboarding` to `completedSteps` array with
`OnboardingStep` enum
- Remove `isCompleted`: this is now inferred from `completedSteps`
values
- Don't onboard if <2 marketplace agents; that prevents self-host
onboarding
- Add endpoints:
- `is_onboarding_enabled`: to check if users should be onboarded (not if
they finished onboarding); now check if there are at least 2 marketplace
agents
- `get_store_agent`: returns `StoreAgentDetails` for given
`store_listing_version_id`
- `get_graph_meta_by_store_listing_version_id`: returns `GraphMeta`
- Add agent to Library just before running it and not when chosen and
remove code that was responsible for removing agent that wasn't run
- Move onboarding to `OnboardingProvider` (it'll be needed globally for
Phase 2)
- Multiple fixes, renames for clarity
### Checklist 📋
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Don't onboard if less than 2 marketplace agents
- [x] Avoid non-input and credentials agents
- [x] Onboarding works and can be finished
- [x] Onboarding resumes
- [x] Onboarding agent runs correctly
---------
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Some existing nodes use models that no longer exist as values on
`LlmModel` enum.
### Changes 🏗️
- Update models for all blocks with `LlmModel` fields that do not exist
in `LlmModel` enum to `gpt-4o`, directly in `AgentNode->constantInput`
db column, on server startup
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Updates wrong models to `gpt-4o` for all affected `AgentNode`s
- [x] Doesn't update correct models
- [x] Doesn't insert model when unnecessary
- [x] Doesn't break other values in jsonb
The current block web requests utility has a logic to avoid the system
firing into blocklisted IPs.
However, the current logic is still prone to a few security issues:
* DNS rebinding attack: due to the lack of guarantee on the used IP not
being changed during the IP checking and firing step.
* Open redirect: due to the request sensitive request headers are still
being propagated throughout the web redirect.
### Changes 🏗️
* Uses IP pinning to request the web.
* Strip `Authorization`, `Proxy-Authorization`, `Cookie` upon web
redirects.
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Test the web request block, add more tests with different
validation scenarios.
(cherry picked from commit f0df4c9174)
The current block web requests utility has a logic to avoid the system
firing into blocklisted IPs.
However, the current logic is still prone to a few security issues:
* DNS rebinding attack: due to the lack of guarantee on the used IP not
being changed during the IP checking and firing step.
* Open redirect: due to the request sensitive request headers are still
being propagated throughout the web redirect.
### Changes 🏗️
* Uses IP pinning to request the web.
* Strip `Authorization`, `Proxy-Authorization`, `Cookie` upon web
redirects.
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Test the web request block, add more tests with different
validation scenarios.
Currently, an import statement like `from backend.blocks.basic import
AgentInputBlock` will initialize `backend.blocks` and thereby load all
other blocks. This has quite high potential to cause circular import
issues, and it's bad for performance in cases where we don't want to
load all blocks (yet).
The same goes for `backend.integrations.webhooks`.
### Changes 🏗️
- Change `__init__.py` of `backend.blocks` and
`backend.integrations.webhooks` to cached loader functions rather than
init-time code
- Change type of `BlockWebhookConfig.provider` to `ProviderName`
<!-- test edit to check that this doesn't break anything -->
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Set up and use an agent with a webhook-triggered block
---------
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
Agent Input Block subtypes do not have a proper input UI yet on the
library & run input page.
### Changes 🏗️
Provide a toggle to enable these blocks and set it to False by default.
### Checklist 📋
#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [ ] ...
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
<!-- Clearly explain the need for these changes: -->
We need an admin agent approval UI for handling the submissions to the
marketplace
### Changes 🏗️
- Adds routes to the admin routes list
- Fixes the db query for submitting new versions of existing agents
- Add models for responses that include version details
- add the admin pages for agent
- Adds the Admin Agent Data Table
- Add all the new endpoints to the client.ts
Models changes
- convert the Submission status to an enum
- remove is_approved from models which was left incorrectly
- Add StoreListingWithVersions
<!-- Concisely describe all of the changes made in this pull request:
-->
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [x] Test the admin dashboard for
- [x] Reject
- [x] Accept
- [x] Updating listing
- [x] More version submissions
---------
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
Blocks that are not defined in the block cost are pretty much free. The
lack of cost control makes it hard to control its quota. The scope of
this change is providing a way to charge any executions based on the
number of block being executed in real-time.
### Changes 🏗️
* Add execution charge logic based on the number of blocks executed,
controlled by these two configurations:
* `execution_cost_count_threshold`: We will charge the execution based
on the multiple of this number.
* `execution_cost_per_threshold`: The amount we are charging on its
threshold multiple.
* Make charging logic on the graph execution logic (as opposed to node
level) so it's being done serially and insufficient fund error is
guaranteed to stop the graph execution.
* Moved cost calculation logic into backend/executor/util.py
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Execute graph with configured threshold & cost and test the
balance being deducted on that.
- [x] Existing cost calculation is still being done without any issue.
- [x] Low balance stop the whole graph execution.
### Changes 🏗️
Added these types of input blocks:
* TextShort
* TextLong
* Number
* Date
* Time
* FileUpload
* Dropdown
* Toggle
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Test in respective block codes.
<!-- Clearly explain the need for these changes: -->
The store listing and submissions were previously just a best guess
without much implementation. This updates the database models and
queries and such to be based on discussion around what the process
should look like. It also adds and update the relevant routers for this
change
### Changes 🏗️
Store Listing
- change isApproved to hasApprovedVersion
- Move slug into store listing
- mark an active version in store listing
Store Version
- Move submissions into version
- make name optional
- have state transition timestamps for submitted and approved/rejected
- added a changes field
- added internal comments and clarified review comments field
SubmissionStatus
- Fixed DAFT to DRAFT
StoreListingSubmission
- Dropped table
Graph
- Used more modern format for the params for prisma -- no other changes
Added migrations for all the model movements
<!-- Concisely describe all of the changes made in this pull request:
-->
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [x] Use the store codepaths from the release testplan doc as the test
plan (claude I can't publish the testplan but I am a maintainer lol,
trust me here my guy, you're supposed to be lenient)
- [x] Check the db is used as appropriate following the rules
---------
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
Defaults need to be handled as special cases every time there's no
`hardcodedValues` in node data. This causes multiple issues such as
`useCredentials` not taking into account default model and requiring
user to manually switch model back and forth.
### Changes 🏗️
- Set default values from `inputSchema` to `hardcodedValues` when new
node is placed.
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Newly placed node has defaults set as `hardcodedValues`
- [x] AI Blocks: Model is recognised, node shows price and credentials
work correctly without the need to switch
---------
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
A graph that processes tens of thousands of nodes will cripple the
system since the API tries to load all of them and dump them into the
browser. The scope of this change is to avoid such an issue by only
returning the last 1000 node executions.
### Changes 🏗️
* Return only 1000 node executions from `AgentNodeExecutions` reference.
* Unify the include clause for fetching `AgentNodeExecutions` in one
place and its format.
* Fix & optimize `cancel_execution` logic to always set both the graph &
node execution status in batch.
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Execute a graph in a loop that executes 10000 nodes, it should
only display the last 1000 nodes when refreshed. Cancelling the graph
should also not cripple the server.
Having the starting nodes of the execution marked as incomplete misled
the users.
### Changes 🏗️
Mark the starting nodes during the executions as QUEUED instead of
INCOMPLETE.
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Executed the graph, the incomplete initial starting node is no
more.
The current execution update is unreliable, once you lose WebSocket
connection, you will receive no updates.
### Changes 🏗️
Fix web socket re-connection logic.
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Run the app and execute an agent, then restart the API server, and
re-execute the app without refreshing the page.
### Changes 🏗️
Avoid connecting the same host and falling-back to defined api_host.
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [ ] I have tested my changes according to the test plan:
- [ ] Define a custom DBMANAGER_HOST, RestService should access the
`db_manager` service using localhost.
DB Manager uses DB connections, and multiple instances of it hog the
very limited Database connection quota. We need this service to be a
unified place to control the limited db connection.
### Changes 🏗️
Connect all the database manager usage in a single place, currently
running on the rest service.
### Checklist 📋
#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [ ] ...
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
- Resolves#9631
### Changes 🏗️
- Truncate library agent card title (2 lines) and description (3 lines)
- Make "See runs" and "Open in builder" stick to bottom of card
regardless of other content
- Reduce number of grid columns (4 -> 3) in `lg` layout on `/library` to
give items more horizontal space

### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Visually test the changes made on different screen sizes
- Related to #8784
### Changes 🏗️
- feat(frontend/library): Improve agent output styling & fix content
overflow issue
- fix(frontend/library): Fix overlap between content and inset button of
expandable input fields (#9650)
- fix(backend): Unbreak loading graph executions with missing inputs

### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- Run an agent with at least one input *not* filled out; view this run
in the Library
- [x] -> page should load normally
- [x] -> agent inputs should load and show normally
- Run an agent that generates long output; view this run in the Library
- [x] -> output should not overflow its container or stretch the page
layout
- [x] -> visually check that the output section looks slick
### Issue
The SendWebRequestBlock currently fails to properly route HTTP error
responses (4xx, 5xx) to their designated output pins (`client_error` and
`server_error`). Instead, these errors are being sent to the default
"Error" pin, breaking expected workflows that depend on proper error
handling.
### Root Cause
The underlying issue is that our custom `requests` module from
`backend.util.request` appears to automatically raise exceptions for
error status codes (similar to how `raise_for_status()` works in the
standard requests library). When these exceptions are thrown, the
block's conditional logic for handling different status codes is
bypassed entirely.
### Changes
This PR adds proper exception handling to catch HTTP errors raised by
the requests module and routes them to the appropriate output pins:
- Added a try-except block to capture `requests.exceptions.HTTPError`
- Extract status code and response data from the caught exception
- Yield to the proper pin based on the status code (4xx → client_error,
5xx → server_error)
- Maintain consistent behavior with the original design intent
### Additional Context
This change maintains backward compatibility while ensuring the block
behaves according to its documented functionality. Users can now
properly handle 4xx and 5xx errors in their workflows as originally
intended.
<!-- Clearly explain the need for these changes: -->
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [x] Test the block with new changes and old and ensure expected
behavior
---------
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
<!-- Clearly explain the need for these changes: -->
We accidently send several emails within 10 mins and we're gonna get
blocked for spam if we keep it up
### Changes 🏗️
- moves 1 min to 60 min timer
<!-- Concisely describe all of the changes made in this pull request:
-->
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [x] Test via batching a series of notiications over an hour
- Resolves#9622
### Changes 🏗️
- Add pop-out button + modal to input fields in Agent Run Draft view on
`/library/agents/[id]`
- Fix `icon`-variant button styling


### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- Go to an agent's page -> click "+ New run"
- [x] -> pop-out button should show on all input fields
- Enter a value in one of the inputs; click the pop-out button on that
input
- [x] -> input modal with large text field should open
- [x] -> the value you just entered should be present in the modal's
text field
- Edit the value & click "Save"
- [x] -> the modal should close
- [x] -> the value in the corresponding input field should be updated
### Changes 🏗️
<img width="757" alt="image"
src="https://github.com/user-attachments/assets/909aab58-24c7-42ec-9580-ac3e9f32057e"
/>
Since a self-loop is now allowed for AddToListBlock, providing an entry
pin using a static output will cause infinite execution.
This PR change avoid such scenario to be allowed.
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [x] Described above
The change in https://github.com/Significant-Gravitas/AutoGPT/pull/9620
introduces a breaking change in the database volume content; however,
the database's volume location does not change, making switching between
two versions clash.
### Changes 🏗️
Renamed db-config named volume to supabase-config.
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [x] CI
<!-- Clearly explain the need for these changes: -->
We need a sidebar for the admin page, might as well reuse the reusable
component to do so!
### Changes 🏗️
- Extracts the agptui sidebar to a more reusable component
- Update the usage of that sidebar in the settings page
- Use that same sidebar for the admin page
<!-- Concisely describe all of the changes made in this pull request:
-->
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [x] Test the old sidebar
- [x] Test the new sidebar for admin
Agents using Agent blocks should be seamlessly downloaded from the
marketplace to a file and imported from a file.
Requirements:
* A recursive export process that exports all the required agents to a
single file, no matter how many layers deep (taking care of potential
loops).
* An import process that expects and extracts several agents from a
single file into your library at once.
Considerations:
We need to ensure the reference IDs in the Agent Blocks match/are
updated to match the imported sub-agent ids to prevent broken
references.
### Changes 🏗️
* Add sub_graphs field on Graph model
* Improve graph creation query to support inserting graph + subgraphs in
batch
* Deprecate graph template & remove its column
* Update on marketplace download agent (unified the used method, with
more secure cleanup & proper ownership check).
* Fix failing test cases
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [x] Export graph with sub agents.
- [x] Import the exported graph with sub agents.
- Resolves#9609
### Changes 🏗️
- feat(frontend/library): Add "Export agent to file" button
- fix(frontend/library): Put "Open in builder" button behind access
check
- feat(backend): Improve & move graph export stripping logic
- Add logic to strip `SecretField` values
- Move node stripping logic to `NodeModel` from `GraphModel`
- Add `NodeModel.stripped_for_export()` method
- Add `NodeModel.block` property
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- Create and configure an agent with the Publish To Medium block and a
block that uses credentials
- Go to `/library/agents/[id]` for the agent you just created
- [x] -> "Open in builder" button should show
- [x] -> "Open in builder" button should work
- [x] -> "Export agent to file" button should show
- [x] -> "Export agent to file" button should work
- [x] -> Exported file contains no credentials or secrets
- [ ] -> ~~Exported file contains no user IDs~~
- Go to `/library/agents/[id]` for an agent from the marketplace
- [x] -> "Open in builder" button should not show
- [x] -> "Export agent to file" button should not show
We have been submoduling Supabase for provisioning local Supabase
instances using docker-compose. Aside from the huge size of unrelated
code being pulled, there is also the risk of pulling unintentional
breaking change from the upstream to the platform.
The latest Supabase changes hide the 5432 port from the supabase-db
container and shift it to the supavisor, the instance that we are
currently not using. This causes an error in the existing setup.
## BREAKING CHANGES
This change will introduce different volume locations for the database
content, pulling this change will make the data content fresh from the
start. To keep your old data with this change, execute this command:
```
cp -r supabase/docker/volumes/db/data db/docker/volumes/db/data
```
### Changes 🏗️
The scope of this PR is snapshotting the current docker-compose code
obtained from the Supabase repository and embedding it into our
repository. This will eliminate the need for submodule / recursive
cloning and bringing the entire Supabase repository into the platform.
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [x] Existing CI
<!-- Clearly explain the need for these changes: -->
We're building out admin utilities so we need to bring back the `/admin`
route with RBAC. This PR goes through re-enabling that to work with the
latest changes
### Changes 🏗️
- Adds back removed logic
- Refactors the role checks to fix minor bug for admin page and more
importantly clarify
- Updates routes to the latest
<!-- Concisely describe all of the changes made in this pull request:
-->
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [x] Test with admin and authenticated user roles
- [x] Test with logged out user role
- [x] For the above check the all the existing routes + new ones in the
`middleware.ts`
- Resolves#9631
### Changes 🏗️
- Truncate library agent card title (2 lines) and description (3 lines)
- Make "See runs" and "Open in builder" stick to bottom of card
regardless of other content
- Reduce number of grid columns (4 -> 3) in `lg` layout on `/library` to
give items more horizontal space

### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Visually test the changes made on different screen sizes
- Related to #8784
### Changes 🏗️
- feat(frontend/library): Improve agent output styling & fix content
overflow issue
- fix(frontend/library): Fix overlap between content and inset button of
expandable input fields (#9650)
- fix(backend): Unbreak loading graph executions with missing inputs

### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- Run an agent with at least one input *not* filled out; view this run
in the Library
- [x] -> page should load normally
- [x] -> agent inputs should load and show normally
- Run an agent that generates long output; view this run in the Library
- [x] -> output should not overflow its container or stretch the page
layout
- [x] -> visually check that the output section looks slick
### Issue
The SendWebRequestBlock currently fails to properly route HTTP error
responses (4xx, 5xx) to their designated output pins (`client_error` and
`server_error`). Instead, these errors are being sent to the default
"Error" pin, breaking expected workflows that depend on proper error
handling.
### Root Cause
The underlying issue is that our custom `requests` module from
`backend.util.request` appears to automatically raise exceptions for
error status codes (similar to how `raise_for_status()` works in the
standard requests library). When these exceptions are thrown, the
block's conditional logic for handling different status codes is
bypassed entirely.
### Changes
This PR adds proper exception handling to catch HTTP errors raised by
the requests module and routes them to the appropriate output pins:
- Added a try-except block to capture `requests.exceptions.HTTPError`
- Extract status code and response data from the caught exception
- Yield to the proper pin based on the status code (4xx → client_error,
5xx → server_error)
- Maintain consistent behavior with the original design intent
### Additional Context
This change maintains backward compatibility while ensuring the block
behaves according to its documented functionality. Users can now
properly handle 4xx and 5xx errors in their workflows as originally
intended.
<!-- Clearly explain the need for these changes: -->
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [x] Test the block with new changes and old and ensure expected
behavior
---------
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
<!-- Clearly explain the need for these changes: -->
We accidently send several emails within 10 mins and we're gonna get
blocked for spam if we keep it up
### Changes 🏗️
- moves 1 min to 60 min timer
<!-- Concisely describe all of the changes made in this pull request:
-->
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [x] Test via batching a series of notiications over an hour
- Resolves#9622
### Changes 🏗️
- Add pop-out button + modal to input fields in Agent Run Draft view on
`/library/agents/[id]`
- Fix `icon`-variant button styling


### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- Go to an agent's page -> click "+ New run"
- [x] -> pop-out button should show on all input fields
- Enter a value in one of the inputs; click the pop-out button on that
input
- [x] -> input modal with large text field should open
- [x] -> the value you just entered should be present in the modal's
text field
- Edit the value & click "Save"
- [x] -> the modal should close
- [x] -> the value in the corresponding input field should be updated
### Changes 🏗️
<img width="757" alt="image"
src="https://github.com/user-attachments/assets/909aab58-24c7-42ec-9580-ac3e9f32057e"
/>
Since a self-loop is now allowed for AddToListBlock, providing an entry
pin using a static output will cause infinite execution.
This PR change avoid such scenario to be allowed.
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [x] Described above