Pine AI SDK — Let Pine AI handle your digital chores. Socket.IO + REST client.
Project description
pine-assistant
Pine AI SDK for Python. Let Pine AI handle your digital chores.
Install
pip install pine-assistant # SDK only
pip install pine-assistant[cli] # SDK + CLI
Quick Start (Async)
from pine_assistant import AsyncPineAI
client = AsyncPineAI(access_token="...", user_id="...")
await client.connect()
session = await client.sessions.create()
await client.join_session(session["id"])
async for event in client.chat(session["id"], "Negotiate my Comcast bill"):
print(event.type, event.data)
await client.disconnect()
Quick Start (CLI)
pine auth login # Email verification
pine chat # Interactive REPL
pine send "Negotiate my Comcast bill" # One-shot message
pine sessions list # List sessions
pine task start <session-id> # Start task (Pro)
Handling Events
Pine AI behaves like a human assistant. After you send a message, it sends acknowledgments, then work logs, then the real response (form, text, or task_ready). Don't respond to acknowledgments — only respond to forms, specific questions, and task lifecycle events, or you'll create an infinite loop.
Continuing Existing Sessions
# List all sessions
result = await client.sessions.list(limit=20)
# Continue an existing session
await client.join_session(existing_session_id)
history = await client.get_history(existing_session_id)
async for event in client.chat(existing_session_id, "What is the status?"):
...
Attachments
# Upload a document for dispute tasks
attachments = await client.sessions.upload_attachment("bill.pdf")
Stream Buffering
Text streaming is buffered internally. You receive one merged text event, not individual chunks. Work log parts are debounced (3s silence).
Payment
Pro subscription recommended. For non-subscribers:
from pine_assistant import AsyncPineAI
print(f"Pay at: {AsyncPineAI.session_url(session_id)}")
License
MIT
Project details
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 pine_assistant-0.3.1.tar.gz.
File metadata
- Download URL: pine_assistant-0.3.1.tar.gz
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4c1694074e006456debea0a52c49fdc8281467398573dc52907e39f763bf3a0
|
|
| MD5 |
d78d032d477afbbc50e71ddf42d3136b
|
|
| BLAKE2b-256 |
dd63550d7cb54594cebe28f42032fdc3f0bfa7717539c8546c015423e7dab714
|
Provenance
The following attestation bundles were made for pine_assistant-0.3.1.tar.gz:
Publisher:
publish.yml on 19PINE-AI/pine-assistant-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pine_assistant-0.3.1.tar.gz -
Subject digest:
d4c1694074e006456debea0a52c49fdc8281467398573dc52907e39f763bf3a0 - Sigstore transparency entry: 975812875
- Sigstore integration time:
-
Permalink:
19PINE-AI/pine-assistant-python@b00cd5169c23cecc70fa08c0f449412f5f208943 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/19PINE-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b00cd5169c23cecc70fa08c0f449412f5f208943 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pine_assistant-0.3.1-py3-none-any.whl.
File metadata
- Download URL: pine_assistant-0.3.1-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bde2dd9c720d6b772002cb394091ab00ab314fdfbef19749b41d541e8df5aa4
|
|
| MD5 |
1fc66f1b21a1ecfd0255eecb205163a8
|
|
| BLAKE2b-256 |
bd58d4c85202785236364384b2f7d27fe3fcfc42fa66d2045587d23f5e5d48c7
|
Provenance
The following attestation bundles were made for pine_assistant-0.3.1-py3-none-any.whl:
Publisher:
publish.yml on 19PINE-AI/pine-assistant-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pine_assistant-0.3.1-py3-none-any.whl -
Subject digest:
5bde2dd9c720d6b772002cb394091ab00ab314fdfbef19749b41d541e8df5aa4 - Sigstore transparency entry: 975812877
- Sigstore integration time:
-
Permalink:
19PINE-AI/pine-assistant-python@b00cd5169c23cecc70fa08c0f449412f5f208943 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/19PINE-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b00cd5169c23cecc70fa08c0f449412f5f208943 -
Trigger Event:
push
-
Statement type: