Kviria Agent API
The Agent API from Kviria — 1 operation(s) for agent.
The Agent API from Kviria — 1 operation(s) for agent.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/kviria-com:kviria-com-agent-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Kviria Agent API
version: 1.0.0
description: 'Location understanding for AI agents: know where, then navigate there. Beta: contiguous US. One POST /v1/agent call is one turn. Stateless: all conversation state is caller-held and echoed back. Data-only decisions and facts — callers phrase. Full contract: https://kviria.com/skill.md'
servers:
- url: https://api.kviria.com
tags:
- name: Agent
paths:
/v1/agent:
post:
summary: One turn of the narrowing resolver
description: 'Kviria finds the place, address or street corner a user means near their current position and returns its verified coordinate with an evidence trail. When to call: on every user turn about a place: a named place, a kind of place, something the user needs, an address, a street corner, what is around, next to or across from a place, the end of the block, a place in an area the user named, and the follow-ups, picks and yes or no answers about an earlier answer. Do not call it for small talk. Never answer a place question from your own knowledge. What to send: send request ask with the user''s message, word for word, in words, and nothing else: Kviria parses the target, the area and any answer to a question. Or parse the user''s words into the request''s fields yourself and send those; Kviria then reads the fields, never the words. request is the request type. words is the user''s words for a named target in an area, exactly as they said them: Kviria resolves whether they are an address, a street, a place, an area or a kind, so never choose the type yourself. kind is the user''s own words for the kind of place, exactly as they said them: never normalized, expanded or translated. place is the place''s name as the user said it, or the ref Kviria returned for a place the user now calls it, that or there. street, streetNot, facing, toward, pick and answer ride the turn that gives them: send one only when the user gave it. Leave out every field the user did not give; never invent a name, a street, an address or a kind. state is the `state` field of the previous kviria response, copied exactly: that field only, never the whole response; send an empty string on the first call. anchor is the user''s current position exactly as you were given it: send it on the first call, and after that only when the position changes; never invent or round it. area is the user''s words for an area they named, exactly as they said them: send it on the first call instead of anchor, never with it. heading is the client''s compass heading in degrees, only if the client has one; never guess it. An area instead of a position: when the user names an area they are not standing in ("a cafe in Brooklyn", "Starbucks in Austin", "Rainey Street"), send their words as area on the first call and no anchor. A named target in the area (a place, a brand, a street, an address) is resolve, with the user''s words in words: never choose its type yourself. Kviria finds the place in that area and answers with its position as anchor, the area it searched, and the same decisions. If the area''s name fits more than one place, or the area is large, the answer is unclear with areaOptions: ask that one question in the user''s language, with those options and nothing invented, and send the user''s choice as pick with the option''s position. A street too long to answer comes back the same way, with the parts to choose from. Never pin a place the user did not choose when the answer asked. After an answer is none, do not send a pick: the question is spent; an area the user names is a new search, sent as area. What comes back, and your move: one - the place is settled; say its name and distance exactly as returned. one_unconfirmed - ask the user to confirm the place, and send the answer as confirm with answer yes or no. many - ask one short question that tells the options apart by the fact distinguishBy names (their street, their side of the street, their corner, their direction, the taller building or their house number), name at most three without their distances, and send the choice as pick with its position: a choice by position, by number or by a fact the list gave; when the answer carries no distinguishBy, name the places and ask which one the user means. none - Kviria looked and found nothing (or the area is not in the coverage yet: see Coverage); say so and ask for more detail.'
operationId: agentTurn
security:
- kviriaKey: []
- oauth: []
parameters:
- name: agent
in: query
required: false
description: 'The agent flag: a short label that names your agent. Alternative to the x-kviria-agent header. Pattern: [a-z0-9-]{3,64}.'
schema:
type: string
pattern: ^[a-z0-9-]{3,64}$
- name: x-kviria-agent
in: header
required: false
description: The agent flag (same as the query param).
schema:
type: string
pattern: ^[a-z0-9-]{3,64}$
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
request:
type: string
enum:
- find
- search
- near
- across
- next_to
- corner
- street_end
- pick
- confirm
- more
- resolve
- ask
description: 'find: one specific place by its name or ref, an address, or a street corner itself (going to, meeting at or navigating to it). search: places of one kind near the user. near: places of one kind near a place or a corner. across: what is across the street from a place. next_to: the places next door to a place; with a kind, the nearest places of that kind to it. corner: only what is on the corner of two named streets, never the corner itself. street_end: a place at the end of the block or street; with no street, the user''s own block. pick: the user chooses an item of the last list or of the last question''s options by its position or number. confirm: the user''s yes or no to the last one_unconfirmed answer. more: the user wants the next options of the last answer (the next three): the next places of a list, or the next options of a question; no field. resolve: a named target in an area, in the user''s own words: Kviria resolves whether the words are an address, a street, a place, an area or a kind. Send the words in words, with the kind or the area the user gave; never choose the target''s type yourself. ask: the user''s message itself, word for word, in words: Kviria parses the target, the area and any answer to a question. Use it for every turn where the user speaks in a sentence; send nothing else.'
kind:
type: string
description: 'The user''s own words for the kind of place, exactly as the user said them: never normalized, expanded or translated. Omit when the user asks for no kind of place. Building, place, spot, business and thing are not kinds.'
words:
type: string
maxLength: 200
description: 'The user''s words for the target, exactly as they said them ("Rainey Street", "597 Greene Ave", "Starbucks", "Kadıköy"): the resolve request''s target, or the whole message for ask ("2406 Wheat Avenue, Austin, TX", "a cafe in Brooklyn", "the first one"). Kviria resolves whether they are an address, a street, a place, an area or a kind; never send a type the user did not say.'
place:
type: object
properties:
ref:
type: string
description: The ref of a place from an earlier kviria answer, exactly as returned.
name:
type: string
description: The place's name as the user said it.
description: The place the request is about (find, near, across, next_to).
streets:
type: array
items:
type: string
minItems: 2
maxItems: 2
description: The two streets of a corner, as the user said them.
street:
type: string
description: A street the user named for across, next_to or street_end. Always send it when the user names one.
streetNot:
type: string
description: A street the user said the place is not on (search, near, across, next_to), as the user said it. Never send it with street.
address:
type: object
properties:
number:
type: string
street:
type: string
required:
- number
- street
description: A street address the user gave.
side:
type: string
enum:
- left
- right
description: Only for the left or right of a place the user named (next_to), as seen facing it. For the user's own left or right, send toward.
facing:
type: object
properties:
name:
type: string
description: A place's name, as the user said it.
address:
type: object
properties:
number:
type: string
street:
type: string
required:
- number
- street
description: An address.
streets:
type: array
items:
type: string
minItems: 2
maxItems: 2
description: The two streets of a corner.
street:
type: string
description: A street.
description: 'Only if the user said what they are facing, looking at or walking toward: that place, address, corner or street, one of them, as the user said it.'
toward:
type: string
enum:
- ahead
- behind
- left
- right
description: Only if the user asked for what is ahead of, behind, left or right of them.
pick:
type: integer
minimum: 1
description: The position of the item the user picks from the last list or the last question's options, starting at 1 (the second one is 2).
answer:
type: string
enum:
- 'yes'
- 'no'
description: The user's answer to kviria's last question.
area:
type: string
maxLength: 120
description: 'The user''s words for the area to search, exactly as they said them ("Brooklyn", "Williamsburg, New York"): the place is found there and its position is the answer. Send it on the first call instead of anchor, never with it. Only when the user names an area they are not in.'
state:
type: string
maxLength: 3935
description: 'The `state` field of the previous kviria response, copied character for character: that field only, never the whole response, and never shortened. Empty string on the first call.'
anchor:
type: object
description: The user's current position - Kviria resolves relative to this point. Required on the first call of a conversation; later calls may leave it out while the user has not moved.
properties:
lat:
type: number
minimum: -90
maximum: 90
description: WGS 84 latitude
lng:
type: number
minimum: -180
maximum: 180
description: WGS 84 longitude
required:
- lat
- lng
additionalProperties: false
rangeM:
type: integer
minimum: 50
maximum: 350
description: Search radius around the anchor in meters (clamped to 50-350). Without it, the radius the state carries (the last call's), else 100.
confirmation:
type: string
enum:
- 'on'
- 'off'
default: 'on'
description: '"on" (default): a place the user named only in part is returned as one_unconfirmed, and its coordinate is released only after the user verifies it. "off": it is returned as one immediately, for agents without a human in the loop.'
heading:
type: number
minimum: 0
maximum: 360
description: The user's heading in degrees clockwise from north, only if the client has one (a phone's compass or the direction of travel). Never guess it.
required:
- request
additionalProperties: false
responses:
'200':
description: 'The coordinate-out contract: decision + target + candidates + evidence trail.'
content:
application/json:
schema:
type: object
properties:
decision:
type: string
enum:
- one
- one_unconfirmed
- many
- none
- unclear
description: 'The decision for this turn: how many answers there are and whether the single answer is certain. An exact address is "one" with the door facts riding target.address; several door clusters for one number come back as "many".'
target:
$ref: '#/components/schemas/target'
description: The settled target (one), or the target waiting for the user's yes or no (one_unconfirmed, without a location).
candidates:
type: array
items:
$ref: '#/components/schemas/target'
description: 'The candidates to present on many. Never send them back: send state.'
distinguishBy:
type: string
enum:
- street
- side
- corner
- direction
- height
- number
description: 'On many: the one fact that tells the first three places apart (their street, whether they are across your street, their corner, their direction, which one is in the tall building, or their house number when they stand in one row). Ask the user by it. Absent when no fact does.'
area:
type: object
properties:
id:
type: string
description: The area's stable id.
name:
type: string
description: The area's name as the data has it; never paraphrase it.
level:
type: string
enum:
- state
- city
- borough
- neighborhood
parent:
type: array
items:
type: string
description: The area's parent path, outermost first, without the area itself.
region:
type: string
description: The area's region code (US-NY).
required:
- id
- name
- level
- parent
- region
description: The area this turn searched, when the user named an area instead of a position.
anchor:
type: object
properties:
lat:
type: number
lng:
type: number
required:
- lat
- lng
description: 'On an area request: the position the answer is measured from, which is the found place''s own. Absent on one_unconfirmed.'
areaOptions:
type: object
properties:
question:
type: string
enum:
- area
- cluster
- street
- resolve
reason:
type: string
description: 'Why the question is asked: ambiguous, too_broad, too_long or several (the resolve''s several types).'
area:
type: string
description: The area the question is about (the cluster and the street questions).
options:
type: array
items:
type: object
properties:
id:
type: string
description: The option's id; the user's answer comes back as pick with its position.
name:
type: string
type:
type: string
enum:
- place
- street
- address
- area
description: 'On the resolve question: what the option is. Say it in the question (the street, the place, the address or the area), so the user hears what they choose.'
level:
type: string
enum:
- state
- city
- borough
- neighborhood
parent:
type: array
items:
type: string
region:
type: string
population:
type:
- number
- 'null'
count:
type: number
description: 'On the cluster question: how many matching places the part holds. On the resolve question: the candidate''s own count (a street''s segments, a place''s locations).'
unit:
type: string
enum:
- places
- candidate_cells
cells:
type: number
detail:
type: string
description: 'On the street question: the part in one line (the street, the cross streets, the length). On the resolve question: the fact that tells the candidates apart (an address''s number and street, an area''s parent path).'
required:
- id
- name
description: The options to offer, in the engine's order, exactly as given. Never add one.
required:
- question
- reason
- options
description: 'On unclear from an area request: the one question to ask the user, with the options it shows now (three, from the engine''s own list). Ask it in the user''s language, one question at a time, and send the answer as pick with the option''s position. When the user asks for more, send more: the answer lists the next three of the same question.'
evidence:
type: array
items:
type: object
properties:
test:
type: string
description: Which gate produced this entry.
result:
type: string
enum:
- pass
- reject
- warn
description: How the gate concluded.
reasonCode:
type: string
description: Stable enum explaining the outcome (e.g. user_confirmed, single_survivor_pending, partial_name, out_of_coverage). Read the code, never the free text.
detail:
type: object
description: Optional structured detail.
required:
- test
- result
- reasonCode
description: 'Why this answer: the gate trail behind the decision. Present none of this to the user; it exists for trust and auditability.'
confirmed:
type: boolean
description: True when the user verified the target through the confirm gate.
category:
type: string
description: The category that was asked for and is absent, on a none decision.
state:
type: string
description: The conversation state. Send it back unchanged as `state` on the next call.
required:
- decision
- evidence
- state
'400':
description: 'Strict validation error: error is a stable code (invalid_request, transcript_removed, unsupported_field, anchor_required, invalid_state), message says what to fix. On invalid_state the state is empty: start again with it.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
message:
type: string
state:
type: string
required:
- error
- message
- state
'401':
description: 'No valid credential. Send a Kviria key (Authorization: Bearer kvr_…, from https://api.kviria.com/key) or an OAuth access token for this resource; the WWW-Authenticate header names the resource metadata.'
'429':
description: Rate limit (60 turns per minute per account), the day's free turns used up (Retry-After header), or heavy demand.
'500':
description: Internal error.
tags:
- Agent
components:
schemas:
target:
type: object
properties:
gers:
type: string
description: Stable global entity id, persistent across turns and sessions.
name:
type:
- string
- 'null'
description: The place name as-is; never paraphrase it.
category:
type:
- string
- 'null'
description: The place category label.
confidence:
type:
- number
- 'null'
minimum: 0
maximum: 1
description: Existence confidence, 0 to 1, or null.
location:
type: object
properties:
lat:
type: number
lng:
type: number
required:
- lat
- lng
description: 'Named lat/lng fields; no coordinate-array ordering ambiguity. Absent on one_unconfirmed: the coordinate comes with the user''s yes.'
distanceM:
type: number
minimum: 0
description: Straight-line meters from the anchor.
walkM:
type: number
minimum: 0
description: Meters a person walks from the anchor to the place's door, along the streets. distanceM stays the straight line.
direction:
type: string
enum:
- northwest
- northeast
- southwest
- southeast
description: The place's compass quadrant seen from the anchor. Absent when the place is at the anchor.
address:
type: object
properties:
number:
type:
- string
- 'null'
street:
type: string
required:
- street
description: 'The street address: the place''s own (a unit left out), or the door''s when the target is a door. Absent when the data has none.'
corner:
type: array
items:
type: string
description: 'Set when the place is on a street corner: its own street, then the cross streets.'
acrossFromYou:
type: string
description: 'Set when the place is across the user''s own street from the user: that street.'
relative:
type: string
enum:
- ahead
- ahead-right
- right
- behind-right
- behind
- behind-left
- left
- ahead-left
description: Where the place is from what the user faces (45 degree sectors), when a heading is known and the place is 10 m or more away.
nextTo:
type: array
items:
type: string
description: Up to two places or addresses beside it on its own street and side, nearest first.
nearAddress:
type: object
properties:
number:
type:
- string
- 'null'
street:
type: string
distanceM:
type: number
required:
- street
- distanceM
description: 'Set only when the place has no address of its own: the nearest address within 30 meters. Not the place''s own address: say it as near it.'
sameBuilding:
type: array
items:
type: string
description: 'Up to two names in the same building as the place: the place the user named (near, next to) first, then other places in the answer. Never on across answers.'
tallBuilding:
type: boolean
const: true
description: Set when the place's building is at least 1.5 times as tall as the tallest building within 60 meters. Never a height or a floor.
intersection:
type: object
properties:
streets:
type: array
items:
type: string
required:
- streets
description: 'Set when the target is a street corner: every street that meets there. Such a target has category and confidence null.'
acrossStreet:
type: string
description: 'The street the answer is across: the base''s own street when the user named none, the named street, or the corner''s street when the place has two acrosses. One answer per street, each naming the street it is across.'
baseDistanceM:
type: number
description: 'Set when the answer is relative to a place (near, across, next to): metres from that place. distanceM stays the distance from the user.'
required:
- gers
- name
- category
- confidence
- distanceM
securitySchemes:
kviriaKey:
type: http
scheme: bearer
description: A Kviria key (kvr_…), shown once at https://api.kviria.com/key.
oauth:
type: oauth2
description: OAuth 2.1 with PKCE (MCP clients); the token is bound to one resource.
flows:
authorizationCode:
authorizationUrl: https://api.kviria.com/authorize
tokenUrl: https://api.kviria.com/oauth/token
refreshUrl: https://api.kviria.com/oauth/token
scopes: {}