PromptPipe

module
v0.0.0-...-c1e920f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2026 License: MIT

README

PromptPipe

PromptPipe is a Go-based WhatsApp messaging service built on the whatsmeow client. It exposes a REST API to send and schedule prompts, track receipts and responses, and run a stateful conversation flow (intake + feedback). OpenAI-backed GenAI features are optional.

Table of Contents

Overview

Key capabilities:

  • Send and schedule prompts (static, genai, branch, conversation, custom)
  • WhatsApp integration via whatsmeow
  • Conversation flow with intake and feedback modules
  • Auto-enrollment of new participants (optional)
  • Receipt/response tracking and timer introspection
  • SQLite or PostgreSQL for application data

Quickstart

# Build
make build

# Run (loads .env if present)
./build/promptpipe

Optional GenAI configuration:

export OPENAI_API_KEY="your-openai-key"
./build/promptpipe

PromptPipe searches for .env files in ./.env, ../.env, and ../../.env.

Configuration

See docs/configuration.md for environment variables, CLI flags, defaults, and precedence rules.

API Reference

See docs/api.md for endpoints, request/response schemas, and examples. API test scripts live in test-scripts/.

Conversation Flow

See docs/conversation.md for the current flow summary and docs/conversation-flow.md for detailed behavior.

Storage

See docs/storage.md for database layout and persistence details.

Development

See docs/development.md for build/test instructions.

Docs Index

Current implementation references:

Legacy or historical design docs (kept for reference):

Python/LangChain subproject: the python/langchain directory is experimental and not integrated with the Go service. Its documentation is marked accordingly.

License

MIT License. See LICENSE.

Directories

Path Synopsis
cmd
PromptPipe command
internal
api
Package api provides HTTP handlers and the main API server logic for PromptPipe.
Package api provides HTTP handlers and the main API server logic for PromptPipe.
flow
filepath: internal/flow/branch.go
filepath: internal/flow/branch.go
lockfile
Package lockfile provides directory-based locking to prevent multiple PromptPipe instances.
Package lockfile provides directory-based locking to prevent multiple PromptPipe instances.
messaging
Package messaging provides hook registry for persistent hook management
Package messaging provides hook registry for persistent hook management
models
Package models defines flow type definitions to avoid circular imports.
Package models defines flow type definitions to avoid circular imports.
recovery
Package recovery provides infrastructure helpers for wiring up recovery in the main application
Package recovery provides infrastructure helpers for wiring up recovery in the main application
store
Package store provides the DedupRepo interface for inbound message deduplication.
Package store provides the DedupRepo interface for inbound message deduplication.
testutil
Package testutil provides common test utilities and helpers for PromptPipe tests.
Package testutil provides common test utilities and helpers for PromptPipe tests.
tone
Package tone provides a fixed whitelist of user tone tags, validation, EMA-based smoothing, mutual-exclusion enforcement, and prompt-guide construction for the implicit user-tone feature.
Package tone provides a fixed whitelist of user tone tags, validation, EMA-based smoothing, mutual-exclusion enforcement, and prompt-guide construction for the implicit user-tone feature.
util
Package util provides environment variable parsing helpers shared across components.
Package util provides environment variable parsing helpers shared across components.
whatsapp
Package whatsapp wraps the Whatsmeow client for WhatsApp integration in PromptPipe.
Package whatsapp wraps the Whatsmeow client for WhatsApp integration in PromptPipe.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL