Build your own agent
Give your agent Mountaya's routing, places, and terrain. If your agent framework speaks MCP, connect it to the MCP server with a key pair and it gets 14 tools at once. Otherwise, write tools that call the Data API, as below.
1
Your agent's code reads both keys from its environment. Never put them in a prompt: the model must not see them.
The publishable key needs the data scope. Create both under Organization → API keys in the Mountaya app.
2
Every Data API call carries a session token. Mint one with the secret key, and reuse it until shortly before it expires.
3
Give the model a name, a description that says when to use the tool, and a JSON Schema for its input:
Agent SDKs name the schema field differently, such as input_schema or parameters.
4
When the model calls plan_route, your handler queries directions and returns a compact result:
Select only the fields the model needs: every field it reads costs tokens.
The Data API only reads, so these tools cannot change anything. Writes go through the Map Studio API, which comes with an agreement. Before you give your agent a tool that writes:
- Ask first. Have the agent confirm each write with the person, naming what it changes.
- Act as that person. Mint the token for the member your own sign-in vouches for, as act as a member shows.
- Make retries safe. Send an
Idempotency-Keywith each write, and reuse it when the agent retries.