Install
Integrate
Calltrack after defining your server and tools, before running:
Identify users
Pass anidentify function to resolve a user from the incoming request context. It receives the raw request object and the process environment, and should return a dict with at least a userId key:
async. Return None to skip user attribution for a request. Prefer stable pseudonymous IDs and non-sensitive traits. Avoid forwarding raw emails, names, or other personal data unless your team has approved that data flow.
Options
| Field | Type | Default | Description |
|---|---|---|---|
endpoint | str | https://api.agnost.ai | API endpoint |
disable_input | bool | False | Skip capturing tool input arguments |
disable_output | bool | False | Skip capturing tool output / result |
log_level | str | "INFO" | Log verbosity: DEBUG, INFO, WARNING, ERROR |
identify | Callable | None | Function (request, env) → UserIdentity to resolve user identity per request |
UserIdentity is a Dict[str, Any] that must contain a userId key. Other fields (e.g. email, role) are optional and forwarded as user traits. The identify callable can be sync or async, and may return None to skip attribution for a request.
If tool inputs or outputs may contain sensitive data, set disable_input=True or disable_output=True, or redact values before the tool returns them. See Data Governance.
What appears in Agnost
- Tools for FastMCP tool invocations.
- Raw logs for every tracked call.
- Errors when a tool call fails.
Verify
Call one FastMCP tool from your MCP client, then open app.agnost.ai. Check Raw logs first, then Tools.Troubleshooting
- Call
track(...)after defining tools and beforeserver.run(). - Confirm the org ID is correct.
- Use
disable_input/disable_outputif tool args or results are sensitive.
