Resources
Each resource family is an attribute of the client. Every family that has a REST API can
list() its resources, retrieve() one by its id or hashed id, and find() one by name, and
every family has the manifest operations described in Manifests. Beyond those,
each family has the actions that its REST API offers.
What a user can see and do is decided by the platform: the API key’s user reads the resources of their account, and only a resource’s owner may change it. Some endpoints, e.g. the Smarter Journal, are for superusers only.
Attribute |
Resources and actions |
|---|---|
|
Any kind, through the manifest API. See Manifests. |
|
LLMClients: |
|
Guardrails: |
|
MCPClients: |
|
Vectorstores: |
|
LLMHosts: |
|
Read them, and manage them with manifests. A plugin’s manifest kind is its class, e.g.
|
|
Accounts, and |
|
The chat sessions, their tool calls and their plugin uses. |
|
The Smarter Journal, page by page. Superusers only. |
|
The LLM providers that the platform is configured for, and their models. |
|
Proxies to LLM providers’ own APIs: |
|
The API key’s user and account, the platform’s version and state, and its resource kinds. |
Guardrails
Dry-run a Guardrail on a text, e.g. to test a new pattern before you rely on it. Nothing is saved.
result = client.guardrails.evaluate(guardrail.id, "My card is 4111 1111 1111 1111")
if result.triggered:
print(result.disposition, result.text) # e.g. redacted "My card is [REDACTED]"
for event in client.guardrails.events(guardrail.id, reviewed=False).events:
print(event.created_at, event.llmclient, event.disposition)
MCP clients
tools = client.mcp_clients.tools(mcpclient.id)
for tool in tools.tools:
print(tool.name, tool.input_schema)
result = client.mcp_clients.call_tool(mcpclient.id, "aws___search_documentation", {"search_phrase": "S3"})
print(result.is_error, result.content)
Only an MCPClient’s owner may call its tools.
Vectorstores
client.vectorstores.add_text(store.id, "Our refund window is 30 days.", name="refunds")
client.vectorstores.add_url(store.id, "https://example.com/faq")
client.vectorstores.add_files(store.id, ["handbook.pdf", "policies.docx"])
for hit in client.vectorstores.search(store.id, "How long is the refund window?", k=3).results:
print(hit.score, hit.text)
Documents are split, embedded and loaded asynchronously, and only once the vectorstore is deployed.
The platform serves these endpoints when SMARTER_ENABLE_VECTORSTORE is true.
LLMHosts
An LLMHost serves an open-weight model on the platform’s own cluster. plan() shows the
Kubernetes resources that deploy() would create, without creating them. Deploying creates real,
billable infrastructure, which may include GPU nodes.
for model in client.llm_hosts.discover(query="qwen", task="chat", limit=5):
print(model.repository, model.downloads)
manifest = client.llm_hosts.discover_manifest("Qwen/Qwen2.5-7B-Instruct")
client.llm_hosts.apply(manifest)
print(client.llm_hosts.report().totals)
Proxies
A Proxy gives authenticated, governed access to an LLM provider’s own API: the platform holds the provider’s key, and you use your Smarter API key instead. The easiest client of a proxy is the provider’s own SDK:
from openai import OpenAI
from smarter import Smarter
smarter = Smarter()
openai = OpenAI(base_url=smarter.proxies.base_url("openai"), api_key=smarter.api_key)
The platform serves proxies when SMARTER_ENABLE_PROXY is true.
Endpoints the SDK does not wrap
client.http is the SDK’s authenticated transport. Use it for an endpoint that the SDK doesn’t
wrap yet, with the same retries and errors:
from smarter.core.typing import SmarterJsonType
data = client.http.request("GET", "llmhosts/report/", cast_to=SmarterJsonType)