The Python SDK.
ConceiverClient uses your account key and the Conceiver API URL supplied for your deployment. See the quickstart for setup, or copy the complete onboarding, filing, and invoice implementations.
from toolving import ConceiverClient
with ConceiverClient(api_url, api_key) as client:
print(client.models())
print(client.storage())
instance = client.create(model="language", key="create-context")
instance.teach("support queue", "Customer care", key="teach-queue")
prediction = instance.query("support queue", key="ask-queue")
print(prediction.status, prediction.text, prediction.output, prediction.confidence)
print(prediction.evidence.markdown)
remembered = instance.query("support queue", with_memory=True, key="ask-memory")
print(remembered.evidence.episodes)
instance.resolve(prediction.prediction_id, "Customer care", key="actual-outcome")
current_text = instance.training_sequence()["text"] # no server-side storage
sequence = instance.save(key="save-account-learning") # requires storage
training_text = client.training_sequence_text(sequence)
print(training_text)
retirement = instance.reap(key="release-context")
print(retirement.persisted, retirement.artifact)
restored = client.create(sequence_id=sequence, key="restore-context")
another = client.create(key="create-import-target")
another.ingest_training_sequence(training_text)
Use model="json", client_host="pi" (or another supported harness host), and a 64-character lowercase hexadecimal compatibility_scope to open JSON mode. client.models() returns the current selection contracts. client.storage() reports whether durable sequence and model storage is enabled.
Results
status is ANSWER or UNRESOLVED. text carries the answer string. When that string contains valid JSON, output carries the SDK-decoded value; otherwise it carries the string. Raw JSON syntax support within Conceiver's taught language is in active development. An unresolved result has no fabricated answer. prediction_id identifies the query for a later outcome.
SDK 0.12.1 exposes confidence: hypothesis, confident, high, or None when the result has no confidence field. These are Conceiver's evidence categories, not calibrated probabilities. The release policy uses one, two, and three or more independent supporting examples for those levels. Unresolved and ambiguous results can carry confidence too; check status before using an answer. Toolving preserves Conceiver's confidence and acceptance policy.
instance.training_sequence() assembles current plain UTF-8 teaching text without storing it, including on Free accounts. save() stores that text as an account file and requires storage. Saved training sequences are plain UTF-8 text. A teaching is question, newline, answer; one empty line separates teachings. ingest_training_sequence() sends every pair through normal teaching. evidence.markdown explains answered and unresolved decisions. Pass with_memory=True to return evidence.episodes, which contains complete relevant input/output examples. Standard queries cost 1 credit; memory-enabled queries cost 2. reap() returns retirement details. The final instance on an account with storage includes verified artifact metadata; a later instance loads that artifact automatically. Final retirement without storage returns persisted=False and discards live memory.
Retries retain the original confidence after later learning. Older receipts and instances using older application bundles may lack the field. A new instance uses the updated bundle with your account's existing private learning.
Resuming a request
SDK calls generate an operation key when you omit one. Supply and retain key yourself when you need to recover an uncertain request. Reusing it with different content returns a conflict. Another deliberate observation needs another key.
The API retains accepted work if execution succeeds but the response is lost. Read its operation or repeat the original request with its original key. HTTP operations describes this contract.
Versions
Install SDK 0.12.1 from the public Toolving release. Earlier LearnerClient examples belong to the earlier API. Deployment downloads show which wheels a particular service also provides.