Skip to main content

Official Python SDK for the Vested AI ConnectorHub.

Project description

Vested AI Connector SDK (Python)

Build 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

Coming soon to PyPI. The package will be published as vested-connect-sdk when v0.2.0 ships. Until then, install from source.

pip install vested-connect-sdk

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
Doc index Full table of contents including protocol reference

License + Status

MIT. Current release: v0.2.0-dev (asyncio + grpcio runtime, decorator API, Pydantic v2 schema generation). Pre-release; not yet on PyPI.

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

vested_connect_sdk-0.2.0.tar.gz (23.3 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.2.0-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for vested_connect_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cc0974177c6b550b53845ed1be7d76e611d8fd50c9d324fdf6a947ab9d416b83
MD5 01681587cc944bad937b522267c92f4f
BLAKE2b-256 8fb37c76cd1725bd491ae9b958831613b5b4a4c23fd05bbe44b7adbd4ca1c5db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vested_connect_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e686a135f6fbec5e038d01f165c65c38b422b95409d66f3910792ff928de2fed
MD5 0e9053e7fa1439ba3025dfb682dfc2b8
BLAKE2b-256 6a753a9af048d9f99e74990f16af2206b8d39ac19ffe52f579b1f85a8c192a7e

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