Skip to content

Feat/faster session start - #60

Merged
sebvanleuven merged 5 commits into
mainfrom
feat/faster-session-start
Jun 17, 2026
Merged

Feat/faster session start#60
sebvanleuven merged 5 commits into
mainfrom
feat/faster-session-start

Conversation

@sebvanleuven

@sebvanleuven sebvanleuven commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Introducing the API session start route to improve session start times, which avoids fetching a token first (RTT + TLS handshake) to start the session.


Summary by cubic

Start sessions directly with the API key to remove the token prefetch step and cut one network round-trip, speeding up session start. Improves error handling, simplifies the client, and cleans up docstrings.

  • Refactors
    • Removed get_session_token and token storage; start_session now calls POST /engine/session with Authorization: Bearer <api_key>, including clientLabel, personaConfig, sessionOptions, and clientMetadata.
    • Clearer errors: 401 → AuthenticationError, 403 → SessionError, 5xx → SessionError, other unexpected responses → AnamError with better message fallback.
    • Simplified docstrings and updated logs to note direct API-key auth.

Written for commit 50bfed2. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread src/anam/_api.py
@sebvanleuven
sebvanleuven merged commit ea783e0 into main Jun 17, 2026
8 checks passed
@sebvanleuven
sebvanleuven deleted the feat/faster-session-start branch June 17, 2026 23:27
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.

2 participants