> For the complete documentation index, see [llms.txt](https://vayl.gitbook.io/vayl-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vayl.gitbook.io/vayl-docs/api-reference/metrics.md).

# Metrics

Prometheus counters for tool calls, errors, latency and reconciliation actions.

## Prometheus metrics

> Counters in Prometheus text format. Contains no memory content, but reveals usage volume and\
> the number of active principals: keep it on an internal network, or set \`VAYL\_METRICS\_TOKEN\`\
> to require that bearer token (compared in constant time).\
> \
> Metrics: \`vayl\_tool\_calls\_total{tool}\`, \`vayl\_tool\_errors\_total{tool}\`,\
> \`vayl\_tool\_latency\_avg\_ms{tool}\`, \`vayl\_action\_total{action}\`, \`vayl\_principals\_active\`,\
> \`vayl\_license\_edition\_info{edition}\`.<br>

```json
{"openapi":"3.1.0","info":{"title":"Vayl HTTP API","version":"0.7.0"},"tags":[{"name":"Monitoring","description":"Prometheus metrics."}],"servers":[{"url":"http://127.0.0.1:8080","description":"Default bind address (VAYL_HOST / VAYL_PORT). Put TLS in front for anything but local use."}],"security":[{},{"metricsToken":[]}],"components":{"securitySchemes":{"metricsToken":{"type":"http","scheme":"bearer","description":"The value of `VAYL_METRICS_TOKEN`, when set."}}},"paths":{"/metrics":{"get":{"tags":["Monitoring"],"operationId":"metrics","summary":"Prometheus metrics","description":"Counters in Prometheus text format. Contains no memory content, but reveals usage volume and\nthe number of active principals: keep it on an internal network, or set `VAYL_METRICS_TOKEN`\nto require that bearer token (compared in constant time).\n\nMetrics: `vayl_tool_calls_total{tool}`, `vayl_tool_errors_total{tool}`,\n`vayl_tool_latency_avg_ms{tool}`, `vayl_action_total{action}`, `vayl_principals_active`,\n`vayl_license_edition_info{edition}`.\n","responses":{"200":{"description":"Metrics in Prometheus text exposition format 0.0.4.","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"`VAYL_METRICS_TOKEN` is set and the request did not send it.","headers":{"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://vayl.gitbook.io/vayl-docs/api-reference/metrics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
