installation guide
Put your agent under a mandate
Every step on this page is a request. The buttons send it from your browser to the production API and print exactly what comes back, including the refusals. Nothing is illustrated.
- api
- ava-v4-api.fly.dev
- auth
- bearer token
- mcp
- /mcp, http json-rpc
Reading rather than installing? The reference lists every endpoint and MCP tool, and start covers the other two ways in.
Get a session
Authorization: Bearer. The token is shown once and stored only in this browser. One human can own many agents under the same id.curl -sS -X POST https://ava-v4-api.fly.dev/v1/users/session \
-H 'content-type: application/json' \
-d '{}'Connect your AI agent
https://www.getava.xyz/mcp. The caller is whoever the bearer token resolves to, server-side, and a userId in tool arguments naming anyone else is refused rather than honoured. Register the agent first so its work lands under its own instance id.One command writes HTTP MCP config for Claude Code, Cursor, and Codex. It does not print the session token. The model never signs and never sets policy.
npx @getava-xyz/connectEquivalent manual add:
claude mcp add --transport http ava https://www.getava.xyz/mcp \
--header "Authorization: Bearer ava_st_PASTE_YOUR_SESSION_TOKEN"Prefer a file you can commit with the repo? Write this to .mcp.json at the project root.
{
"mcpServers": {
"ava": {
"type": "http",
"url": "https://www.getava.xyz/mcp",
"headers": {
"Authorization": "Bearer ava_st_PASTE_YOUR_SESSION_TOKEN"
}
}
}
}The header above still holds a placeholder. Run step 1 and it fills with your real session id.
Provision an agent wallet
Set a mandate
base
Without one, step 5 has nothing to test and answers no_conditions. With one, the evaluation pulls a live price for the asset you name.
curl -sS -X POST https://ava-v4-api.fly.dev/v1/mandates \
-H 'content-type: application/json' \
-H 'authorization: Bearer ava_st_PASTE_YOUR_SESSION_TOKEN' \
-d '{"portal":"base","objective":"protect","capital":{"asset":"USDC","amount":"500","chain":"base"},"constraints":{"maxNotionalUsd":500},"conditions":[{"asset":"ETH","metric":"price","comparator":"lt","threshold":2000}]}'Verify
curl -sS -X POST https://ava-v4-api.fly.dev/v1/mandates/mdt_PASTE_YOUR_MANDATE_ID/evaluate \
-H 'content-type: application/json' \
-H 'authorization: Bearer ava_st_PASTE_YOUR_SESSION_TOKEN' \
-d '{}'