Repository navigation
docs(agents): add documentation for agent.serve() and serve_agent() - #1104
Open
anumitha21 wants to merge 1 commit into
Open
anumitha21 wants to merge 1 commit into
anumitha21 wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a docs page for
agent.serve()/serve_agent(), which shipped in #1076 without documentation. The page covers install, quick start, thePOST /chatrequest format, JSON vs Server-Sent Events responses, error behaviour, options, security notes,build_agent_appfor mounting and testing, and a comparison with thesynapsekit serveCLI.Closes #1093
Type of change
Changes
docs/agent-serve.md!docs/agent-serve.mdto.gitignore, following the existing per-file exceptions underdocs/*agent.serve()for agent objects in Python code, and thesynapsekit serveCLITesting
{"response": ...}, the SSE stream ending indata: [DONE], and the HTTP 422 validation error for a missingquerybuild_agent_appexamples withTestClient(200 and{"response": "hi"}) and withapp.mount(...)Documentation
Notes for reviewer
synapsekit-docsandsidebars.ts. I put the page in this repo'sdocs/folder as discussed on the issue. Sincedocs/*is gitignored as internal, I added a.gitignoreexception. If you would rather publish it throughsynapsekit-docs, I can move it there with a sidebar entry.src/synapsekit/serve/server.pyandtests/test_serve.py.cli/serve.pyandtests/api/test_serve_endpoints.py; please check the endpoint descriptions there.