Skip to main content

Brazilian WhatsApp Agno Interface

Integre agentes, equipes e workflows do Agno com o WhatsApp de forma simples usando FastAPI.

Este pacote fornece um adapter pronto para expor endpoints de status e webhook do WhatsApp, encaminhando mensagens recebidas para um agente ou workflow do Agno.

Recursos

  • Criação automática de um router FastAPI para WhatsApp
  • Suporte a agent, team e workflow
  • Endpoints prontos para:
    • GET /status
    • GET /webhook
    • POST /webhook
  • Suporte opcional a criptografia para telefone
  • Configuração de token de verificação, ID do número e timeout para mídia

Instalação

Instale o pacote via pip:

pip install brazilian-whatsapp-agno-interface

Ou usando uv:

uv pip install brazilian-whatsapp-agno-interface

Uso rápido

from fastapi import FastAPI
from brazilian_whatsapp_agno_interface import BrazilianWhatsApp

app = FastAPI()

interface = BrazilianWhatsApp(
    agent=my_agent,
    prefix="/whatsapp",
)

app.include_router(interface.get_router())

Configuração

Você pode passar os seguintes parâmetros ao criar a interface:

  • agent: agente do Agno
  • team: equipe do Agno
  • workflow: workflow do Agno
  • prefix: prefixo do router, padrão /whatsapp
  • access_token: token de acesso do WhatsApp
  • phone_number_id: ID do número do WhatsApp
  • verify_token: token usado para verificação do webhook
  • media_timeout: timeout para upload/download de mídia
  • enable_encryption: habilita criptografia para números de telefone
  • encryption_key: chave hexadecimal de 32 bytes para criptografia

Variáveis de ambiente

Quando a criptografia estiver ativada, você pode definir:

export WHATSAPP_ENCRYPTION_KEY="sua_chave_hexadecimal"

Endpoints

O router expõe:

  • GET /status: retorna o status do serviço
  • GET /webhook: valida a chamada de verificação do webhook
  • POST /webhook: processa mensagens recebidas pelo WhatsApp

Desenvolvimento

Para executar os testes localmente:

pytest -v

Licença

Este projeto é distribuído sob a licença MIT.

Metadata

Release files for brazilian-whatsapp-agno-interface 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brazilian-whatsapp-agno-interface 0.1.0
File Size Uploaded Provenance
brazilian_whatsapp_agno_interface-0.1.0.tar.gz 10.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for brazilian-whatsapp-agno-interface 0.1.0
File Interpreter ABI Platform
brazilian_whatsapp_agno_interface-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.9 kB

Release files / brazilian_whatsapp_agno_interface-0.1.0.tar.gz

Download URL brazilian_whatsapp_agno_interface-0.1.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f5c2760e4f1e11c4321a037a974966f64a289d3d3579db11a589928730e89a01
BLAKE2b-256 checksum
How to use checksums
85154de97c62939e1194e0b7c315c28e1798e51b1a776af0ae164e76876eac00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / brazilian_whatsapp_agno_interface-0.1.0-py3-none-any.whl

Download URL brazilian_whatsapp_agno_interface-0.1.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98b909c80254e2c1751b12619a04ba927dc5921cc77d8d1fbaad67944c5936f9
BLAKE2b-256 checksum
How to use checksums
feaf05c603db5fac2e2022cbc77c4c42b17acaf438d8b49f4547e078755b3516
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for brazilian-whatsapp-agno-interface 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page