Skip to main content

viasocket (Python)

Your own agent, acting in the apps each of your users connected through viaSocket: every action of an app is a tool, run on that user's own connection. Slack's Send Message, Google Sheets' Add New Row, HubSpot's Create Deal — any of 2,300+ apps, with no connector code and no OAuth on your side. Works with LangChain, CrewAI and LlamaIndex.

It is the Python side of the viasocket-apps npm package, and builds the same tools from the same catalog. No dependencies of its own; Python 3.10+.

pip install "viasocket[langchain]"     # or [crewai], [llamaindex]

You need three values: VIASOCKET_ORG_ID, VIASOCKET_PROJECT_ID and VIASOCKET_EMBED_SECRET. With Node.js, npx viasocket-apps setup writes them to .env after one click in the browser; without it, copy them from the viaSocket dashboard (Integrations → Create embed → Install Code). The secret stays on your server.

import os
from viasocket import ViaSocket

viasocket = ViaSocket(
    org_id=os.environ["VIASOCKET_ORG_ID"],
    project_id=os.environ["VIASOCKET_PROJECT_ID"],
    secret=os.environ["VIASOCKET_EMBED_SECRET"],
)

LangChain

from langchain.agents import create_agent
from viasocket.langchain import viasocket_tools

tools = viasocket_tools(
    viasocket,
    user="user_123",  # the unique identifier the user connected their apps under
    apps=["slack", "google-sheets"],
    actions={"slack": ["send-message"], "google-sheets": ["add-new-row-to-sheet", "lookup-spreadsheet-rows"]},
)

agent = create_agent("anthropic:claude-sonnet-5-5", tools)
agent.invoke({"messages": [{"role": "user", "content": "Post our Q3 numbers in #finance"}]})

CrewAI

from crewai import Agent
from viasocket.crewai import viasocket_tools

agent = Agent(
    role="Operations assistant",
    goal="Keep the team updated in Slack",
    backstory="You post updates where the team reads them.",
    tools=viasocket_tools(viasocket, user="user_123", apps=["slack"], actions={"slack": ["send-message"]}),
)

LlamaIndex

from llama_index.core.agent.workflow import FunctionAgent
from viasocket.llamaindex import viasocket_tools

agent = FunctionAgent(
    tools=viasocket_tools(viasocket, user="user_123", apps=["slack"], actions={"slack": ["send-message"]}),
    llm=llm,
)

How the tools behave

  • The user connects the app first, in your product, through viaSocket's connect popup (see the viasocket-apps README). A tool for an app they have not connected answers the model "Slack is not connected for this user", so the agent can ask them to; it starts working on the next call after they do.
  • Pick the actions. An app left out of actions gives every published action as a tool — fine for a small app, too many for a large one (Notion has 57). Actions are named by action_id or by their path on the app's page (send-message).
  • Tool names are <app>_<action> (slack_send-message); the input schema is built from the action's form, so the model sees the same fields, choices and help text a person would.
  • Fields that hold an id (a channel, a spreadsheet) come from the user's own account. Each app with such a field also gets a <app>_list-options tool, which lists the real values on the user's connection.
  • An error from the app comes back to the model as text, not as an exception, so one bad call does not end the run.

The same tools without a framework — a name, a description, a JSON Schema and invoke — are viasocket.agent_tools(viasocket, user, apps, actions).

License

MIT

Metadata

Release files for viasocket 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for viasocket 0.1.0
File Size Uploaded Provenance Actions
viasocket-0.1.0.tar.gz 14.1 kB With provenance Details for viasocket-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for viasocket 0.1.0
File Interpreter ABI Platform Actions
viasocket-0.1.0-py3-none-any.whl Python 3 none any Details for viasocket-0.1.0-py3-none-any.whl

Total release size: 29.8 kB

Release files / viasocket-0.1.0.tar.gz

Download URL viasocket-0.1.0.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
73b8c79ada6558454fd1ab14b77f386c72f03c213dad9933190727bfd6463a62
BLAKE2b-256 checksum
How to use checksums
eea8e89ab0b3d726a44e20691194c347d378068033a1ca2e09294c4779c50b74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / viasocket-0.1.0-py3-none-any.whl

Download URL viasocket-0.1.0-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b014a4db077aa3b20b8c3b6a36089d4475788f868d32885b250fc34c9d761d06
BLAKE2b-256 checksum
How to use checksums
7e8f2c61d0205bd7089ef268b0379ef54028a634fc5e751eaa95a2a86ebbf20a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for viasocket 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for viasocket-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page