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

# Agent recommenders

## List Agent Recommenders

> List the subagent routers.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.36.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"AgentRecommendersPublic":{"description":"Every stored subagent router, oldest first.","properties":{"data":{"items":{"$ref":"#/components/schemas/AgentRecommenderPublic"},"title":"Data","type":"array"}},"required":["data"],"title":"AgentRecommendersPublic","type":"object"},"AgentRecommenderPublic":{"description":"One stored subagent router, known by its provider, model and the tail of its key.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"api_key_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Last4"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"enabled":{"title":"Enabled","type":"boolean"},"has_api_key":{"title":"Has Api Key","type":"boolean"},"id":{"format":"uuid","title":"Id","type":"string"},"input_price_per_million":{"title":"Input Price Per Million","type":"number"},"model":{"title":"Model","type":"string"},"output_price_per_million":{"title":"Output Price Per Million","type":"number"},"provider":{"title":"Provider","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"}},"required":["id","provider","model","api_base","api_key_last4","has_api_key","input_price_per_million","output_price_per_million","enabled","created_at","updated_at"],"title":"AgentRecommenderPublic","type":"object"}}},"paths":{"/api/v1/routing/recommenders":{"get":{"description":"List the subagent routers.","operationId":"agent-recommenders-list_agent_recommenders","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRecommendersPublic"}}},"description":"Successful Response"}},"summary":"List Agent Recommenders","tags":["agent-recommenders"]}}}}
```

## Create Agent Recommender

> Add a subagent router: a decision model, its key, and the prices a recommendation is charged at.\
> \
> The first router added is switched on; a later one waits to be switched\
> on in place of the one that is.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.36.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"AgentRecommenderCreate":{"additionalProperties":false,"description":"Add a subagent router. The first one added is switched on; a later one waits to be.","properties":{"api_base":{"anyOf":[{"maxLength":1024,"type":"string"},{"type":"null"}],"description":"Root URL of the provider; blank for its own.","title":"Api Base"},"api_key":{"anyOf":[{"maxLength":1024,"minLength":1,"type":"string"},{"type":"null"}],"description":"Stored encrypted, never returned.","title":"Api Key"},"input_price_per_million":{"default":0,"maximum":1000000,"minimum":0,"title":"Input Price Per Million","type":"number"},"model":{"description":"The decision model, as the provider names it.","maxLength":255,"minLength":1,"title":"Model","type":"string"},"output_price_per_million":{"default":0,"maximum":1000000,"minimum":0,"title":"Output Price Per Million","type":"number"},"provider":{"description":"The decision provider: typesafe, openrouter or llamacpp.","maxLength":32,"minLength":1,"title":"Provider","type":"string"}},"required":["provider","model"],"title":"AgentRecommenderCreate","type":"object"},"AgentRecommenderPublic":{"description":"One stored subagent router, known by its provider, model and the tail of its key.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"api_key_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Last4"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"enabled":{"title":"Enabled","type":"boolean"},"has_api_key":{"title":"Has Api Key","type":"boolean"},"id":{"format":"uuid","title":"Id","type":"string"},"input_price_per_million":{"title":"Input Price Per Million","type":"number"},"model":{"title":"Model","type":"string"},"output_price_per_million":{"title":"Output Price Per Million","type":"number"},"provider":{"title":"Provider","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"}},"required":["id","provider","model","api_base","api_key_last4","has_api_key","input_price_per_million","output_price_per_million","enabled","created_at","updated_at"],"title":"AgentRecommenderPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/routing/recommenders":{"post":{"description":"Add a subagent router: a decision model, its key, and the prices a recommendation is charged at.\n\nThe first router added is switched on; a later one waits to be switched\non in place of the one that is.","operationId":"agent-recommenders-create_agent_recommender","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRecommenderCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRecommenderPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Create Agent Recommender","tags":["agent-recommenders"]}}}}
```

## Update Agent Recommender

> Change a subagent router, or switch it on in place of the one that is.\
> \
> An omitted field keeps its stored value, the key included while the\
> provider and the API base stay the same.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.36.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"AgentRecommenderUpdate":{"additionalProperties":false,"description":"Change a subagent router. An omitted field keeps its stored value.\n\nOmitting ``api_key`` keeps the stored key while the provider and the API\nbase stay the same, so a price change never has to re-send a secret. A new\nprovider or address needs its own key, unless it is a self-hosted server\nthat takes none. A blank ``api_base`` goes back to the provider's own\naddress. Switching one on switches every other one off.","properties":{"api_base":{"anyOf":[{"maxLength":1024,"type":"string"},{"type":"null"}],"title":"Api Base"},"api_key":{"anyOf":[{"maxLength":1024,"minLength":1,"type":"string"},{"type":"null"}],"title":"Api Key"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"input_price_per_million":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"number"},{"type":"null"}],"title":"Input Price Per Million"},"model":{"anyOf":[{"maxLength":255,"minLength":1,"type":"string"},{"type":"null"}],"title":"Model"},"output_price_per_million":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"number"},{"type":"null"}],"title":"Output Price Per Million"},"provider":{"anyOf":[{"maxLength":32,"minLength":1,"type":"string"},{"type":"null"}],"title":"Provider"}},"title":"AgentRecommenderUpdate","type":"object"},"AgentRecommenderPublic":{"description":"One stored subagent router, known by its provider, model and the tail of its key.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"api_key_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Last4"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"enabled":{"title":"Enabled","type":"boolean"},"has_api_key":{"title":"Has Api Key","type":"boolean"},"id":{"format":"uuid","title":"Id","type":"string"},"input_price_per_million":{"title":"Input Price Per Million","type":"number"},"model":{"title":"Model","type":"string"},"output_price_per_million":{"title":"Output Price Per Million","type":"number"},"provider":{"title":"Provider","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"}},"required":["id","provider","model","api_base","api_key_last4","has_api_key","input_price_per_million","output_price_per_million","enabled","created_at","updated_at"],"title":"AgentRecommenderPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/routing/recommenders/{recommender_id}":{"patch":{"description":"Change a subagent router, or switch it on in place of the one that is.\n\nAn omitted field keeps its stored value, the key included while the\nprovider and the API base stay the same.","operationId":"agent-recommenders-update_agent_recommender","parameters":[{"in":"path","name":"recommender_id","required":true,"schema":{"format":"uuid","title":"Recommender Id","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRecommenderUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRecommenderPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Update Agent Recommender","tags":["agent-recommenders"]}}}}
```

## Delete Agent Recommender

> Remove a subagent router and its key. With none left, no recommendation is served.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.36.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/routing/recommenders/{recommender_id}":{"delete":{"description":"Remove a subagent router and its key. With none left, no recommendation is served.","operationId":"agent-recommenders-delete_agent_recommender","parameters":[{"in":"path","name":"recommender_id","required":true,"schema":{"format":"uuid","title":"Recommender Id","type":"string"}}],"responses":{"204":{"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Delete Agent Recommender","tags":["agent-recommenders"]}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.otari.ai/reference/api-reference/agent-recommenders.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
