Start
Getting started
Run TrustMesh locally, register an agent and authorize its first tool call.
TrustMesh is a control plane your agents ask before they use a protected tool. This guide takes you from a local install to a first authorized call.
1. Run TrustMesh locally
You need Python 3.11+ and Node.js 20+. PostgreSQL 16 runs embedded through the pgserver package, so Docker is optional.
cd api
python3.11 -m venv .venv && .venv/bin/pip install -r requirements.txt
.venv/bin/python scripts/devdb.py start # starts Postgres, creates roles, writes .env, runs migrations
.venv/bin/uvicorn app.main:app --port 8810
cd ../web
npm install && npm run dev # http://localhost:8800The web app proxies /api/v1/* to the API, so the console and the sandbox work from one origin.
2. Create an organization
Open /signup on your installation (for example http://localhost:8800/signup). You become the Organization Owner. A new organization has no tools, agents or policies — and with no active policy every request is denied by default.
If you only want to look around, use Launch demo workspace on your installation's sign-in page (/login?demo=1). It creates a private workspace with three synthetic agents, eight tools, four policies and 30 days of synthetic history.
3. Register a tool and an agent
- In the console open Connected Tools → Register tool. Give it a machine name (for example
refunds), actions (process), a sensitivity and a JSON Schema for its input. TrustMesh stores a SHA-256 fingerprint of the tool's name, description and schema. - Open Agent Registry → Register agent, choose the environment and grant the tool and the exact actions the agent may use.
- On the agent page choose Issue under *Agent credentials*. Copy the
tmag_…secret — it is shown once.
4. Write a policy
Open Policy Management → New policy and add rules, for example *allow refunds under $500* and *require approval from $500*. Activate it (Administrators and Owners only), then use Test policies to check a hypothetical request.
5. Authorize from your agent
curl -s -X POST http://localhost:8800/api/v1/runtime/authorize \
-H "Authorization: Bearer $TRUSTMESH_AGENT_CREDENTIAL" -H "Content-Type: application/json" \
-d '{"tool":"refunds","action":"process","params":{"order_id":"ORD-48213","amount_usd":120},"call_id":"first-call-0001"}'Proceed only if decision is allow. See Runtime gateway for the full contract and the Python SDK.