Install
Both packages have no runtime dependencies: the Python one uses the standard library, the TypeScript one the globalfetch.
trustgate-sdk on PyPI and
@neuraltrust/trustgate on npm. Each one’s README carries a short
version of this guide in its language, and the
repository holds the source,
runnable examples and the issue tracker.
One key, nothing else
https://agentgateway-mcp.neuraltrust.ai, which finds the gateway from the key
and answers with that gateway’s own addresses. From then on the SDK talks only
to those.
You name nothing else unless one key reaches two applications on the same
plane, which the SDK refuses to guess at. A Hybrid gateway is the one case that
needs an address. See Configuration.
Check the run before it starts
connect() is the application acting as itself, with the key and nothing else.
It proves two things before returning:
- The servers behind it have an account. A batch has nobody to open a connect link once it is running, so the check comes before the first row. The message names who has to act: an administrator, for a server whose one account every caller shares, or your code, with the line to write, for a server that keeps an account per user.
- The tools you need are there. The tool set belongs to an admin and can be
narrowed without warning.
requiresturns that into a refusal at startup instead of a failure mid-conversation.
search, not the prefixed name the
gateway publishes when several servers are bound. The SDK adds the prefix, and
asks only when two of your servers serve the same tool.
What the key reaches
identity() answers what connect() reads, without connecting: the gateway,
when the key expires, and for each application its plane, its address and which
servers are still waiting for an account. It is asked once and remembered.
whoami example in the SDK repository
prints all of it. Run it first when something is off.