Metadata-Version: 2.4
Name: pupa-backend
Version: 0.0.72
Summary: Pupa A2UI agent backend
Project-URL: Homepage, https://github.com/pupa-app/pupa-backend
Project-URL: Repository, https://github.com/pupa-app/pupa-backend
Project-URL: Changelog, https://github.com/pupa-app/pupa-backend/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/pupa-app/pupa-backend/issues
Author-email: Pupa <pupa-app-help@proton.me>
License-Expression: MIT
License-File: LICENSE
Keywords: ag-ui,agent,fastapi,langgraph,llm
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.11
Requires-Dist: ag-ui-langgraph>=0.0.42
Requires-Dist: boto3>=1.34.0
Requires-Dist: claude-agent-sdk>=0.2.106
Requires-Dist: copilotkit>=0.1.88
Requires-Dist: deepagents>=0.6.0
Requires-Dist: fastapi>=0.110.0
Requires-Dist: fastmcp>=3.4.2
Requires-Dist: langchain-anthropic>=0.3.0
Requires-Dist: langchain-aws>=0.2.0
Requires-Dist: langchain-mcp-adapters>=0.2.2
Requires-Dist: langchain-openai>=0.3.0
Requires-Dist: langchain-tavily>=0.1.0
Requires-Dist: langchain>=1.0.0
Requires-Dist: langfuse<4.0.0,>=3.0.0
Requires-Dist: langgraph-checkpoint-postgres>=2.0.0
Requires-Dist: langgraph-checkpoint-sqlite>=2.0.0
Requires-Dist: langgraph>=1.0.0
Requires-Dist: psycopg[binary,pool]>=3.2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: qrcode>=8.0.0
Requires-Dist: uvicorn[standard]>=0.30.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Provides-Extra: setup
Requires-Dist: cryptography>=42.0.0; extra == 'setup'
Requires-Dist: pyyaml>=6.0; extra == 'setup'
Description-Content-Type: text/markdown

# pupa-backend

FastAPI / LangGraph backend that powers the [Pupa](https://github.com/pupa-app/pupa-backend)
iOS / macOS client. Speaks plain [AG-UI](https://github.com/ag-ui-protocol/ag-ui)
over a single `POST /` SSE stream; pair-once auth keeps a long-lived token in
each device's Keychain. Runs locally next to the client, or in the cloud
(Railway + Postgres).

## Install

Install from PyPI with [uv](https://docs.astral.sh/uv/) (isolated tool venv, puts
the `pupa-backend` CLI on your PATH):

```bash
uv tool install "pupa-backend[setup]"          # latest
uv tool install "pupa-backend[setup]==0.0.72"  # pin to match your app
```

## Quick start

```bash
pupa-backend run              # start the backend on :8004
pupa-backend pair             # mint a QR pairing code for your iPhone
pupa-backend status           # is it running?
pupa-backend service-install  # run as launchd / systemd background service
```

LLM credentials (AWS Bedrock, Anthropic, or any OpenAI-compatible endpoint) live
in your shell environment, never in the config file. Configuration is written by
`pupa-backend setup` to `~/.pupa-backend/config.yml`.

## Auth model

The backend **requires auth by default** — the only client credential is a
paired-device token in the iOS Keychain. Set `PUPA_API_KEY` server-side, run
`pupa-backend pair` for an 8-char code, and pair from the app. For a same-laptop
dev loop only, `PUPA_AUTH_DISABLED=1` skips auth entirely (never on a reachable
backend).

## Documentation

Full docs, architecture, deploy runbook, and contributing guide live in the
[GitHub repository](https://github.com/pupa-app/pupa-backend):

- [Architecture](https://github.com/pupa-app/pupa-backend/blob/main/docs/architecture.md)
- [Deploy (Railway + Postgres + Langfuse)](https://github.com/pupa-app/pupa-backend/blob/main/docs/deploy.md)
- [Contributing](https://github.com/pupa-app/pupa-backend/blob/main/CONTRIBUTING.md)
- [Changelog](https://github.com/pupa-app/pupa-backend/blob/main/CHANGELOG.md)

## License

[MIT](https://github.com/pupa-app/pupa-backend/blob/main/LICENSE)
