Pincer – Python AI agent framework, security-first

(github.com)

1 points | by vpu2301 9 hours ago ago

1 comments

  • vpu2301 9 hours ago ago

    Pincer is a Python framework for building AI agents that run on messaging platforms (WhatsApp, Telegram, Discord).

    What it does: you define tools (web search, email, calendar, shell, code execution, etc.), connect to a messaging channel, and the agent handles requests using a ReAct loop. Cross-channel memory so context persists regardless of which platform you message from.

    Technical decisions worth discussing:

    - SQLite + FTS5 for memory instead of a vector DB. Handles retrieval well for personal-agent scale, zero infrastructure overhead. Would be interested in hearing if others have hit limits with this approach.

    - Skill sandboxing via subprocess isolation with declared network whitelists and AST scanning before install. Each skill declares what domains it needs, everything else is blocked. Filesystem access is restricted per-skill.

    - Multi-provider: Claude, GPT-4, DeepSeek, Ollama. The Ollama path means fully local inference with no external API calls at all.

    - Cost controls are enforced at the framework level — daily budget caps, real-time tracking, automatic model downgrade when budget runs low. This is non-optional, not a setting you have to remember to enable.

    - Whole codebase is under 8K LOC. Intentionally compact so it's auditable.

    Stack: asyncio, aiogram (Telegram), neonize (WhatsApp), discord.py. Install: pip install pincer-agent or docker compose up. MIT licensed.

    Docs: https://pincer.sh/docs

    Happy to go deeper on any of the architecture decisions.