Official Python SDK for the Vested AI ConnectorHub.
Project description
Vested AI Connector SDK (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 |
| 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):
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 vested_connect_sdk-0.4.0.tar.gz.
File metadata
- Download URL: vested_connect_sdk-0.4.0.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdb2eb2ef3324132d48dac122e9d89e7efc80e1385b4af25b7c8a8edce4ac0d4
|
|
| MD5 |
99f7565f90ca07b7d9f10273d5aeef7f
|
|
| BLAKE2b-256 |
4007f7f3a85ce37e9101ae504004b425ffbf5df647029d456bda23f3013a13b3
|
File details
Details for the file vested_connect_sdk-0.4.0-py3-none-any.whl.
File metadata
- Download URL: vested_connect_sdk-0.4.0-py3-none-any.whl
- Upload date:
- Size: 27.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dd8a27399d9e6cac208aaa453486728a90d016f8d4e04dd75770ae9350fb3a4
|
|
| MD5 |
ae3be2bb68e25d1962b6daf9a7f6fa84
|
|
| BLAKE2b-256 |
eb9b44600aa1ee14c08eb0479c2872fa9b0aa58587b3c69b92e3eb8568c09d2e
|