Commit Graph

274 Commits

Author SHA1 Message Date
Zamil Majdy
378f49a2d9 fix(frontend): Fix toggle input label & time picker margin 2025-04-03 15:46:51 +04:00
Zamil Majdy
ad303d69d1 fix(frontend): Add border on opened select input-button 2025-04-03 11:44:08 +04:00
Nicholas Tindle
f23b7543b3 feat: different signup error message (#9704)
<!-- Clearly explain the need for these changes: -->

We keep showing local users error messages that are just not relevant

### Changes 🏗️
Swaps the error messaging logic to be dependent on the behavior of the
specific platform they are on
<!-- 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 auth container down (simulates incorrect setup) and
validate that error message is shown
  - [x] Try normal path
2025-04-01 20:23:23 +00:00
Zamil Majdy
77b18b00c7 feat(frontend): Implement UI for Agent Input subtypes (#9700)
- Follow-up to #9657

<img width="280" alt="image"
src="https://github.com/user-attachments/assets/2f3cd683-db63-485f-8914-5654c34f1a4c"
/>

<img width="520" alt="image"
src="https://github.com/user-attachments/assets/de7e7cb9-61d4-4071-aea8-393ff5200c54"
/>

### Changes 🏗️

* Implement the input UI for Agent Input subtypes.
* Refactor node-input-component, extra out data type decision logic,
share it with runner/library input.
* Add `format` field for short-text, long-text, and mediafile type.
* Unify UI data type enum.

Out of scope:
- Styling for these 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:
- [x] Use all the available agent input subtypes in an agent and run it

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2025-04-01 20:21:46 +00:00
Abhimanyu Yadav
dbb85baf4c fix(frontend): Fix date picker ux (#9715)
- fix #9315

What have I changed?

- Allowed the user to select the month and year using a dropdown.
- Removed the "Prev" and "Next" buttons for month navigation.
- Fixed the "Today" date design.

<img width="847" alt="Screenshot 2025-03-28 at 6 28 20 PM"
src="https://github.com/user-attachments/assets/740bddfd-e0a2-4799-8325-d52dec31a512"
/>

---------

Co-authored-by: Bently <tomnoon9@gmail.com>
2025-04-01 08:42:04 +00:00
Abhimanyu Yadav
7440f71527 fix(frontend): Sort agents by last edited date in publish dialog (#9724)
- fix #9189 

Currently, the list of agents on the "Publish Agent" dialog is random. I
have sorted them so that the latest edited ones appear first, similar to
the library page.

Co-authored-by: Bently <tomnoon9@gmail.com>
2025-04-01 03:26:07 +00:00
Abhimanyu Yadav
c6089bb6a6 fix(frontend): Remove animation from search bar on library agent page (#9707)
- fix #9523 

Removing the animation from the input search bar and adding the same
behavior as the Google search bar.

![Screenshot 2025-03-28 at 10 20
57 AM](https://github.com/user-attachments/assets/cee009e9-3a81-41b1-9023-503aa040fee4)

---------

Co-authored-by: Bently <tomnoon9@gmail.com>
2025-03-31 12:57:37 +00:00
Abhimanyu Yadav
c71d06a082 fix(frontend): Add extra padding bottom on library agent page (#9706)
- fix #9705 

Adding extra padding so the banner doesn’t cut below the cards.

![Screenshot 2025-03-28 at 9 30
49 AM](https://github.com/user-attachments/assets/d1990dda-4d16-430b-823c-a6338e57d99c)

---------

Co-authored-by: Bently <tomnoon9@gmail.com>
2025-03-31 12:57:19 +00:00
Reinier van der Leer
1f2af18388 feat(platform/library): Real-time execution updates (#9695)
- Resolves #8782

### Changes 🏗️

- feat(frontend/library): Use WS subscription to get real-time execution
updates
- feat(backend/ws_api): Send `GraphExecutionUpdate` on all new agent I/O
- Include agent I/O in `GraphExecutionUpdate` (by subclassing
`GraphExecution`)
    - Add `IO_BLOCK_IDs` to `.blocks.io`
- feat(backend/ws_api): Add `subscribe_graph_executions` method to
WebSocket API

- feat(backend): Withhold `GraphExecution.node_executions` from requests
by non-graph-owners
  - Split `GraphExecutionWithNodes` off of `GraphExecution`
- Use `GraphExecution` as much as possible, as it's a much cheaper query
than `GraphExecutionWithNodes`
  - refactor(frontend): Make `GraphExecution.node_executions` optional

- fix(frontend): Parse dates in responses of `/executions` and
`/graphs/{graph_id}/executions`

- refactor(frontend/library): Move sorting logic for agent runs list
from `AgentRunsPage` to `AgentRunsSelectorList`

- refactor(backend/ws_api): Clean up message handler implementations

- refactor(backend/tests): Use `.data.execution.get_graph_execution(..)`
directly instead of `AgentServer.test_get_graph_run_results(..)`

Out-of-scope changes:
- refactor(backend): Remove unnecessary query include from
`.data.graph.get_graph_metadata(..)`

Demo:


https://github.com/user-attachments/assets/8ea6225d-7334-49cb-a522-83f153d840da

### 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 `/library/agents/[id]` for an agent with inputs and outputs
    - Draft and run a new run
      - [x] -> should appear in the list of runs at the top
      - [x] -> should be selected as soon as the request finishes
      - [x] -> new I/O should appear as it is generated
- [x] -> status should be updated in real-time (both in list and in
adjacent details view)
    - Click "Run again"
      - [x] -> should appear in the list of runs at the top
      - [x] -> should be selected as soon as the request finishes
      - [x] -> new I/O should appear as it is generated
- [x] -> status should be updated in real-time (both in list and in
adjacent details view)
- Click "Open in builder" under "Agent actions"; run the agent from the
builder
      - [x] -> should work the same as before
        - [x] -> node I/O should appear in real-time
        - [x] -> node execution statuses should update in real-time
2025-03-28 12:19:14 +00:00
Zamil Majdy
33299070d3 feat(frontend/library): Add toast on agent execution request failure (#9689)
Currently, when an agent execution fails to be executed, the front-end
does not display any feedback to the user.
The scope of this change is providing that.

### Changes 🏗️

* Extracted `useToastOnFail` from `credits` page into a unified helper
method.
* Uses `useToastOnFail` on agent execution requests on library pages.

<img width="1000" alt="image"
src="https://github.com/user-attachments/assets/2daa0597-eb93-457d-8887-0f00c4db89ac"
/>
<img width="1000" alt="image"
src="https://github.com/user-attachments/assets/1a541c98-fb95-424f-8ffe-972332b3ce01"
/>


### 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 agent with invalid input 

<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>

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2025-03-25 13:51:17 +00:00
Reinier van der Leer
1162ec1474 refactor(backend): Reorganize & clean up execution update system (#9663)
- 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>
2025-03-25 13:14:04 +01:00
Krzysztof Czerwinski
58bb4f92b7 feat(platform): Onboarding updates (#9636)
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>
2025-03-25 10:40:40 +00:00
Nicholas Tindle
7ba566e768 feat(frontend/backend): admin agent review table (#9634)
<!-- 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>
2025-03-24 07:52:35 +00:00
Zamil Majdy
e49cb43b49 feat(block): Add agent input block subtypes (#9657)
### 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.
2025-03-24 02:57:10 +00:00
Nicholas Tindle
56663c5fe9 feat(backend): add backend support for store listings submissions (#9628)
<!-- 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>
2025-03-23 23:30:54 +00:00
Krzysztof Czerwinski
d694ccd50f fix(frontend): Fill defaults from schema to hardcodedValues at node creation (#9632)
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>
2025-03-23 22:48:28 +00:00
Zamil Majdy
b85f6196aa fix(frontend): Fix unreliable websocket connection for node execution update (#9666)
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.
2025-03-21 11:50:20 +00:00
Reinier van der Leer
6e4fbb0cb5 fix(frontend/library): Truncate agent card title and description (#9658)
- 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

![screenshot of library agent grid with the applied
changes](https://github.com/user-attachments/assets/b27d5c97-33b8-4708-9f8c-fc67aad899c9)


### 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
2025-03-19 23:39:09 +07:00
Reinier van der Leer
df6203343d fix(frontend/library): Improve agent I/O rendering (#9656)
- 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

![screenshot of restyled Output
section](https://github.com/user-attachments/assets/97836158-5735-4d01-94dd-16e3fb6999c6)

### 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
2025-03-19 23:39:09 +07:00
Reinier van der Leer
9c31c79898 feat(frontend/library): Make agent input fields expandable (#9650)
- 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

![the expand button on the input
fields](https://github.com/user-attachments/assets/00be33fe-44d1-490a-9cab-9696df8f6e6f)
![the expanded input modal that
appears](https://github.com/user-attachments/assets/787f33b9-d884-467b-b99b-dcbec8a1d059)

### 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
2025-03-19 23:39:09 +07:00
Reinier van der Leer
2c92122721 feat(platform/library): Add icons to primary agent run action buttons (#9651)
- Resolves #9612

### Changes 🏗️

- Add icon to "Run" button in run draft view
- Add icons "Stop run" and "Run again" buttons in run view

!["Run"
button](https://github.com/user-attachments/assets/da863753-6cb2-4cea-aa00-c313b606d198)
!["Run again"
button](https://github.com/user-attachments/assets/79958187-05dd-494e-a3a1-e9745db0d2d4)
!["Stop run"
button](https://github.com/user-attachments/assets/ad37ec3a-3c0b-493b-b548-e6b902eb8bda)


### 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:
  - Purely visual changes, no functional test needed.
    Technical changes are covered by the type checker.
2025-03-19 23:39:09 +07:00
Nicholas Tindle
9b19d1959e feat(frontend): break out the sidebar into a reusable component + use it for admin page (#9618)
<!-- 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
2025-03-19 23:39:09 +07:00
Zamil Majdy
17f3a19bc3 feat(backend): Support sub-agent on export/import agent feature (#9640)
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.
2025-03-19 23:39:09 +07:00
Reinier van der Leer
596b29f53a feat(platform/library): Add "Export agent to file" action (#9627)
- 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
2025-03-19 23:39:09 +07:00
Nicholas Tindle
52b4351961 fix: backend admin page logic was broken (#9616)
<!-- 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`
2025-03-19 23:39:09 +07:00
Zamil Majdy
8757439192 fix(platform): Fallback front-end-url to platform-url for billing page 2025-03-19 23:39:09 +07:00
Bently
c1e329497c fix(otto): prevent breaking when failing to make api call (#9613)
These are some tweaks for Otto to try prevent the frontend from breaking
when/if it fails to make the otto api call.

### Changes 🏗️
Removed unused reference to ``OTTO_API_URL`` in
[backend/server/v2/otto/routes.py](https://github.com/Significant-Gravitas/AutoGPT/compare/dev...otto-fixes?expand=1#diff-6545b2ed01d619cc095b8d0ca6d5baa86d1448dc970cff508669ec3430675d28)
Removed un-needed ``revalidatePath("/build");`` from
[frontend/src/app/build/actions.ts](https://github.com/Significant-Gravitas/AutoGPT/compare/dev...otto-fixes?expand=1#diff-6861f6b90ce91138b3821c0a82abfffbc09f425c26b7335fac60f54894e353e9)
Added a 60 second timeout to the api call in
[backend/server/v2/otto/service.py](https://github.com/Significant-Gravitas/AutoGPT/compare/dev...otto-fixes?expand=1#diff-63c9a1a5337cd5e4ddec7544a258916d4998a6cb5c4181f621d7e24f654bd5c8)
Added a better error handler in
[frontend/src/components/OttoChatWidget.tsx](https://github.com/Significant-Gravitas/AutoGPT/compare/dev...otto-fixes?expand=1#diff-7351568d5c588b77f35d80994ca6800a7faa1b3b0ca229970cfa491eab4b4b33)
Made it so errors return a structured error response for better handling
in
[frontend/src/app/build/actions.ts](https://github.com/Significant-Gravitas/AutoGPT/compare/dev...otto-fixes?expand=1#diff-6861f6b90ce91138b3821c0a82abfffbc09f425c26b7335fac60f54894e353e9)

### 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] do not set the ENV var for ``otto_api_url`` 
- [x] Set the ENV var for ``NEXT_PUBLIC_BEHAVE_AS`` to ``CLOUD`` to have
the chat ui show in the build page
- [x] Send otto a message from the build page frontend, it should fail
and not break the frontend
- [x] Send otto a message that contains graph data to see if the sending
graph data works, this should also fail and not break the frontend
  - [x] now we set the ENV for ``otto_api_url``
  - [x] Send otto a message from the build page frontend, it should work
- [x] Send otto a message that contains graph data to see if the sending
graph data works, it should work
2025-03-12 07:36:55 +00:00
Zamil Majdy
c179a49218 fix(platform): Make LibraryAgent image as initial StoreListing image - Followup (#9617)
### Changes 🏗️

This is a follow-up of
https://github.com/Significant-Gravitas/AutoGPT/pull/9610
* Addressing the PR comments described in the mentioned PR
* Removed debug logging
* Fix image state loading logic on agent upload process

### 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] Create an library agent and try to create a store listing.

<img width="1409" alt="image"
src="https://github.com/user-attachments/assets/dc86dc97-a33f-4336-ab90-19a53c6f7e0f"
/>
2025-03-12 13:12:09 +07:00
Zamil Majdy
af65058bb7 fix(platform): Make LibraryAgent image as initial StoreListing image (#9610)
### Changes 🏗️

We've been auto-generating the thumbnail image for the agent in the
library, this PR is propagating that image as an initial image for the
store listing. This PR also removes the fetch all query for getting the
count for paginating library agent.

### 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] Create an library agent and try to create a store listing.

<img width="1409" alt="image"
src="https://github.com/user-attachments/assets/dc86dc97-a33f-4336-ab90-19a53c6f7e0f"
/>
2025-03-12 05:17:38 +00:00
Bently
a0ecb96958 Feat(Otto) Add Initial Otto Chat Bot code (#9266)
### Changes 🏗️
This is to add the Otto chat bot to the frontend UI.

The changes i have made for this goes as follows:
- I have made and added a basic chat UI widget to the build page, this
will become the main UI for Otto, this will be getting updates in the
future.
- I have made an API route ``/api/otto/ask`` that will receive the
message from the frontend and pass it to the Otto API that we have setup
on GCP.

I already have plans for how we can improve the UI and make it more
modular, this way we can add more features to Otto down the line!

### Config Changes
When we merge this, we will need to add the ENV var for ``otto_api_url``
that will be the URL from GCP where the API is being hosted!

This is now ready for a review as the backend API is up and running, to
who ever does test this, if you want the API url please DM me 😄


![image](https://github.com/user-attachments/assets/230a7487-d88f-4a6b-9ff9-e1e0aac8c385)

### 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] Set the ENV var for ``otto_api_url`` - ask @Bentlybro for this
  - [x] Set the ENV var for  ``NEXT_PUBLIC_BEHAVE_AS`` to ``CLOUD``
  - [x] Send otto a message from the build page frontend 
- [x] Send otto a message that contains graph data to see if the sending
graph data works
2025-03-06 17:51:07 +00:00
Reinier van der Leer
7eb04663ed fix(frontend/library): Use correct graph version to render I/O (#9591)
- Fixes #9579

### Changes 🏗️

- Fetch & use specific graph version to render graph run I/O on
`/library/agents/[id]`

### 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 that yields an output
    - [x] -> should render normally without errors
  - Rename the Agent Output name
  - Save the modified Agent
- Open the Agent in the Agent library and attempt to view the output
from step 1
    - [x] -> should render normally without errors

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-03-06 17:10:52 +00:00
Krzysztof Czerwinski
3cf198eea1 feat(platform): Onboarding flow backend (#9511)
This PR adds backend to make Onboarding UI added in
https://github.com/Significant-Gravitas/AutoGPT/pull/9485 functional and
adds missing confetti screen at the end of Onboarding.

*Make sure to have at least any 2 agents in store when testing locally.*
Otherwise the onboarding will finish without showing agents.
Visit `/onboarding/reset` to reset onboarding state, otherwise it'll
always redirect to `/library` once finished.

### Changes 🏗️

- Onboarding opens automatically on sign up and login (if unfinished)
for all users
- Update db schema to add `UserOnboarding` and add migration
- Add GET and PATCH `/onboarding` endpoints and logic to retrieve and
update data Onboarding for a user
- Update `POST /library/agents` endpoint
(`addMarketplaceAgentToLibrary`), so it includes input and output nodes;
these are needed to know input schema for the Onboarding
- Use new endpoints during onboarding to fetch and update data
- Use agents from the marketplace and their input schema for the
onboarding
- Add algorithm to choose store agents based on user answers and related
endpoint `GET /onboarding/agents`
- Redirect outside onboarding if finished and resume on proper page
- Add `canvas-confetti` and `@types/canvas-confetti` frontend packages
- Add and show congrats confetti screen when user runs and agent and
before opening library
- Minor design updates and onboarding fixes

### 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] Redirect to `/onboarding/*` on sign up and sign in (if onboarding
unfinished)
  - [x] Onboarding works and can be finished
  - [x] Agent runs on finish
- [x] Onboarding state is saved and logging out or refreshing page
restores correct state (user choices)
- [x] When onboarding finished, trying to go into `/onboarding`
redirects to `/library`

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2025-03-06 12:19:33 +00:00
Zamil Majdy
e5eadeace4 feat(backend): Improve SmartDecisionMaker Agent-loop capability & add Anthropics support (#9585)
### Changes 🏗️

There are a few agent-loop issues that this PR is addressing:
* There is a lack of support for agent-loop in Anthropic.
* Duplicated system & user prompt as the main objective prompt in the
agent loop.
* A long rendered text of conversation history by
SmartDecisionMakerBlock agent-loop in the UI.
* A lack of execution input being rendered in the execution list making
it harder to debug.



https://github.com/user-attachments/assets/be430000-bde0-40c6-8f2e-c97ce45b5ed1


### 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] Create from scratch and execute an agent with at least 3 blocks
using SmartDecisionMaker Block.
2025-03-06 12:07:41 +00:00
Reinier van der Leer
231775f4d4 fix(backend): Unbreak add_marketplace_agent_to_library (#9578)
- Fixes #9577

### Changes 🏗️

- Add the required include statements to `LibraryAgent` queries
- Make a `library_agent_include(user_id)` utility in
`backend.data.includes`

### 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:
  - Go to an agent in the Marketplace; click "Add To Library"
    - [ ] -> should work, not return an error
- [ ] -> should redirect to `/library/agents/[id]` -> should load
normally
2025-03-06 10:53:28 +00:00
Reinier van der Leer
3b53c6953a feat(platform): Agent Run "Stop" + "Delete" functionality (#9547)
- Resolves #9542

### Changes 🏗️

- feat(platform): Add "Delete run" button on `/library/agents/[id]` w/
confirm dialog
  - Add `AgentGraphExecution.isDeleted` column for soft delete
  - Add `DELETE /api/executions/{graph_exec_id}` endpoint
- feat(frontend): Add "Stop run" button on `/library/agents/[id]`

Technical improvements:
- refactor(frontend): Generalize `AgentDeleteConfirmDialog` ->
`DeleteConfirmDialog`
- refactor(frontend): Brand `GraphExecution.execution_id` and
`Schedule.id` to prevent mixing

### 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:
  - Click "Delete run" under "Run actions" in the right sidebar
    - [x] -> Confirmation dialog should show
      - Click "Delete"
        - [x] -> run should disappear from list
        - [x] -> view should switch to "Draft new run" view
        - [x] -> refresh page -> run should not be in list
  - Click "Delete" in the menu on a run in the list
    - [x] -> Confirmation dialog should show
      - Click "Delete"
        - [x] -> run should disappear from list
        - [x] -> refresh page -> run should not be in list

---------

Co-authored-by: Krzysztof Czerwinski <34861343+kcze@users.noreply.github.com>
2025-03-05 16:14:59 +00:00
Reinier van der Leer
37331d09e4 Revert "fix(frontend): Consolidate Application Buttons to ShadcN Base Button Component" (#9575)
Reverts Significant-Gravitas/AutoGPT#9570

Some of the styling changes cause issues with existing parts of the
application, and I don't know if partially reverting would cause issues
with the other refactored components/elements.

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-03-05 15:42:26 +00:00
Reinier van der Leer
595d2020c9 feat(frontend): Loading indicator for button click handlers (#9573)
Show that something is happening when a click handler doesn't return
immediately.

### Changes 🏗️

- Show a loading indicator on buttons while their click handler is
running


https://github.com/user-attachments/assets/5878c5a4-cba2-4125-a101-21220d713232

### 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 `/library/agents/[id]`; click "Run again" on an existing run
    - [x] -> loading indicator should show
    - [x] -> button state should reset once the API request completes
- [x] Check that existing `Button` elements aren't adversely affected by
the styling changes, especially `overflow-hidden`
2025-03-05 14:56:52 +00:00
Bently
b50ecbf7e9 fix(frontend): Featured agents cards layout+sizing (#9482)
### Changes 🏗️

right now the featured agents cards dont have a set width/height, so
they change depending on the content, and the description is duplicated.
also, the "by {creator username}" was removed. currently it looks like
this:


![chrome_SBwRrkEN28](https://github.com/user-attachments/assets/1bff2206-ec80-46ee-8b84-e510de04b869)

with my changes, i set a fixed width and height so they dont change, the
description now only shows on hover and is truncated to 11 lines, and i
added back the "by {creator username}"


![chrome_qujRVF4LsX](https://github.com/user-attachments/assets/927629db-1bdd-426c-8d6d-d39a67152389)

---------

Co-authored-by: Andy Hooker <58448663+andrewhooker2@users.noreply.github.com>
2025-03-05 14:12:28 +00:00
Andy Hooker
b5c100748f fix(library): Anchor message to bottom of page (#9572)
This PR fixes the layout of the Library page. It properly anchors the
'old experience' message to the bottom of the viewport and improves the
overall page structure using semantic HTML and Tailwind best practices.

Resolves: #9524 

### Changes 🏗️
- Restructured the LibraryPage component to use proper semantic HTML
with a `<main>` element
- Added a fixed Alert component at the bottom of the viewport with 8px
margin
- Used ShadcN Alert component for the 'old experience' message for UI
consistency
- Implemented responsive behavior to hide the alert on mobile screens
- Optimized Tailwind classes by using the `container` utility and
removing redundant styles
- Improved accessibility and UX by using appropriate semantic elements

### Screenshot
<img width="926" alt="image"
src="https://github.com/user-attachments/assets/e393007c-639e-4383-922c-41fa67133da8"
/>

### 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:

<details>
  <summary>Alert Message at Bottom of Library Page</summary>

- [ ] Visit the Library page and verify the alert appears fixed at the
bottom with 8px margin
- [ ] Resize browser window to various desktop sizes and confirm alert
remains centered
- [ ] Scroll through Library page content and verify the alert stays
fixed at the bottom
- [ ] Open developer tools and toggle to mobile view (width < 640px) to
confirm alert is hidden
- [ ] Test in both light and dark mode to ensure alert styling is
consistent with theme
- [ ] Click the "here" link in the alert and verify it navigates to the
monitoring page
- [ ] Verify that QuestionMarkCircled icon in the alert is properly
styled and visible

</details>

---------

Co-authored-by: Bentlybro <tomnoon9@gmail.com>
2025-03-05 10:11:21 +00:00
Andy Hooker
122be761b6 fix(frontend): Consolidate Application Buttons to ShadcN Base Button Component (#9570)
Our application currently uses multiple inconsistent button
implementations across the codebase.
This PR standardizes buttons to use our base Button component that
leverages ShadcN, improving UI consistency, maintainability, and
accessibility.

Resolves: #9567 

### Changes 🏗️

- Replaced custom button implementations in various components with our
base Button component and greatly reduced redundant overlapping styles.
- Paired with our designer to streamline our `globals.css` to match the
desired approach.
- Added button variant documentation in Storybook
- Deprecated the obsolete 'primary' class  and marked it.

### Screenshots 📷

#### Variants  
<img width="466" alt="image"
src="https://github.com/user-attachments/assets/9e4f6360-57ec-4f28-b702-e57252d67def"
/>

<img width="418" alt="image"
src="https://github.com/user-attachments/assets/a9af17dc-e8bc-429d-a9ac-8380e34b9089"
/>

<img width="129" alt="image"
src="https://github.com/user-attachments/assets/2df5d184-bb49-4640-bfb4-879360ca35e6"
/>

### 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:

<details>
  <summary>Button Consolidation Test Plan</summary>
 Visual Verification

- [ ] Verify all button variants (default, destructive, outline,
secondary, ghost, link) render correctly
- [ ] Confirm button styling is consistent across all themes (light,
dark, etc.)
- [ ] Validate that the rounded-full style is applied to appropriate
variants

 Functional Testing

- [ ]  Test click handlers continue to work on all migrated buttons
- [ ] Verify hover, focus, and active states display correctly on all
buttons
- [ ]  Confirm disabled states are working properly
- [ ]  Test loading state animations and behavior

 Responsive Testing

- [ ]  Verify button layouts on mobile devices (< 640px)
- [ ]  Confirm button layouts on tablet devices (640px - 1024px)
- [ ]  Test button layouts on desktop screens (> 1024px)
</details>

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-03-05 07:01:11 +00:00
Reinier van der Leer
27a5635607 feat(platform): Library Agent "Delete" functionality (#9546)
- Resolves #9545

### Changes 🏗️

- fix(platform): Make "Delete" button on `/monitoring` soft-delete the
`LibraryAgent` instead of hard-deleting the corresponding `AgentGraph`
- feat(frontend): Add "Delete agent" button on `/library/agents/[id]`

Technical:
- fix(backend): Accept partial input on `update_library_agent` endpoint
- feat(backend): Add `GET /api/library/agents/{library_agent_id}`
endpoint
- refactor(frontend): Replace use of `GraphMeta` by `LibraryAgent` where
possible on `/library/agents/[id]`

Also, out of scope but important:
- fix(frontend): Hide buttons that require direct graph access depending
on `agent.can_access_graph`

### 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 the Library and select an agent
    - [x] -> `/library/agents/[id]` should load normally
      - Save this URL for later (especially the ID)!
  - Click "Delete agent" on `/library/agents/[id]`
    - [x] -> should show a confirmation dialog
    - Click "Delete" to confirm
      - [x] -> should redirect back to `/library`
      - [x] -> deleted agent should no longer be listed in the Library
  - Click "Delete agent" on `/monitoring`
    - [x] -> should show a confirmation dialog
    - Click "Delete" to confirm
      - [x] -> agent should disappear from agent list
- [x] -> views should reset / deselect the deleted agent where
applicable
2025-03-03 16:49:44 +00:00
Zamil Majdy
7747ad8f4c feat(backend): Add conversation history as Smart Decision Block output (#9540)
Now that the MVP for Smar Decision Block is available, we need to add
this info in the block output:

Messages (list) - The messages list sent to the LLM plus its generated
response as the latest assistant entry. This is a single list of
dictionaries in standard LLM API format).

### Changes 🏗️

* Add `conversations` output pin that populates the update
`conversation_history` input pin with the assistant response.
* Refactored `Smart Decision Block` to avoid downloading the whole graph
on each execution, remove code duplication, declutter data fetching.
* Minor UI issue on the smart decision block entry in the search bar. 

### 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>

Co-authored-by: Swifty <craigswift13@gmail.com>
2025-02-28 15:03:34 +00:00
Reinier van der Leer
f6c93eeeff feat(platform): Cost indication for agent runs (#9527)
- Resolves #9181

### Changes 🏗️

- Add agent run cost indication to `/monitoring` and
`/library/agents/[id]`

Backend:
- Add `GraphExecutionMeta.cost` property - value sourced from
`AgentGraphExecution.stats["cost"]`

### 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:
  - Run an agent
- [ ] Check out the agent run on `/library/agents/[id]` -> should show
cost
  - [ ] Check out the agent run on `/monitoring` -> should show cost
2025-02-28 14:20:46 +00:00
Zamil Majdy
52ee7d150e fix(frontend): Remove unused Stripe on frontend (#9536)
### Changes 🏗️

Remove Stripe on frontend.

### 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>
2025-02-27 11:13:53 +00:00
Swifty
108b0aaa4c feat(blocks): Enabled block Usage for Smart Decision Maker Block (#9514)
Originally we did not allow Blocks to be used as tools due to the
limitations of communicating the correct tool function signatures.

It has however, been decided to allow them to be used knowing that there
are limitations with them.


### Changes 🏗️

- Added ability to execute blocks as tools

### Checklist 📋

<img width="613" alt="Screenshot 2025-02-25 at 12 49 26"
src="https://github.com/user-attachments/assets/e614f56d-2bdc-46c9-8c2c-e56f80343bde"
/>
 - create an agent with an SDM block and a block as a tool
 - run agent and make sure the block can be called as a tool

#### 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:

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-02-25 17:37:06 +00:00
Swifty
e752f0f342 feat(platform/library): Agent Library v2 (#9407)
- Resolves #8774
  - Resolves #8775
- Includes back-end work for #9168
- Partially implements #8776
- Partially implements #8777

### Changes 🏗️

- Add `/library` page
- Change target of "Library" navigation link from `/monitoring` to
`/library`
- Move `/agents/[id]` page to `/library/agents/[id]`
- Set application background color to `bg-neutral-50`
- Redirect to new library agent's "runs" page (`/library/agents/[id]`)
after adding from marketplace

Further (technical) frontend changes:
- Add types and client methods for all library API endpoints
- Added `primary` variant to `agptui/Button` component

Backend changes:
- Add functionality to library backend
  - Aggregate agent status
  - Image generation for use in library view
    - Add `LibraryAgent.imageUrl` column to DB schema
  - Sorting & pagination
  - Explicit relation between library agents and their graph's creator
- Refactor & update API endpoints for DX
- Other minor refactoring
- Add missing but required `MEDIA_GCS_BUCKET_NAME` to `.env.example`

### 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:
  - `/library`
    - [x] Create agent from scratch -> should show up on `/library`
- [x] Add agent to library from marketplace -> should show up on
`/library`
- [x] Click on agent in `/library` -> should go to
`/library/agents/[id]`
    - [x] Test sorting & pagination functionality
  - `/library/agents/[id]`
    - [x] Fill out inputs and click "Run" -> should run like normally
    - [x] Select completed agent run -> should show all inputs & outputs
- [x] Click "run again" on a completed agent run -> should run
successfully with same input
  - [x] `/monitoring` should still work the same as before

---------

Co-authored-by: abhi1992002 <abhimanyu1992002@gmail.com>
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-02-25 17:29:15 +00:00
Swifty
b603ed2d2a feature(platform) Smart Decision Maker Block (#9490)
## Task

The SmartDecisionMakerBlock is a specialized block in a graph-based
system that leverages a language model (LLM) to make intelligent
decisions about which tools or functions to invoke based on a
user-provided prompt. It is designed to process input data, interact
with a language model, and dynamically determine the appropriate tools
to call from a set of available options, making it a powerful component
for AI-driven workflows.

## How It Works in Practice

- **Scenario:** Imagine a workflow where a user inputs, "Send an email
to John about the meeting." The SmartDecisionMakerBlock is connected to
tools like send_email, schedule_meeting, and search_contacts.
- **Execution:**
1. The block receives the prompt and system instructions (e.g., "Choose
a function to call").
2.It identifies the available tools from the graph and constructs their
signatures (e.g., send_email(recipient, subject, body)).
3. The LLM analyzes the prompt and decides to call send_email with
arguments like recipient: "John", subject: "Meeting", body: "Let’s
discuss...".
4. The block yields these tool-specific outputs, which can be picked up
by downstream nodes to execute the email-sending action.


## Changes 🏗️
- Add the Smart Decision Maker (SDM) block.
- Break circular imports in integration code.

![Screenshot 2025-02-21 at 10 23
25](https://github.com/user-attachments/assets/6fbfd875-fb1b-4d77-8051-a214c3c86082)


## Work in Progress

⚠️ **Important note this is a temporary UX for the system - UX will be
addressed in a future PR** ⚠️

### Current Status

I’m currently focused on the smart decision logic. The main additions in
the ongoing PR include:
- Defining function signatures for OpenAI function-calling schemas based
on node links and the linked blocks.
- Adding tests for function signature generation.
- Force all tool calls to be made via an agent. (Need to uncomment)
- Restrict each tool call entry to a single node.
- simplify the output emission process, to emit each parameter one at a
time.
- Change test to use agents and hardcode output how I think it should
work to test it does actually work
- Hook up openai, in a simplified way, to test the function calling
(mock for testing)
- Once all the above is working, use credentials system and build of
llm.py



### What’s Next

- Review Process

### Reviewers Phase 1

This PR is now ready for review, during the first phase of reviews I'm
looking for comments on approach and logic.

Out of scope:  code style and organization at this stage

### Reviewers Phase 2

Once we are all happy with the approach and logic. We can open the
review process to general code quality and nits, to be considered.

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-02-25 15:29:22 +01:00
Zamil Majdy
d0d3cc07a3 fix(frontend): Minor UI changes; Align badges & buttons on LibraryV1 (#9512)
<!-- Clearly explain the need for these changes: -->

### Changes 🏗️

While V2 Library is coming, this has been my pet peeve

<img width="1428" alt="image"
src="https://github.com/user-attachments/assets/39c0b84e-4dfe-44e1-b455-cd0330ae7222"
/>

to

<img width="1428" alt="image"
src="https://github.com/user-attachments/assets/ab41973b-8ce8-4772-a4ab-e0dcd8b75464"
/>


### 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>
2025-02-25 09:37:01 +00:00
Zamil Majdy
cca99c850d fix(frontend): Minor UI tweak, fix non-accessible button on phone screen (#9504)
### Changes 🏗️
Fix these buttons:

![image](https://github.com/user-attachments/assets/bd6753a3-49b4-4d9b-8533-6d145dc8f387)
<img width="337" alt="image"
src="https://github.com/user-attachments/assets/702bf3e1-7168-4372-8dcf-71abdea0bc19"
/>
<img width="337" alt="image"
src="https://github.com/user-attachments/assets/362a5e44-3bd4-4849-ba92-8b21cfcfe767"
/>


### 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>

---------

Co-authored-by: Abhimanyu Yadav <122007096+Abhi1992002@users.noreply.github.com>
2025-02-24 09:01:22 +00:00
Krzysztof Czerwinski
0b992223df feat(frontend): Onboarding flow UI (#9485)
### Changes 🏗️
This PR adds interactive UI for the onboarding flow, without any
connection to the backend.
Visit `/onboarding` to see it!

- Add Onboarding pages to `app/onboarding/`
- Add Onboarding components to `components/onboarding`

Note:
- Backend isn't connected, so the agents won't run and state isn't
preserved
- Onboarding state is lost on refresh

### 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: -->
  - [ ] ...
2025-02-21 16:07:27 +00:00