Skip to main content

Vested AI Connector SDK (Python)

Build PyPI License Python

Connect any Python service to the Vested AI platform. The SDK opens a long-lived gRPC stream to the hub, declares agents and tools over that stream, and dispatches tool calls to your handler code — no polling, no webhook setup, no managing your own LLM client. The hub handles model selection, prompt composition, and conversation state; your connector owns the business logic.

Install

pip install vested-connect-sdk

Or run the Docker image: vestedai/vested-ai-connector-sdk-python:0.2.0 (also :latest, multi-arch amd64/arm64).

5-Line Connector

from vested_connect import ConnectorApp, agent, tool, ToolHandler, ToolContext, BaseModel, Field

@agent(key="myapp.orders", name="Orders", instruction="You help users look up their orders.")
class OrdersAgent: ...

@tool(agent_key="myapp.orders", key="myapp.orders.get", name="Get order", description="Returns an order by ID.")
class GetOrder(ToolHandler):
    class Args(BaseModel):
        id: str = Field(description="Order ID")
    async def handle(self, args: Args, ctx: ToolContext) -> dict:
        return {"status": "shipped"}  # replace with a real lookup

ConnectorApp.create().scan_module(__name__).run(token=..., hub="hub.example.com:4443")

What This Is

A connector is a long-lived worker process that registers one or more agents with the Vested AI hub. Each agent carries a model selection, a set of instruction blocks, and a set of tool definitions. Admins can override instruction bodies and disable tools in the admin UI; the connector's declared baseline is the floor that overrides are layered on top of. The hub routes LLM tool calls back to the connector over the same stream; the connector dispatches them to your handler code and returns results.

This differs from writing your own LLM client. The connector does not call the LLM directly. It registers capability and responds to callbacks. Prompt composition, model routing, conversation history, streaming to end users — all of that lives in the hub. The connector's surface area is: "declare what agents exist, implement what the tools do."

Documentation

Document What's in it
Quickstart Install, write your first agent + tool, run the worker, verify in the admin UI
Concepts Agents, tools, instructions, baselines vs overrides, inheritance state machine, reconciliation
API reference ConnectorApp, @agent, @tool, ToolHandler, ToolContext
Operations Docker, env vars, observability, reconnect supervisor, asyncio notes, gotchas
Upgrading Coming from the PHP SDK; v0.2.x patch notes
Per-user credentials Act on behalf of the calling user: sealed credentials the platform cannot read, validation, key rotation
Doc index Full table of contents including protocol reference

License + Status

MIT. Current release: v0.3.0 (asyncio + grpcio runtime, decorator API, Pydantic v2 schema generation, connector-declared tool sensitivity). On PyPI as vested-connect-sdk and Docker Hub as vestedai/vested-ai-connector-sdk-python.

Other language SDKs

Same wire protocol, same hub — all four SDKs are at feature parity (including connector-declared tool sensitivity):

  • PHP — Packagist vested-ai/connector-sdk-php
  • Node.js — npm @vested-ai/connector-sdk
  • C# / .NET — NuGet VestedAI.ConnectorSdk

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vested_connect_sdk-0.5.2.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

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

vested_connect_sdk-0.5.2-py3-none-any.whl (34.7 kB view details)

Uploaded Python 3

File details

Details for the file vested_connect_sdk-0.5.2.tar.gz.

File metadata

  • Download URL: vested_connect_sdk-0.5.2.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for vested_connect_sdk-0.5.2.tar.gz
Algorithm Hash digest
SHA256 fe880141beb220c2ff1a105147afb5a79d4dca3508b3e4478147627171bb747b
MD5 67796528672339de9c0075704f20c220
BLAKE2b-256 4922c85878323cf34aae1dd6aaf89f3f1e1775995a3438e780efdc04934d9f54

See more details on using hashes here.

File details

Details for the file vested_connect_sdk-0.5.2-py3-none-any.whl.

File metadata

File hashes

Hashes for vested_connect_sdk-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d4d8b3f82e255121be211f3ddcf66dd82692f1e23e4a37eed75ba5df6dac9a65
MD5 d90d2d3365fd1cccaeb869f8d01def40
BLAKE2b-256 a6ca6fd9f3de2640e5b2c66f61a6d6c873d04d3bfd4a91cb45f7317219e2e97e

See more details on using hashes here.

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