Skip to main content

Pine AI SDK — Let Pine AI handle your digital chores. Socket.IO + REST client.

Project description

pine-assistant

PyPI version Python versions license

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

pine_assistant-0.3.2.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pine_assistant-0.3.2-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file pine_assistant-0.3.2.tar.gz.

File metadata

  • Download URL: pine_assistant-0.3.2.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pine_assistant-0.3.2.tar.gz
Algorithm Hash digest
SHA256 9c01741471bdeeddea4f35b2659059a6b33ead585645093382b69f3d10d21e06
MD5 c649f28d2bf00d742379b92481ba9fbe
BLAKE2b-256 be64cc138d2462869789f9b7b9511f077f9a221399a748bcf61d92450de400fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for pine_assistant-0.3.2.tar.gz:

Publisher: publish.yml on 19PINE-AI/pine-assistant-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pine_assistant-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: pine_assistant-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pine_assistant-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 edccbf8edb07ba6e3e29520d56c132694adf0da0161edb39ff191f6b61bc427a
MD5 86baaa7a877573102d02e0d043674fb8
BLAKE2b-256 e6c2cc24c961d90a94a6627682376734951594680b6827b6f3d65f2f03dfb756

See more details on using hashes here.

Provenance

The following attestation bundles were made for pine_assistant-0.3.2-py3-none-any.whl:

Publisher: publish.yml on 19PINE-AI/pine-assistant-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page