Skip to content

Add recommended practices docs to compliment cookbooks #92

@chrisreddington

Description

@chrisreddington

I've been enjoying experimenting with the SDK during the tech preview 😄 While I've been building out a few scenarios, I've been thinking that documenting some recommended practices/patterns when using the SDK could help folks be even more successful.

Key Topics Worth Covering

  • Client Lifecycle Management: Reusing CopilotClient instances versus creating new ones to save latency of client creation; guidance on autoStart versus explicit start() calls.
  • Session Management: When to reuse sessions versus starting fresh (e.g. conversational threads versus not I guess), and how this affects both context retention and throughput.
  • Streaming vs. Buffered Responses: When streaming improves perceived performance versus when sendAndWait() makes sense.
  • Transport Selection: Tradeoffs between stdio (default) and TCP in practice.
  • Tool Handler Performance: Patterns for keeping handlers responsive and backgrounding long-running work.
  • Context Window Management Suggestions on how to create the context window minimal (e.g. concise prompts, only including the truly required tools, etc.)

This could live in docs/performance.md and be linked from the README and cookbook. Some of the topics may/may not make sense, but wanted to share some thoughts while they're fresh 😄 Happy to review if helpful, and potentially collab on a draft. 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions