Skip to content

docs(python-client): async-first pydoc + low-level API access + missing params#711

Merged
nicoloboschi merged 2 commits intomainfrom
fix/python-client-pydoc-improvements
Mar 26, 2026
Merged

docs(python-client): async-first pydoc + low-level API access + missing params#711
nicoloboschi merged 2 commits intomainfrom
fix/python-client-pydoc-improvements

Conversation

@nicoloboschi
Copy link
Collaborator

Summary

  • Async-first guidance: class + every method docstring now clearly steers agents toward a* methods (async) and explains sync wrappers are for scripts/REPLs only
  • Low-level API exposure: 10 public @property accessors (client.documents, client.entities, client.operations, client.webhooks, client.monitoring, etc.) so agents can discover the full API surface without guessing at _-prefixed internals
  • Missing API parameters added: tag_groups (recall/reflect), fact_types / exclude_mental_models / exclude_mental_model_ids (reflect), observation_scopes / strategy (retain items), background (create_bank), include_facts (areflect — was missing)
  • DRY: sync recall/reflect now delegate to async counterparts instead of duplicating request-building logic

All changes are fully backwards compatible — every new parameter has a default value, no existing signatures were altered.

Test plan

  • uv run python -c "from hindsight_client import Hindsight; ..." — imports, properties, and introspection verified
  • Backwards compatibility script: all existing call patterns (positional + keyword) still work
  • Lint passes (./scripts/hooks/lint.sh)

…low-level API access

- Class docstring now clearly documents async-first pattern: a* methods
  preferred, sync wrappers for scripts/REPLs only
- Every sync method docstring points to its async counterpart
- Every async method docstring says "preferred"
- Expose 10 low-level API properties (documents, entities, operations,
  webhooks, monitoring, etc.) so agents/users can discover the full API
  surface without guessing at _-prefixed internals
- Add missing API parameters: tag_groups (recall/reflect), fact_types,
  exclude_mental_models, exclude_mental_model_ids (reflect),
  observation_scopes/strategy (retain items), background (create_bank)
- Fix areflect missing include_facts param that sync reflect already had
- Sync recall/reflect now delegate to async counterparts (no logic duplication)
@nicoloboschi nicoloboschi merged commit a0cea84 into main Mar 26, 2026
41 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant