A portable and componentized agent framework
Project description
psi-agent
中文 | English
A portable and componentized agent framework.
Introduction
psi-agent is built on two core principles:
- Portability: Copy just the
workspacedirectory to migrate your agent completely. - Componentization: Agents are assembled from independent components that communicate via Unix sockets, ensuring loose coupling.
Installation
Using uvx (Recommended)
For quick one-off usage without cloning the repository:
uvx psi-agent <component> <subcommand> [options...]
# e.g., uvx psi-agent session --workspace ./workspace ...
Using pip
pip install psi-agent
Using uv
uv add psi-agent
Quick Start
- Create a workspace directory with your tools and skills (or use an example from
examples/):
mkdir -p workspace/{tools,skills,systems}
See examples/a-simple-bash-only-workspace/ for a minimal example, or examples/an-openclaw-like-workspace/ for a more complete setup.
- Start the session:
psi-agent session \
--workspace ./workspace \
--channel-socket ./channel.sock \
--ai-socket ./ai.sock
- Start an AI provider (e.g., OpenAI-compatible):
psi-agent ai openai-completions \
--session-socket ./ai.sock \
--model <model-name> \
--api-key <your-api-key> \
--base-url <provider-api-url> # e.g., https://openrouter.ai/api/v1
- Start a channel to interact with your agent session:
psi-agent channel repl --session-socket ./channel.sock
CLI Interfaces
psi-agent provides two CLI interfaces:
-
Subcommand interface (preferred):
psi-agent <component> <subcommand>- Works with
uvxwithout cloning the repository - Single entry point, easier to discover
- Examples:
psi-agent ai openai-completions,psi-agent channel repl
- Works with
-
Standalone commands:
psi-<component>-<subcommand>- Shorter to type
- Useful in scripts
- Examples:
psi-ai-openai-completions,psi-channel-repl
Both interfaces are functionally identical. The subcommand interface is recommended for general use.
Components
psi-agent consists of four component types:
| Component | Purpose |
|---|---|
psi-ai-* |
LLM provider adapters (OpenAI, Anthropic, etc.) |
psi-session |
Agent runtime loop, handles messages and tool calls |
psi-channel-* |
Message channels (REPL, Telegram, Feishu, etc.) |
psi-workspace-* |
Workspace packaging and mounting tools |
Available Commands
After installation, these commands are available:
Subcommand format (preferred):
psi-agent ai openai-completions- OpenAI-compatible completion serverpsi-agent ai anthropic-messages- Anthropic messages serverpsi-agent session- Agent session runtimepsi-agent channel repl- Interactive REPL interfacepsi-agent channel cli- CLI channel interfacepsi-agent channel telegram- Telegram bot channelpsi-agent workspace pack- Package workspace to squashfspsi-agent workspace unpack- Extract squashfs to directorypsi-agent workspace mount- Mount squashfs as overlayfspsi-agent workspace umount- Unmount workspacepsi-agent workspace snapshot- Create workspace snapshot
Standalone format (also available):
psi-ai-openai-completionspsi-ai-anthropic-messagespsi-sessionpsi-channel-replpsi-channel-clipsi-channel-telegrampsi-workspace-packpsi-workspace-unpackpsi-workspace-mountpsi-workspace-umountpsi-workspace-snapshot
Documentation
For detailed documentation including workspace structure, tool development, and configuration, see CLAUDE.md.
License
GNU Affero General Public License v3.0 - see LICENSE.md for details.
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 psi_agent-0.0.1a20260513.tar.gz.
File metadata
- Download URL: psi_agent-0.0.1a20260513.tar.gz
- Upload date:
- Size: 655.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfb99dc4cdc48ebed06eb6f59f4b160de361dd8499e196a967ced37655b6897d
|
|
| MD5 |
c5c0d60abe1ab64e07fb5fc6e40745e8
|
|
| BLAKE2b-256 |
befaee31912121c7c789ec9f29dd3735743cfe664e44e1484d6df545574a49e1
|
File details
Details for the file psi_agent-0.0.1a20260513-py3-none-any.whl.
File metadata
- Download URL: psi_agent-0.0.1a20260513-py3-none-any.whl
- Upload date:
- Size: 119.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b140bab7c99b8a9704bd34634218d7a838e792430d276b7466c17f373f4807b
|
|
| MD5 |
5214f50d9111a3e72ba5c811b0b79f38
|
|
| BLAKE2b-256 |
ac0e3ae0aeefab4eac48b2ed3fd42434194efb34794e97392a74a565d58b279f
|