SuperAPI AI Directory

trustclaw

ComposioHQ's self-hostable personal AI agent with vector memory, native Composio tool integrations, and a Telegram front-end. MIT.

Open website

About this tool

Purpose

TrustClaw is a self-hostable personal AI agent, positioned as a personal assistant that is online 24/7. It converses with users through a web dashboard or a Telegram bot, is able to remember important information over the long term, and automatically handles repetitive tasks, achieving "doing things for you while you sleep."

Main Capabilities

  • Multi-frontend interaction: You can converse with Claude in the Next.js dashboard, and also communicate through a Telegram bot.
  • Long-term memory: Vector memory support provided by Postgres + pgvector.
  • Context management: Three-layer context management (pruning, memory refresh, summary compression), enabling conversations to continue indefinitely.
  • Tool integration: Integrate 1000+ tools through Composio (Gmail, GitHub, Slack, Notion, Linear, Calendar, Drive, Stripe, HubSpot, etc.), with access controlled by the user's connected accounts.
  • Scheduled tasks: Supports Cron-scheduled agent runs for handling repetitive tasks.
  • Account authentication: Username/password login implemented through Better Auth.

Security Model

TrustClaw has been redesigned for the security issues of running AI agents locally:

  • Do not hand raw API keys to the agent: Composio proxies OAuth for each tool.
  • Do not run code on the user's machine: Every tool call is executed in an isolated remote environment.
  • Do not provide long-term Shell access: Malicious prompt injection from scraped emails cannot execute destructive commands on the user's laptop, because the agent has no Shell on the user's laptop.

Tech Stack

  • Next.js 15 (App Router) + React 19
  • tRPC handles backend logic
  • Better Auth (username/password)
  • Prisma + Postgres + pgvector
  • Vercel AI SDK + AI Gateway (LLM + embeddings)
  • Composio SDK for tool integration
  • Tailwind CSS + shadcn/ui
  • Redis (resumable streams, optional)

How to Use

1. One-click deploy to Vercel

One command, completed in about 2 minutes. The CLI handles the entire process. Requires:

  • Vercel account (npx vercel login once)
  • GitHub account (gh auth login once)
  • Free Composio API key (install CLI:curl -fsSL https://composio.dev/install | bash)

LLM and embedding calls are routed through Vercel AI Gateway, with no need for an Anthropic or OpenAI API key.

Local Manual Setup

If you skip the deployment CLI and run TrustClaw locally: local AI Gateway access can run vercel link && vercel env pull to obtain a short-term OIDC token, or manually set AI_GATEWAY_API_KEY. For Telegram, point the bot webhook to <NEXT_PUBLIC_APP_URL>/api/telegram-webhook, with TELEGRAM_WEBHOOK_SECRET as the secret token. For the required environment variables, see .env.example full template.

Applicable Scenarios

  • Personal daily assistant: converse through Telegram or the web to manage schedules, email, tasks, etc.
  • Automation of repetitive work: use Cron scheduling to let the agent automatically execute periodic tasks.
  • Continuous conversations requiring long-term memory: three-layer context management supports long, uninterrupted conversations.
  • Security-sensitive self-hosting scenarios: users who do not want code executed on their own machine or raw API keys exposed.

Limitations and Notes

Vercel Free (Hobby) Plan Limitations

  • Cron jobs can only run once per day, and are triggered within a 60-minute window before and after the scheduled hour. Any cron expression more frequent than daily (such as hourly, every 30 minutes) will fail when deployed on Hobby. When the CLI detects Hobby, it will automatically set vercel.json Change to a daily schedule.
  • The function duration limit is 300 seconds (5 minutes); long-running agent turns may time out.
  • If minute-level cron precision and up to about 800 seconds per function (about 13 minutes) are needed, upgrade to Vercel Pro and rerun the CLI (or manually set vercel.json back to * * * * * and increase maxDuration).

Usage limits and billing

TrustClaw has built-in Redis-based per-user rate limiting at the chat, Cron, and Telegram agent entry points. It is enabled by default and controlled by the following environment variables:

  • RATE_LIMIT_CHAT_PER_MINUTE / RATE_LIMIT_CHAT_PER_DAY
  • RATE_LIMIT_CRON_PER_DAY
  • RATE_LIMIT_TELEGRAM_PER_MINUTE
  • RATE_LIMIT_FAIL_MODE(in the development environment, open; in other environments, closed)
  • RATE_LIMIT_ENABLED=false can bypass all agent entry point limits

Production environments need to configure REDIS_URL, or explicitly set RATE_LIMIT_FAIL_MODE=open / RATE_LIMIT_ENABLED=false. If you expose a TrustClaw instance to the internet for strangers to register, you should at minimum add: server-enforced monthly per-user message/tool call limits; if you need to recover costs, you can add billing or invitation-only registration.

Project and license

The project is built on Composio, inspired by OpenClaw, and reimplemented for security. It uses the MIT license; see LICENSE for details. Bug reports, feature ideas, and PRs are welcome; see CONTRIBUTING.md for contribution guidelines. For security issues, please email sarah@composio.dev directly instead of filing a public issue.