Bring your own account. PraisonAI ships no registry code and no default endpoint. You supply your own account token or a self-hosted base URL. The connector is disabled until
TOOL_PROXY_URL is set.Quick Start
1
Install and configure
2
Give the three functions to an agent
How It Works
The connector exposes three functions over the registry’s plain-HTTP surface.
The registry HTTP routes the connector talks to:
Self-Hosting the Registry
treg is an external, self-hostable tool registry. These are the exact steps to stand up a local registry for testing.1
Clone treg
2
Install (Python 3.12–3.13)
3
Boot the server
4
Mint an API token
X-Treg-Token header — set TOOL_PROXY_AUTH_HEADER=X-Treg-Token so the connector sends the raw token instead of Bearer {token}.
The Three Functions
Each function is an agent tool that defaults to theTOOL_PROXY_URL / TOOL_PROXY_TOKEN environment variables.
registry_search
Free capability search returning catalogue matches for a natural-language query.registry_describe
Free read returning an endpoint’s parameters, HTTP method, price-per-call and an example response.registry_call
Paid invoke. The registry injects the upstream vendor credential server-side. The HTTP method is auto-derived from the describe doc; GET params are sent as the query string, POST/PUT as a JSON body.Configuration Options
Configure the connector with environment variables (zero-code) or per-call keyword arguments.Environment Variables
Constructor / Per-Call Options
RegistryProxyTool accepts these options; the same names work as optional keyword arguments on registry_search, registry_describe and registry_call.
Spend Guards
registry_call accepts optional budget guards that deny and report a call as a tool-result error before any money is spent.
- Per-call price is read from
registry_describe, so guards work without vendor-specific configuration. - Guards fail closed: if a budget is set but the price cannot be read (or is non-finite/negative), the call is denied.
max_session_spendpersists across separateregistry_callinvocations in the same process, scoped per(proxy_url, token)so distinct accounts never share a budget.
Security Model
The connector is designed so a prompt-injected agent cannot leak the proxy token or spend uncontrolled money.Credentials injected server-side
Credentials injected server-side
The registry injects the upstream vendor credential — the agent only ever holds the single proxy token, never vendor keys.
Token-trust rule
Token-trust rule
The env
TOOL_PROXY_TOKEN is attached only when the URL is also env-derived. If an agent supplies proxy_url at call time, the ambient token is not sent — a prompt-injected agent cannot exfiltrate the token to an attacker-controlled endpoint.Spend guards fail closed
Spend guards fail closed
If a price cannot be read (or is non-finite/negative), a guarded call is denied rather than allowed.
Errors returned, never raised
Errors returned, never raised
Auth, insufficient-balance, upstream and timeout failures are returned as
{"error": ...} tool results, so a failed call never crashes the agent.Examples
Direct three-step flow (no agent)
Explicit method and class form
Different registry wire-format (non-treg deployment)
Troubleshooting
Connector disabled (URL unset)
Connector disabled (URL unset)
If
TOOL_PROXY_URL is unset, every call returns: Tool registry proxy is not configured. Set TOOL_PROXY_URL (and optionally TOOL_PROXY_TOKEN) to enable the connector.httpx not installed
httpx not installed
Calls return
httpx not installed. Install with: pip install 'praisonai-tools[registry-proxy]'. Install the extra to add httpx.404 on describe (wrong path)
404 on describe (wrong path)
A 404 on
registry_describe usually means the deployment uses a different describe route. Set TOOL_PROXY_DESCRIBE_PATH (or pass describe_path) to the correct template — it must contain {tool_id}.Endpoint is GET — add method
Endpoint is GET — add method
Current main auto-derives the HTTP method from the describe doc. Older installs may reject a mislabelled verb; pass
method="GET" (or the endpoint’s declared method) explicitly to registry_call.Marketplace-credential 404
Marketplace-credential 404
A message like “no credential in this org” means the registry org has no vendor key connected — connect one on the registry side.
SSRF-guard refusals
SSRF-guard refusals
Registering an upstream (
POST /tools) with a loopback or private address is refused by the registry’s SSRF guard by design — use a public https upstream.Error shapes
Error shapes
All failures come back as
{"error": ...} tool results: authentication failed (HTTP 401/403), insufficient balance (HTTP 402), upstream 4xx/5xx passed through, and request timeouts.Related
Tools Overview
Browse PraisonAI tool documentation
Custom Tools
Build your own agent tools

