A local-first, extensible AI agent framework in Python
Project description
Tiphys
Your Personal AI Assistant. Python-Native. Local-First.
Tiphys is a resilient, self-hosted AI agent framework designed to run 24/7 on your own infrastructure. Built on Python's asyncio, it connects your favorite messaging platforms to powerful LLMs, giving you a personal assistant that remembers context, executes tasks, and protects your data.
Inspired by OpenClaw (formerly Moltbot), Tiphys brings the same "local-first" philosophy to the Python ecosystem, adding enterprise-grade resilience and security defaults.
Features
- State-Persistent Runtime: Powered by the Castor microkernel. Supports checkpoint/replay, allowing your agent to resume complex reasoning tasks even after a service restart or crash.
- Safety Gates (HITL): Define mandatory human approval for high-stakes tools (e.g., spending > $1.00, executing shell commands) using Castor's capability budgets. Your agent won't spend your money or delete your files without asking.
- Multi-Channel Hub: Seamlessly connect via Telegram, Discord, or the built-in WebChat while maintaining unified context. Slack & Matrix coming soon.
- Resilient Memory: Long-term vector storage (ChromaDB) ensures your agent remembers who you are and what you've discussed — weeks later.
- Task Scheduler: "Remind me every Monday at 9am to check server logs." (Cron/Interval/One-time)
- Secure Pairing: One-time code authentication (
/pair 123456) protects your DM channels. - Sandboxing: Run untrusted code or shell commands inside isolated Docker containers.
- Context Guard: Automatically manages token limits to prevent context overflow crashes.
- Auth Rotation: Rotates multiple API keys to handle rate limits and quotas gracefully.
- 24/7 Resilience: Built-in process supervision, automatic channel reconnection, and session persistence ensure your agent never sleeps.
Quick Start
Prerequisites: Have at least one LLM API key ready (e.g., OpenAI, Anthropic, or OpenRouter). Optionally, a Telegram Bot Token or Discord Bot Token if you want to connect a chat platform.
# 1. Clone & Install
git clone https://github.com/substratum-labs/tiphys.git
cd tiphys
uv sync
# 2. Configure (interactive wizard — have your API keys ready!)
uv run tiphys onboard
# 3. Launch
uv run tiphys gateway
Your agent is now live! Open http://localhost:8000 to chat via WebChat, or message your configured Telegram/Discord bot.
Deployment (Production)
For 24/7 availability, deploy Tiphys to a VPS (DigitalOcean, Hetzner, AWS) using Docker.
# 1. Clone & Configure
git clone https://github.com/substratum-labs/tiphys.git
cp .env.example .env # edit with your API keys
# 2. Start with Docker Compose
docker compose up -d
Key environment variables:
| Variable | Description |
|---|---|
TIPHYS_LLM__API_KEY |
Your LLM provider API key |
TIPHYS_LLM__PROVIDER |
Provider name (openai, anthropic, openrouter, ...) |
TIPHYS_SECRET_KEY |
Secret key for session encryption |
Architecture
Tiphys uses an async, modular "Hub & Spoke" architecture:
graph TD
User((User)) <-->|Telegram/Discord| Channel[Channel Adapters]
Channel <--> Gateway[Tiphys Gateway]
subgraph "Tiphys Core"
Gateway <--> Agent[Agent Runtime]
Agent <--> Kernel[Castor Kernel]
Agent <--> Memory[(ChromaDB Memory)]
Agent <--> Scheduler[Task Scheduler]
Agent <--> Tools[Tool Registry]
end
Kernel -.->|Checkpoint/Replay| Store[(Checkpoint Store)]
Kernel -.->|Budget & HITL| Tools
Tools -.->|Policy Check| Policy[Security Policy]
Tools --> Sandbox[Docker Sandbox]
Documentation
| Section | Description |
|---|---|
| API Reference | Auto-generated API documentation |
| Security | Security policy and architecture |
| Contributing | Development setup and PR workflow |
| Changelog | Release notes |
License
Apache 2.0 © Tiphys Contributors
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tiphys_ai-0.3.0.tar.gz.
File metadata
- Download URL: tiphys_ai-0.3.0.tar.gz
- Upload date:
- Size: 7.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d608f2bad218e9b853a60167930c8d33cde58bbb6cd403c2e8369b5cc98ac45f
|
|
| MD5 |
ba28a883211325616eed47cb1494e621
|
|
| BLAKE2b-256 |
dc0bb1b5a1ab4fb0ef8faffa0cb9c7361cf57cb655a1424652d6fd6c78e67bd4
|
File details
Details for the file tiphys_ai-0.3.0-py3-none-any.whl.
File metadata
- Download URL: tiphys_ai-0.3.0-py3-none-any.whl
- Upload date:
- Size: 233.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f09e70d5f28a5797739d05fad352b4c051b0a55651c877435ae7b4989155ac3d
|
|
| MD5 |
9fb1bf1e623c10f8c2ab7f1c41ce4b63
|
|
| BLAKE2b-256 |
6b6f88f11e8eea712d8ef28d44e9dd25cba55e2cdf1c3ad76790ce8e45f17b99
|