User-facing guides¶
Task-oriented guides for callers of kneo-client — anyone building on top of the client to talk to a Kneo Agent Platform instance. The full project index lives at the repo README; the architectural rationale lives under ../dev/.
Building on kneo-client¶
Read these as a sequence the first time you reach for each capability:
quickstart.md— install, profile setup, first authenticated call, first run + trace, the sync facade for non-async callers. The minimal end-to-end.profiles_and_auth.md— the TOML / env / kwargs resolution chain, both API-key header schemes the platform accepts (Authorization: BearervsX-Kneo-Api-Key), multi-profile workflows, programmatic profile construction from a secrets manager.idempotency_and_retries.md— the auto-injectedIdempotency-Keyon everyPOST, when the transport retries (transport errors +{429, 502, 503, 504}+ the auto-retried 409idempotency_key_in_progress), howRetry-Afteris honored (clamped tomax_delay), how 409s are classified by envelope code (KneoIdempotencyMismatchErroronly for true payload mismatches), customizingRetryPolicy.list_results.md— the two list-method wrappers (Page[T]for list-shaped responses,Map[K, V]for dict-keyed ones), per-method return-shape table,iterate_all()for page-walking (audit included — fully paginated sincekneo_serv0.6.0), the pagingwindow/ true-totalsemantics, choosing a page size, drop-to-raw escape hatch.polling_and_waiting.md—wait_for_completion()(final-status polling) vstail_trace()(live event streaming), terminal-status overrides forblocked(paused for human review), polling cadence rules of thumb,TimeoutErrorhandling.errors.md— theKneoErrorhierarchy (KneoNetworkError,KneoProtocolError,KneoBadRequestError,KneoAuthError,KneoPermissionError,KneoNotFoundError,KneoConflictError,KneoIdempotencyMismatchError,KneoHumanTaskExpiredError,KneoPayloadTooLargeError,KneoValidationError,KneoRateLimitedError,KneoServerError,KneoServiceUnavailableError), what each exception carries (.status,.body,.request_id,.idempotency_key,.code), recommended catch patterns, and network-troubleshooting recipes (timeouts, TLS verification / custom CA, HTTP proxies, inspecting the underlying httpx cause).
Operating and integrating¶
Read these out of order; pick what your environment needs:
compatibility.md— whichkneo-clientreleases support whichkneo_servversions, the forward / backward compatibility policy, theclient.request()escape hatch for endpoints not yet wrapped by an adapter, the self-verify recipe.
When you need the full API surface¶
The user guides above are task-shaped — each explains one operational concept comprehensively. For a complete class-by-class reference (every public method, parameter, return type, exception), see:
- API Reference HTML — single-page dark-themed reference with sidebar nav, matching the sibling Kneo Agent SDK reference's layout.
- API Reference PDF — same content, paginated, with cover and TOC.
The reference is the source of truth for what's there; the user guides are the source of truth for how to use it.
Examples¶
For runnable code: examples/ ships seven end-to-end scripts:
| Script | What it shows |
|---|---|
01_basic_run.py |
Create a run, wait for completion via RunsClient.wait_for_completion(), print trace. |
02_idempotent_retry.py |
Manual retry pattern with a reused Idempotency-Key; catching KneoIdempotencyMismatchError. |
03_paginate_audit.py |
List audit events via the Page wrapper; walks all pages with iterate_all() — audit is fully paginated since kneo_serv 0.6.0. |
04_validate_spec.py |
Studio iterate-and-test loop — validate then compile then explain. |
05_human_task_resume.py |
List pending human tasks and resume with a decision. |
06_async_run.py |
Submit a run with async_mode=true (server returns 202 since kneo_serv 0.11.0) and poll to a terminal status. |
07_skills_overlay.py |
List the skill catalog, then start a run with a per-request SkillsOverlay. |
Each script's docstring lists the env vars and arguments it needs to run against a real kneo_serv instance.
Combined PDF¶
The user-facing prose ships as a single combined PDF for offline reading and printing:
kneo_agent_client_guide.pdf— quickstart + profiles + idempotency + pagination + errors + compatibility in one document with cover, TOC, and page numbers.
Regenerated at every release via docs/script/generate_combined_docs.py + render_combined_handouts.py. Sources are the individual *.md files in this directory; the combined PDF is generated, not authored separately.