This PR adds two new Gmail integration blocks—**Gmail Get Thread** and
**Gmail Reply**—to the platform, enhancing threaded email workflows. Key
changes include:
- **GmailGetThreadBlock**:
- New block that retrieves an entire Gmail thread by `threadId`, with an
option to include or exclude messages from Spam and Trash.
- Supports use cases like fetching all messages in a conversation to
check for responses.
- **GmailReplyBlock**:
- New block that sends a reply within an existing Gmail thread,
maintaining the thread context.
- Accepts detailed input fields including recipients, CC, BCC, subject,
body, and attachments.
- Ensures replies are properly associated with their parent message and
thread.
- **Enhancements to existing Gmail blocks**:
- The `Email` model and related outputs now include a `threadId` field.
- Updated test data and mock data to support threaded operations.
- Expanded OAuth scopes for actions requiring thread metadata.
- **Documentation updates**:
- Added documentation for the new Gmail blocks in both the general block
listing and the detailed Gmail block docs.
- Clarified that the `Email` output now includes the `threadId`.
These updates enable more advanced and context-aware Gmail automations,
such as fetching full conversations and replying inline, supporting
richer communication workflows with Gmail.
## 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] Try all the gmail blocks
- [x] Send an email reply based on a thread from the get thread block
---------
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Updates to the readme + docs to add info about the newly added auto
setup script.
Changes to ``new_blocks.md`` and ``installer.md`` are to make netlify CI
happy and pass
---------
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
This PR adds two setup scripts that will setup autogpt fully, it has a
windows .bat and a linux/mac .sh script, for now they are placed in a
new folder called "Installer"
### Note, the installers are supposed to be run outside of the autogpt
repo folder like Desktop/in a new empy folder because it will clone the
repo into the current directory.
I have had to add ``cross-env`` via ``pnpm add cross-env `` as on
windows the env is set differently in the ``package.json`` build section
``"build": "cross-env pnpm run generate:api-client &&
SKIP_STORYBOOK_TESTS=true next build"``
once fully setup i plan to make it so these commands can be run with the
following commands
Linux/Mac
```bash
curl -fsSL https://setup.agpt.co/install.sh -o install.sh && bash install.sh
```
Windows cmd/powershell
```bash
powershell -c "iwr https://setup.agpt.co/install.bat -o install.bat; ./install.bat"
```
Currently the commands above dont work but will later on!
### 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] I have tested the linux ``install.sh`` on a ubuntu system and it
setup the platform fully.
- [x] I have tested the windows ``install.bat`` on my windows system and
it setup the platform fully.
- [x] I have tested on both OS's and checked with missing prerequisites
to see if it shows the errors and it does
### Why are these changes needed?
<!-- Clearly explain the need for these changes: -->
These changes document the OAuth integration flow for CASA lvl 2
compliance, specifically addressing the requirement to "Verify
documentation and justification of all the application's trust
boundaries, components, and significant data flows." The documentation
clarifies the two distinct OAuth implementations in AutoGPT: user
authentication via Supabase SSO and API integration credentials for
third-party services.
### Changes 🏗️
<!-- Concisely describe all of the changes made in this pull request:
-->
- Created comprehensive OAuth integration flow documentation at
`/docs/content/platform/contributing/oauth-integration-flow.md`
- Documented trust boundaries between frontend (untrusted), backend API
(trusted), and external providers (semi-trusted)
- Added detailed component architecture for both frontend and backend
OAuth implementations
- Included mermaid diagrams illustrating:
- OAuth flow sequences (initiation, authorization, token refresh)
- System architecture showing SSO vs API integration OAuth
- Data flow diagram
- Security architecture layers
- Credential lifecycle state diagram
- Documented security measures including CSRF protection, PKCE
implementation, and token management
- Clarified the distinction between Supabase SSO for user login and
custom OAuth for API integrations
- Added references to source files for up-to-date provider lists rather
than hard-coding all providers
### 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] Created documentation file with proper markdown formatting
- [x] Verified all file paths referenced in documentation exist
- [x] Confirmed mermaid diagrams render correctly
- [x] Validated that the documentation accurately reflects the codebase
implementation
---------
Co-authored-by: Claude <noreply@anthropic.com>
This pull request introduces a comprehensive backend testing guide and
adds new tests for analytics logging and various API endpoints, focusing
on snapshot testing. It also includes corresponding snapshot files for
these tests. Below are the most significant changes:
### Documentation Updates:
* Added a detailed `TESTING.md` file to the backend, providing a guide
for running tests, snapshot testing, writing API route tests, and best
practices. It includes examples for mocking, fixtures, and CI/CD
integration.
### Analytics Logging Tests:
* Implemented tests for logging raw metrics and analytics in
`analytics_test.py`, covering success scenarios, various input values,
invalid requests, and complex nested data. These tests utilize snapshot
testing for response validation.
* Added snapshot files for analytics logging tests, including responses
for success cases, various metric values, and complex analytics data.
[[1]](diffhunk://#diff-654bc5aa1951008ec5c110a702279ef58709ee455ba049b9fa825fa60f7e3869R1-R3)
[[2]](diffhunk://#diff-e0a434b107abc71aeffb7d7989dbfd8f466b5e53f8dea25a87937ec1b885b122R1-R3)
[[3]](diffhunk://#diff-dd0bc0b72264de1a0c0d3bd0c54ad656061317f425e4de461018ca51a19171a0R1-R3)
[[4]](diffhunk://#diff-63af007073db553d04988544af46930458a768544cabd08412265e0818320d11R1-R30)
### Snapshot Files for API Endpoints:
* Added snapshot files for various API endpoint tests, such as:
- Graph-related operations (`graphs_get_single_response`,
`graphs_get_all_response`, `blocks_get_all_response`).
[[1]](diffhunk://#diff-b25dba271606530cfa428c00073d7e016184a7bb22166148ab1726b3e113dda8R1-R29)
[[2]](diffhunk://#diff-1054e58ec3094715660f55bfba1676d65b6833a81a91a08e90ad57922444d056R1-R31)
[[3]](diffhunk://#diff-cfd403ab6f3efc89188acaf993d85e6f792108d1740c7e7149eb05efb73d918dR1-R14)
- User-related operations (`auth_get_or_create_user_response`,
`auth_update_email_response`).
[[1]](diffhunk://#diff-49e65ab1eb6af4d0163a6c54ed10be621ce7336b2ab5d47d47679bfaefdb7059R1-R5)
[[2]](diffhunk://#diff-ac1216f96878bd4356454c317473654d5d5c7c180125663b80b0b45aa5ab52cbR1-R3)
- Credit-related operations (`credits_get_balance_response`,
`credits_get_auto_top_up_response`, `credits_top_up_request_response`).
[[1]](diffhunk://#diff-189488f8da5be74d80ac3fb7f84f1039a408573184293e9ba2e321d535c57cddR1-R3)
[[2]](diffhunk://#diff-ba3c4a6853793cbed24030cdccedf966d71913451ef8eb4b2c4f426ef18ed87aR1-R4)
[[3]](diffhunk://#diff-43d7daa0c82070a9b6aee88a774add8e87533e630bbccbac5a838b7a7ae56a75R1-R3)
- Graph execution and deletion (`blocks_execute_response`,
`graphs_delete_response`).
[[1]](diffhunk://#diff-a2ade7d646ad85a2801e7ff39799a925a612548a1cdd0ed99b44dd870d1465b5R1-R12)
[[2]](diffhunk://#diff-c0d1cd0a8499ee175ce3007c3a87ba5f3235ce02d38ce837560b36a44fdc4a22R1-R3)##
Summary
- add pytest-snapshot to backend dev requirements
- snapshot server route response JSONs
- mention how to update stored snapshots
## Testing
- `poetry run format`
- `poetry run test`
### 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] run poetry run test
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Update ollama docs to add info on how to setup ollama environment vars
for proper access
This includes properly setting the "OLLAMA_HOST" env var with the ip and
port "0.0.0.0:11434" which makes it accessible to AutoGPT thats running
inside of docker
#### 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] Follow the latest setup to test Ollama to make sure it works
## 🧢 Overview
This PR migrates the AutoGPT Platform frontend from [yarn
1](https://classic.yarnpkg.com/lang/en/) to [pnpm](https://pnpm.io/)
using **corepack** for automatic package manager management.
**yarn1** is not longer maintained and a bit old, moving to **pnpm** we
get:
- ⚡ Significantly faster install times,
- 💾 Better disk space efficiency,
- 🛠️ Better community support and maintenance,
- 💆🏽♂️ Config swap very easy
## 🏗️ Changes
### Package Management Migration
- updated [corepack](https://github.com/nodejs/corepack) to use
[pnpm](https://pnpm.io/)
- Deleted `yarn.lock` and generated new `pnpm-lock.yaml`
- Updated `.gitignore`
### Documentation Updates
- `frontend/README.md`:
- added comprehensive tech stack overview with links
- updated all commands to use pnpm
- added corepack setup instructions
- and included migration disclaimer for yarn users
- `backend/README.md`:
- Updated installation instructions to use pnpm with corepack
- `AGENTS.md`:
- Updated testing commands from yarn to pnpm
### CI/CD & Infrastructure
- **GitHub Workflows** :
- updated all jobs to use pnpm with corepack enable
- cleaned FE Playwright test workflow to avoid Sentry noise
- **Dockerfile**:
- updated to use pnpm with corepack, changed lock file reference, and
updated cache mount path
### 📋 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:
**Test Plan:**
> assuming you are on the `frontend` folder
- [x] Clean installation works: `rm -rf node_modules && corepack enable
&& pnpm install`
- [x] Development server starts correctly: `pnpm dev`
- [x] Build process works: `pnpm build`
- [x] Linting and formatting work: `pnpm lint` and `pnpm format`
- [x] Type checking works: `pnpm type-check`
- [x] Tests run successfully: `pnpm test`
- [x] Storybook starts correctly: `pnpm storybook`
- [x] Docker build succeeds with new pnpm configuration
- [x] GitHub Actions workflow passes with pnpm commands
#### For configuration changes:
- [x] `.env.example` is updated or already compatible with my changes
- [x] `docker-compose.yml` is updated or already compatible with my
changes
- [x] I have included a list of my configuration changes in the PR
description (under **Changes**)
<!-- Clearly explain the need for these changes: -->
This PR adds a new internal block, **AI Image Editor**, which enables
**text-based image editing** via BlackForest Labs’ Flux Kontext models
on Replicate. This block allows users to input a prompt and optionally a
reference image, and returns a transformed image URL. It supports two
model variants (Pro and Max), with different cost tiers. This
functionality will enhance multimedia capabilities across internal agent
workflows and support richer AI-powered image manipulation.
---
### Changes 🏗️
* Added `FluxKontextBlock` in `backend/blocks/flux_kontext.py`
* Uses `ReplicateClient` to call Flux Kontext Pro or Max models
* Supports inputs for `prompt`, `input_image`, `aspect_ratio`, `seed`,
and `model`
* Outputs transformed image URL or error
* Added credit pricing logic for Flux Kontext models to
`block_cost_config.py`:
* Pro: 10 credits
* Max: 20 credits
* Added documentation for the new block at
`docs/content/platform/blocks/flux_kontext.md`
* Updated block index at `docs/content/platform/blocks/blocks.md` to
include Flux Kontext
---

### 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] Prompt-only input generates an image
* [x] Prompt with image applies edit correctly
* [x] Image respects specified aspect ratio
* [x] Invalid image URL returns helpful error
* [x] Using the same seed gives consistent output
* [x] Output chaining works: result URI can be used in downstream blocks
* [x] Output from Max model shows higher fidelity than Pro
<details>
<summary>Example test plan</summary>
* [x] Create from scratch and execute an agent using Flux Kontext with
at least 3 blocks
* [x] Import agent with Flux Kontext from file upload, and confirm
execution
* [x] Upload agent (with Flux Kontext block) to marketplace (internal
test)
* [x] Import agent from marketplace and confirm correct execution
* [x] Edit agent with Flux Kontext block from monitor and confirm output
</details>
#### For configuration changes:
* [x] `.env.example` is updated or already compatible with my changes
* [x] `docker-compose.yml` is updated or already compatible with my
changes
* [x] I have included a list of my configuration changes in the PR
description (under **Changes**)
* No new environment variables or services introduced
<details>
<summary>Examples of configuration changes</summary>
* N/A
</details>
---------
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
<!-- Clearly explain the need for these changes: -->
We removed the linked video because out of date so unlink it
### Changes 🏗️
<!-- Concisely describe all of the changes made in this pull request:
-->
Comment out video segment until new one posted
### Checklist 📋
#### For code changes:
- [x] no code changes made
The changes in this PR are to add Llama API support.
### Changes 🏗️
We add both backend and frontend support.
**Backend**:
- Add llama_api provider
- Include models supported by Llama API along with configs
- llm_call
- credential store and llama_api_key field in Settings
**Frontend**:
- Llama API as a type
- Credentials input and provider for Llama API
### Checklist 📋
#### For code changes:
- [X] I have clearly listed my changes in the PR description
- [X] I have tested my changes according to the test plan:
**Test Plan**:
<details>
<summary>AI Text Generator</summary>
- [X] Start-up backend and frontend:
- Start backend with Docker services: `docker compose up -d --build`
- Start frontend: `npm install && npm run dev`
- By visiting http://localhost:3000/, test inference and structured
outputs
- [X] Create from scratch
- [X] Request for Llama API Credentials
<img width="2015" alt="image"
src="https://github.com/user-attachments/assets/3dede402-3718-4441-9327-ecab25c63ebf"
/>
- [X] Execute an agent with at least 3 blocks
<img width="2026" alt="image"
src="https://github.com/user-attachments/assets/59d6d56b-2ccc-4af5-b511-4af312c3f7f8"
/>
- [X] Confirm it executes correctly
</details>
<details>
<summary>Structured Response Generator</summary>
- [X] Start-up backend and frontend:
- Start backend with Docker services: `docker compose up -d --build`
- Start frontend: `npm install && npm run dev`
- By visiting http://localhost:3000/, test inference and structured
outputs
- [X] Create from scratch
- [X] Execute an agent
<img width="2023" alt="image"
src="https://github.com/user-attachments/assets/d1107638-bf1b-45b1-a296-1e0fac29525b"
/>
- [X] Confirm it executes correctly
</details>
---------
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
<!-- Clearly explain the need for these changes: -->
We want the scheduler shouldn't scale with the rest API lol
### Changes 🏗️
pulls out the scheduler into its own service
<!-- 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 it
---------
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
Add Note to "Getting Started" page for Raspberry Pi 5 page size issue
with `supabase-vector` that prevents `docker compose up` from running
successfully.
<!-- Clearly explain the need for these changes: -->
### Changes 🏗️
- Added a Note to the "Getting Started" page that explains a change in
Raspberry Pi OS for Raspberry Pi 5s, and how to revert the change to
avoid an issue running the backend on Docker.
<!-- Concisely describe all of the changes made in this pull request:
-->
### Checklist 📋
#### For code changes:
- [x] No code changes
#### For configuration changes:
- [x] No configuration changes
---------
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
### Changes 🏗️
Updates to the setup docs to remove the old unneeded ``git submodule
update --init --recursive --progress`` command + some other small tweaks
around it
In this pull request, the following changes have been made in response
to Issue #9190:
Documentation Changes:
- Added a note to the AutoGPT documentation regarding Docker
installation on Windows.
- Specifically, the note advises users to opt for WSL2 (Windows
Subsystem for Linux version 2) instead of Hyper-V during Docker setup to
prevent issues with Supabase, such as the "unhealthy" status for
supabase-db.
---------
Co-authored-by: Madura Herath <madurah@verdentra.com>
Co-authored-by: Bently <tomnoon9@gmail.com>
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>
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
addresses the changes requested here [Move to a single source of truth
for docs — Remove duplicate info from readme
#8887](https://github.com/Significant-Gravitas/AutoGPT/issues/8887)
### Changes 🏗️
<!-- Concisely describe all of the changes made in this pull request:
-->
changed readme files
<!-- Clearly explain the need for these changes: -->
### Changes 🏗️
Added `--progress` to the submodule update, so that cloning progress can
be tracked and does not appear to hang.
<!-- Concisely describe all of the changes made in this pull request:
-->
### Checklist 📋
#### For code changes:
- [x] No code change, just docs.
<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:
- [x] No configuration change, just docs.
<details>
<summary> Provide feedback when cloning submodules </summary>
- now updating submodules shows the cloning repo's progress
</details>
Co-authored-by: Your Name <you@example.com>
- Resolves - #9303 and #9304
- Depends on - https://github.com/Significant-Gravitas/AutoGPT/pull/9319
### Blocks list
Block Name | What It Does | Manually Tested
-- | -- | --
Todoist Create Label | Creates a new label in Todoist | ✅
Todoist List Labels | Retrieves all personal labels from Todoist | ✅
Todoist Get Label | Retrieves a specific label by ID | ✅
Todoist Create Task | Creates a new task in Todoist | ✅
Todoist Get Tasks | Retrieves active tasks from Todoist | ✅
Todoist Update Task | Updates an existing task | ✅
Todoist Close Task | Completes/closes a task | ✅
Todoist Reopen Task | Reopens a completed task | ✅
Todoist Delete Task | Permanently deletes a task | ✅
Todoist List Projects | Retrieves all projects from Todoist | ✅
Todoist Create Project | Creates a new project in Todoist | ✅
Todoist Get Project | Retrieves details for a specific project | ✅
Todoist Update Project | Updates an existing project | ✅
Todoist Delete Project | Deletes a project and its contents | ✅
Todoist List Collaborators | Retrieves collaborators on a project | ✅
Todoist List Sections | Retrieves sections from Todoist | ✅
Todoist Get Section | Retrieves details for a specific section | ✅
Todoist Delete Section | Deletes a section and its tasks | ✅
Todoist Create Comment | Creates a new comment on a task or project | ✅
Todoist Get Comments | Retrieves all comments for a task or project | ✅
Todoist Get Comment | Retrieves a specific comment by ID | ✅
Todoist Update Comment | Updates an existing comment | ✅
Todoist Delete Comment | Deletes a comment | ✅
> I’ve only created action blocks in Todoist because webhooks can only
be manually created [we can't do it programatically right now]. I’ve
already emailed Todoist for help, but they haven’t replied yet. Once I
receive a reply, I’ll create a pull request for webhook triggers in
Todoist.
We want to have some more intelligent and less user managed memory
methods, so we add mem0
### Changes 🏗️
- Adds user_id to kwargs for blocks
- Add mem0 blocks
<!-- Concisely describe all of the changes made in this pull request:
-->
### Checklist 📋
- [x] document adding user_id to kwargs for blocks
- [x] Add run and agent Id as optional checkboxes that will be passed
down to mem0
#### 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:
<!-- Put your test plan here: -->
- [ ] Build and submit an agent to @Torantulino and the marketplace for
a personal AI tutor based on recommendations from the mem0 team
---------
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
<!-- Clearly explain the need for these changes: -->
Update and adds a basic credential field for use in integrations like
reddit
### Changes 🏗️
<!-- Concisely describe all of the changes made in this pull request:
-->
- Reddit
- Drops the Username and Password for reddit from the .env
- Updates Reddit block with modern provider and credential system
- moves clientid and secret to reading from `Settings().secrets` rather
than input on the block
- moves user agent to `Settings().config`
- SMTP
- update the block to support user password and modern credentials
- Add `UserPasswordCredentials`
- Default API key expiry to None explicitly to help type cohesion
- add `UserPasswordCredentials` with a weird form of `bearer` which we
ideally remove because `basic` is a more appropriate name. This is
dependent on `Webhook _base` allowing a subset of `Credentials`
- Update `Credentials` and `CredentialsType`
- Fix various `OAuth2Credentials | APIKeyCredentials` -> `Credentials`
mismatches between base and derived classes
- Replace `router/@post(create_api_key_credentials)` with
`create_credentials` which now takes a credential and is discriminated
by `type` provided by the credential
- UI/Frontend
- Updated various pages to have saved credential types, icons, and text
for User Pass Credentials
- Update credential input to have an input/modals/selects for user/pass
combos
- Update the types to support having user/pass credentials too (we
should make this more centralized)
- Update Credential Providres to support user_password
- Update `client.ts` to support the new streamlined credential creation
method and endpoint
- DX
- Sort the provider names **again**
TODO:
- [x] Reactivate Conditionally Disabling Reddit
~~- [ ] Look into moving Webhooks base to allow subset of `Credentials`
rather than requiring all webhooks to support the input of all valid
`Credentials` types~~ Out of scope
- [x] Figure out the `singleCredential` calculator in
`credentials-input.tsx` so that it also respects User Pass credentials
and isn't a logic mess
### 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 agents
---------
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
The Ollama docs where very out of date and needed updating so I have
updated them and added some screenshots so its easier to follow.
I have also added a new Ollama model to the platform, "llama3.2" as that
is what i based the tutorial off and its name is easy to find in the
list of models
I also added a new folder in the "imgs" dir to store the Ollama related
photo just to keep things tidy
- Resolves#8326
Create a Twitter integration with some small frontend changes.
### Changes
1. Add Twitter OAuth 2.0 with PKCE support for authentication.
2. Add a way to multi-select from a list of enums by creating a
multi-select on the frontend.
3. Add blocks for Twitter integration.
4. `_types.py` for repetitive enums and input types.
5. `_builders.py` for creating parameters without repeating the same
logic.
6. `_serializer.py` to serialize the Tweepy enums into dictionaries so
they can travel easily from Pyro5.
7. `_mappers.py` to map the frontend values to the correct request
values.
> I have added a new multi-select feature because my list contains many
items, and selecting all of them makes the block cluttered. This new
block displays only the first two items and then show something like "2
more" . It works only for list of enums.
### Blocks
Block Name | What It Does | Error Reason | Manual Testing
-- | -- | -- | --
`TwitterBookmarkTweetBlock` | Bookmark a tweet on Twitter | No error | ✅
`TwitterGetBookmarkedTweetsBlock` | Get all your bookmarked tweets from
Twitter | No error | ✅
`TwitterRemoveBookmarkTweetBlock` | Remove a bookmark for a tweet on
Twitter | No error | ✅
`TwitterHideReplyBlock` | Hides a reply of one of your tweets | No error
| ✅
`TwitterUnhideReplyBlock` | Unhides a reply to a tweet | No error | ✅
`TwitterLikeTweetBlock` | Likes a tweet | No error | ✅
`TwitterGetLikingUsersBlock` | Gets information about users who liked
one of your tweets | No error | ✅
`TwitterGetLikedTweetsBlock` | Gets information about tweets liked by
you | No error | ✅
`TwitterUnlikeTweetBlock` | Unlikes a tweet that was previously liked |
No error | ✅
`TwitterPostTweetBlock` | Create a tweet on Twitter with the option to
include one additional element such as media, quote, or deep link. | No
error | ✅
`TwitterDeleteTweetBlock` | Deletes a tweet on Twitter using Twitter ID
| No error | ✅
`TwitterSearchRecentTweetsBlock` | Searches all public Tweets in Twitter
history | No error | ✅
`TwitterGetQuoteTweetsBlock` | Gets quote tweets for a specified tweet
ID | No error | ✅
`TwitterRetweetBlock` | Retweets a tweet on Twitter | No error | ✅
`TwitterRemoveRetweetBlock` | Removes a retweet on Twitter | No error |
✅
`TwitterGetRetweetersBlock` | Gets information about who has retweeted a
tweet | No error | ✅
`TwitterGetUserMentionsBlock` | Returns Tweets where a single user is
mentioned, just put that user ID | No error | ✅
`TwitterGetHomeTimelineBlock` | Returns a collection of the most recent
Tweets and Retweets posted by you and users you follow | No error | ✅
`TwitterGetUserTweetsBlock` | Returns Tweets composed by a single user,
specified by the requested user ID | No error | ✅
`TwitterGetTweetBlock` | Returns information about a single Tweet
specified by the requested ID | No error | ✅
`TwitterGetTweetsBlock` | Returns information about multiple Tweets
specified by the requested IDs | No error | ✅
`TwitterUnblockUserBlock` | Unblock a specific user on Twitter | No
error | ✅
`TwitterGetBlockedUsersBlock` | Get a list of users who are blocked by
the authenticating user | No error | ✅
`TwitterBlockUserBlock` | Block a specific user on Twitter | No error |
✅
`TwitterUnfollowUserBlock` | Allows a user to unfollow another user
specified by target user ID | No error | ✅
`TwitterFollowUserBlock` | Allows a user to follow another user
specified by target user ID | No error | ✅
`TwitterGetFollowersBlock` | Retrieves a list of followers for a
specified Twitter user ID | Need Enterprise level access | ❌
`TwitterGetFollowingBlock` | Retrieves a list of users that a specified
Twitter user ID is following | Need Enterprise level access | ❌
`TwitterUnmuteUserBlock` | Allows a user to unmute another user
specified by target user ID | No error | ✅
`TwitterGetMutedUsersBlock` | Returns a list of users who are muted by
the authenticating user | No error | ✅
`TwitterMuteUserBlock` | Allows a user to mute another user specified by
target user ID | No error | ✅
`TwitterGetUserBlock` | Gets information about a single Twitter user
specified by ID or username | No error | ✅
`TwitterGetUsersBlock` | Gets information about multiple Twitter users
specified by IDs or usernames | No error | ✅
`TwitterSearchSpacesBlock` | Returns live or scheduled Spaces matching
specified search terms [for a week only] | No error | ✅
`TwitterGetSpacesBlock` | Gets information about multiple Twitter Spaces
specified by Space IDs or creator user IDs | No error | ✅
`TwitterGetSpaceByIdBlock` | Gets information about a single Twitter
Space specified by Space ID | No error | ✅
`TwitterGetSpaceBuyersBlock` | Gets list of users who purchased a ticket
to the requested Space | I do not have a monetized account for this | ✅
`TwitterGetSpaceTweetsBlock` | Gets list of Tweets shared in the
requested Space | No error | ✅
`TwitterUnfollowListBlock` | Unfollows a Twitter list for the
authenticated user | No error | ✅
`TwitterFollowListBlock` | Follows a Twitter list for the authenticated
user | No error | ✅
`TwitterListGetFollowersBlock` | Gets followers of a specified Twitter
list | Enterprise level access | ❌
`TwitterGetFollowedListsBlock` | Gets lists followed by a specified
Twitter user | Enterprise level access | ❌
`TwitterGetListBlock` | Gets information about a Twitter List specified
by ID | No error | ✅
`TwitterGetOwnedListsBlock` | Gets all Lists owned by the specified user
| No error | ✅
`TwitterRemoveListMemberBlock` | Removes a member from a Twitter List
that the authenticated user owns | No error | ✅
`TwitterAddListMemberBlock` | Adds a member to a Twitter List that the
authenticated user owns | No error | ✅
`TwitterGetListMembersBlock` | Gets the members of a specified Twitter
List | No error | ✅
`TwitterGetListMembershipsBlock` | Gets all Lists that a specified user
is a member of | No error | ✅
`TwitterGetListTweetsBlock` | Gets tweets from a specified Twitter list
| No error | ✅
`TwitterDeleteListBlock` | Deletes a Twitter List owned by the
authenticated user | No error | ✅
`TwitterUpdateListBlock` | Updates a Twitter List owned by the
authenticated user | No error | ✅
`TwitterCreateListBlock` | Creates a Twitter List owned by the
authenticated user | No error | ✅
`TwitterUnpinListBlock` | Enables the authenticated user to unpin a
List. | No error | ✅
`TwitterPinListBlock` | Enables the authenticated user to pin a List. |
No error | ✅
`TwitterGetPinnedListsBlock` | Returns the Lists pinned by the
authenticated user. | No error | ✅
`TwitterGetDMEventsBlock` | Gets a list of Direct Message events for the
authenticated user | Need Enterprise level access | ❌
`TwitterSendDirectMessageBlock` | Sends a direct message to a Twitter
user | Need Enterprise level access | ❌
`TwitterCreateDMConversationBlock` | Creates a new group direct message
| Need Enterprise level access | ❌
### Need to add more stuff
1. A normal input to select date and time.
2. Some more enterprise-level blocks, especially webhook triggers.
Supported triggers
Event Name | Description
-- | --
Posts (by user) | User creates a new post.
Post deletes (by user) | User deletes an existing post.
@mentions (of user) | User is mentioned in a post.
Replies (to or from user) | User replies to a post or receives a reply
from another user.
Retweets (by user or of user) | User retweets a post or someone retweets
the user's post.
Quote Tweets (by user or of user) | User quote tweets a post or someone
quote tweets the user's post.
Retweets of Quoted Tweets (by user or of user) | Retweets of quote
tweets by the user or of the user.
Likes (by user or of user) | User likes a post or someone likes the
user's post.
Follows (by user or of user) | User follows another user or another user
follows the user.
Unfollows (by user) | User unfollows another user.
Blocks (by user) | User blocks another user.
Unblocks (by user) | User unblocks a previously blocked user.
Mutes (by user) | User mutes another user.
Unmutes (by user) | User unmutes a previously muted user.
Direct Messages sent (by user) | User sends direct messages to other
users.
Direct Messages received (by user) | User receives direct messages from
other users.
Typing indicators (to user) | Indicators showing when someone is typing
a message to the user.
Read receipts (to user) | Indicators showing when the user has read a
message.
Subscription revokes (by user) | User revokes a subscription to a
service or content.
---------
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
- Resolves#8930
- Depends on #8725
### Changes 🏗️
- feat(platform): Support multiple credentials inputs on blocks
Aside from `credentials`, fields within the name pattern `*_credentials`
are now also supported!
- Update docs with info on multi credentials support
### 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] Ask @aarushik93 to test
- Resolves#8931
- Follow-up to #8358
### Changes 🏗️
- Avoid double specifying provider and cred types on `credentials`
inputs
- Move `credentials` sub-schema validation from `CredentialsField` to
`CredentialsMetaInput.validate_credentials_field_schema(..)`, which is
called in `BlockSchema.__pydantic_init_subclass__`
- Use `ProviderName` enum globally
<!-- Clearly explain the need for these changes: -->
We want to be able to test the monitor page with importing and exporting
agents
### Changes 🏗️
- Adds more test ids
- Builds out monitor.page.ts
- adds import export tests
- Fixes#8791, fixes#8795, fixes#8792
<!-- Concisely describe all of the changes made in this pull request:
-->
### 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:
Writing/Running the automated tests
### Changes 🏗️
Adding incremental documentation based on YouTube series:
- How to Submit an Agent to the AutoGPT Marketplace
- How to Download and Import an Agent from the AutoGPT Marketplace
(Local Hosting)
- Creating a Basic AI Agent with AutoGPT
- How to Edit an Agent in AutoGPT
- How to Delete an Agent in AutoGPT
---------
Co-authored-by: Bently <tomnoon9@gmail.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
<!-- Clearly explain the need for these changes: -->
Nick wants others to be able to write tests besides Nick
### Changes 🏗️
<!-- Concisely describe all of the changes made in this pull request:
-->
- Fixes various import errors across the docs to fix dead links
- Adds Docs for making and debugging your own tests
---------
Co-authored-by: Swifty <craigswift13@gmail.com>
- Move `autogpt_libs.supabase_integration_credentials_store` into
`backend`
- `.store` -> `backend.integrations.credentials_store`
- `.types` -> added to `backend.data.model`
- Rename `SupabaseIntegrationCredentialsStore` to
`IntegrationCredentialsStore`
We wanted to get a few security things in quickly in #8403 and had to
make some compromises to do so. This picks those up and fixes them.
- Resolves#8540
### 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: -->
---------
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
- feat(blocks): Add GitHub Pull Request Trigger block
## feat(platform): Add support for Webhook-triggered blocks
- ⚠️ Add `PLATFORM_BASE_URL` setting
- Add webhook config option and `BlockType.WEBHOOK` to `Block`
- Add check to `Block.__init__` to enforce type and shape of webhook event filter
- Add check to `Block.__init__` to enforce `payload` input on webhook blocks
- Add check to `Block.__init__` to disable webhook blocks if `PLATFORM_BASE_URL` is not set
- Add `Webhook` model + CRUD functions in `backend.data.integrations` to represent webhooks created by our system
- Add `IntegrationWebhook` to DB schema + reference `AgentGraphNode.webhook_id`
- Add `set_node_webhook(..)` in `backend.data.graph`
- Add webhook-related endpoints:
- `POST /integrations/{provider}/webhooks/{webhook_id}/ingress` endpoint, to receive webhook payloads, and for all associated nodes create graph executions
- Add `Node.is_triggered_by_event_type(..)` helper method
- `POST /integrations/{provider}/webhooks/{webhook_id}/ping` endpoint, to allow testing a webhook
- Add `WebhookEvent` + pub/sub functions in `backend.data.integrations`
- Add `backend.integrations.webhooks` module, including:
- `graph_lifecycle_hooks`, e.g. `on_graph_activate(..)`, to handle corresponding webhook creation etc.
- Add calls to these hooks in the graph create/update endpoints
- `BaseWebhooksManager` + `GithubWebhooksManager` to handle creating + registering, removing + deregistering, and retrieving existing webhooks, and validating incoming payloads
## Other improvements
- fix(blocks): Allow having an input and output pin with the same name
- fix(blocks): Add tooltip with description in places where block inputs are rendered without `NodeHandle`
- feat(blocks): Allow hiding inputs (e.g. `payload`) with `SchemaField(hidden=True)`
- fix(frontend): Fix `MultiSelector` component styling
- feat(frontend): Add `AlertDialog` UI component
- feat(frontend): Add `NodeMultiSelectInput` component
- feat(backend/data): Add `NodeModel` with `graph_id`, `graph_version`; `GraphModel` with `user_id`
- Add `make_graph_model(..)` helper function in `backend.data.graph`
- refactor(backend/data): Make `RedisEventQueue` generic and move to `backend.data.execution`
- refactor(frontend): Deduplicate & clean up code for different block types in `generateInputHandles(..)` in `CustomNode`
- dx(backend): Add `MissingConfigError`, `NeedConfirmation` exception
---------
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
Display existing credentials (OAuth and API keys) for all current providers: Google, Github, Notion and allow user to remove them. For providers that support it, we also revoke the tokens through the API: of the providers we currently have, Google and GitHub support it; Notion doesn't.
- Add credentials list and `Delete` button in `/profile`
- Add `revoke_tokens` abstract method to `BaseOAuthHandler` and implement it in each provider
- Revoke OAuth tokens for providers on `DELETE` `/{provider}/credentials/{cred_id}`, and return whether tokens could be revoked
- Update `autogpt-server-api/baseClient.ts:deleteCredentials` with `CredentialsDeleteResponse` return type
Bonus:
- Update `autogpt-server-api/baseClient.ts:_request` to properly handle empty server responses
* feat(frontend,backend): testing
* feat: testing
* feat(backend): it works for reading email
* feat(backend): more docs on google
* fix(frontend,backend): formatting
* feat(backend): more logigin (i know this should be debug)
* feat(backend): make real the default scopes
* feat(backend): tests and linting
* fix: code review prep
* feat: sheets block
* feat: liniting
* Update route.ts
* Update autogpt_platform/backend/backend/integrations/oauth/google.py
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
* Update autogpt_platform/backend/backend/server/routers/integrations.py
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
* fix: revert opener change
* feat(frontend): add back opener
required to work on mac edge
* feat(frontend): drop typing list import from gmail
* fix: code review comments
* feat: code review changes
* feat: code review changes
* fix(backend): move from asserts to checks so they don't get optimized away in the future
* fix(backend): code review changes
* fix(backend): remove google specific check
* fix: add typing
* fix: only enable google blocks when oauth is configured for google
* fix: errors are real and valid outputs always when output
* fix(backend): add provider detail for debuging scope declines
* Update autogpt_platform/frontend/src/components/integrations/credentials-input.tsx
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
* fix(frontend): enhance with comment, typeof error isn't known so this is best way to ensure the stringifyication will work
* feat: code review change requests
* fix: linting
* fix: reduce error catching
* fix: doc messages in code
* fix: check the correct scopes object 😄
* fix: remove double (and not needed) try catch
* fix: lint
* fix: scopes
* feat: handle the default scopes better
* feat: better email objectification
* feat: process attachements
turns out an email doesn't need a body
* fix: lint
* Update google.py
* Update autogpt_platform/backend/backend/data/block.py
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
* fix: quit trying and except failure
* Update autogpt_platform/backend/backend/server/routers/integrations.py
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
* feat: don't allow expired states
* fix: clarify function name and purpose
* feat: code links updates
* feat: additional docs on adding a block
* fix: type hint missing which means the block won't work
* fix: linting
* fix: docs formatting
* Update issues.py
* fix: improve the naming
* fix: formatting
* Update new_blocks.md
* Update new_blocks.md
* feat: better docs on what the args mean
* feat: more details on yield
* Update new_blocks.md
* fix: remove ignore from docs build
---------
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>