<!-- autogpt-pipeline: autogpt-fix -->
> 🤖 Opened by Grok Bot (autogpt-fix) for Nicholas's AutoGPT bug pipeline
### Why / What / How
**Why:** Delete Telegram Message fails on every successful delete.
Telegram's `deleteMessage` returns `{"ok": true, "result": true}`, and
`call_telegram_api` always did
`TelegramMessageResult(**result["result"])`, so `**True` raised a
`TypeError`. The block reported `Failed to delete message: ... argument
after ** must be a mapping, not bool` after the message was already gone
(`is_irreversible_action=True`), never emitted `status`, and invited a
retry. Existing tests missed it because `test_mock` replaces
`_delete_message`, so the response was never parsed.
**What:** The Telegram API helpers return the raw Bot API `result`.
Callers that expect a Message parse it explicitly; Delete checks for
`True`.
**How:** Same pattern as the Copilot Telegram client
(`copilot/bot/adapters/telegram/api_client.py`), which already returns
the raw `result`.
Fixes #16215
### Changes 🏗️
- `blocks/telegram/_api.py`
- `call_telegram_api` / `call_telegram_api_with_file` return
`result.get("result")` (typed `Any`) after the existing `ok` check.
- New `_as_message(result)`: raises `TelegramAPIException` when the
result is not a dict, otherwise builds `TelegramMessageResult`.
- `get_file_info` builds `TelegramFileResult` from the dict directly (no
longer round-trips through `TelegramMessageResult`, which leaked
`message_id`/`chat`/`date`/`text` into the file result).
- `blocks/telegram/blocks.py`
- Send Message/Photo/Voice/Audio/Document/Video, Reply and Edit wrap the
helper result with `_as_message`. Behaviour unchanged.
- `_delete_message` returns `result is True`. Delete yields `status:
"Message deleted"` on `True` and raises `Failed to delete message:
Telegram did not confirm` otherwise.
- Tests
- New `blocks/telegram/telegram_api_test.py`: runs the real helpers
(JSON and multipart) against a mocked HTTP 200 for a `true` reply, a
Message dict reply and an `ok: false` reply (400 code + description
kept); `_as_message` rejects non-dicts; `get_file_info` parses a File
dict.
- New `blocks/telegram/telegram_blocks_test.py`: Delete and Edit blocks
with only `Requests.request` mocked, so the helper path runs.
- Not changed: webhook register/deregister
(`integrations/webhooks/telegram.py`) do not use the helper.
No configuration changes.
### Agents and large language models used
- Grok Bot executor agent (local run; model id not exposed to the 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] `pytest backend/blocks/telegram backend/blocks/test/test_block.py
-k "Telegram or telegram"`: 93 passed
- [x] Same new tests on `dev` (b7b75494f4): 5 fail (Delete `true` reply,
unconfirmed delete, both helpers with a `true` reply, `get_file_info`
extra fields)
- [x] pyright on touched files: 0 errors, same as `dev`
- [x] black / isort clean
<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] `.env.default` 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**)
<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: Nicholas Tindle <[email protected]>
AutoGPT — Your team of AI Experts
Bring in specialists for content, sales, research, and recurring work.
Brief them in plain English. Let Otto coordinate.
Sign up for a trial · Watch the demo · Meet the Experts · Pricing · Self-host · Contribute
One conversation. The right expertise.
Tell Otto what's on your plate. It brings in the right Experts, hands over the work, and keeps you up to date. Talk to a specialist directly when you want to get into the details.
Each Expert has a role you can shape with your instructions, context, skills, and connected apps. Start with a ready-made specialist or create your own.
| Meet your team | Put them to work |
|---|---|
| Otto · Head of AI | Coordinate a job across specialists and bring their work back to you. |
| Maria · SEO Content Manager | Turn a target keyword into a content brief and article draft. |
| Max · Account Executive | Research prospects, draft outreach, and prepare the next conversation. |
| Frankie · Executive Assistant | Prepare meeting context, email drafts, and a digest for the day. |
See the team at work
One launch brief to Otto. Maria prepares the article, Max researches prospects, and Frankie prepares the launch review.
https://github.com/user-attachments/assets/83cddd83-00f8-46e7-be9e-e0a7237c7eea
Watch the full 45-second demo → · Sign up for a trial
A 15-second highlight of a real run, edited and sped up. In this example, the team prepares the work for review without sending or publishing it.
From a first brief to a routine
- Choose your Expert. Tell Otto what you need, pick a specialist, or create one for your own way of working.
- Brief them on the job. Share the context, connect the apps they need, and agree on the first outcome.
- Review and refine. Check the work and adjust the instructions. Activate routines for jobs that keep coming back.
You choose which accounts each Expert can access, set spending controls, and follow progress in their activity.
Get started
AutoGPT Platform
Use the hosted Platform to get your team running without managing the infrastructure or supplying model API keys.
The hosted Platform is a paid service. See current plans, trial terms, and usage pricing.
Self-host AutoGPT
Run AutoGPT on your own infrastructure. You provide model credentials, configure the deployment, and manage its updates and operation.
The quickest way to self-host is the single-container image on
Docker Hub, significantgravitas/autogpt:
docker run -d \
--name autogpt \
--restart unless-stopped \
--shm-size 2g \
--ulimit nofile=65536:65536 \
--log-driver json-file \
--log-opt max-size=50m \
--log-opt max-file=5 \
-p 127.0.0.1:3000:3000 \
-e AUTOGPT_PUBLIC_URL=http://localhost:3000 \
-v autogpt-data:/data \
significantgravitas/autogpt:latest
Give the first boot a few minutes, then open http://localhost:3000, create your account, and make it the administrator:
docker exec autogpt autogpt-admin promote [email protected]
Requirements, closing signup, ports, model providers, backups, and upgrades are covered in the guide:
Read the single-container guide →
On Linux, macOS, and Windows, the installer sets up the same image with one command.
To run each service in its own container with Docker Compose, or to develop from source, use the manual self-hosting guide.
| Hosted Platform | Self-hosted | |
|---|---|---|
| Setup and operations | Managed by AutoGPT | Managed by you |
| Model access | Built in | Bring your own model credentials or a local model |
| Cost | Paid plan and usage | Your infrastructure and model usage |
| Data and infrastructure | Hosted by AutoGPT | Runs on your infrastructure |
See the license for the repository's usage terms.
Workflows when you need more control
Experts can use skills and workflows to do their jobs. The visual builder lets you define repeatable steps, connect tools, and inspect how work runs. Start with a workflow from the marketplace or build your own.
- Visual builder: connect blocks, branch logic, and control the steps.
- Marketplace: discover workflows you can adapt to your work.
- Integrations: connect the tools your team uses.
- API and MCP server: run and build workflows from your own code, or from an AI coding agent.
Build with us
Explore the code, report a problem, or help improve AutoGPT.
| Resource | Where to go |
|---|---|
| Platform source and development setup | autogpt_platform/ |
| Documentation | agpt.co/docs |
| Contributing | CONTRIBUTING.md |
| Bugs and feature requests | GitHub Issues |
| Community and support | Discord |
License
| Component | License | What it means |
|---|---|---|
autogpt_platform/ |
Polyform Shield | Free for personal and internal business use; cannot be sold as a competing hosted service |
classic/ and everything else |
MIT | Permissive open-source use |
AutoGPT Classic
Looking for the original standalone AutoGPT? Explore Classic, Forge, or agbenchmark.
Contributors
Deutsch | Español | français | 日本語 | 한국어 | Português | Русский | 中文