Skip to content

docs(agents): add documentation for agent.serve() and serve_agent() - #1104

Open
anumitha21 wants to merge 1 commit into
SynapseKit:mainfrom
anumitha21:docs/agent-serve
Open

anumitha21 wants to merge 1 commit into
SynapseKit:mainfrom
anumitha21:docs/agent-serve

Conversation

@anumitha21

@anumitha21 anumitha21 commented Nov 18, 2026 •

Copy link
Copy Markdown

Summary

Adds a docs page for agent.serve() / serve_agent(), which shipped in #1076 without documentation. The page covers install, quick start, the POST /chat request format, JSON vs Server-Sent Events responses, error behaviour, options, security notes, build_agent_app for mounting and testing, and a comparison with the synapsekit serve CLI.

Closes #1093

Type of change

  • Documentation update

Changes

  • Added docs/agent-serve.md
  • Added !docs/agent-serve.md to .gitignore, following the existing per-file exceptions under docs/*
  • The page links the two serving options: agent.serve() for agent objects in Python code, and the synapsekit serve CLI

Testing

  • No API keys or secrets in the code
  • Docs-only change; no source code or tests were modified
  • Ran the examples locally and copied the outputs from real responses: JSON {"response": ...}, the SSE stream ending in data: [DONE], and the HTTP 422 validation error for a missing query
  • Checked the build_agent_app examples with TestClient (200 and {"response": "hi"}) and with app.mount(...)

Documentation

  • This PR is the documentation

Notes for reviewer

  • The issue scope mentions synapsekit-docs and sidebars.ts. I put the page in this repo's docs/ folder as discussed on the issue. Since docs/* is gitignored as internal, I added a .gitignore exception. If you would rather publish it through synapsekit-docs, I can move it there with a sidebar entry.
  • Behaviour described comes from src/synapsekit/serve/server.py and tests/test_serve.py.
  • The CLI comparison table is based on cli/serve.py and tests/api/test_serve_endpoints.py; please check the endpoint descriptions there.

This branch has not been deployed

No deployments
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.

docs: add a page for agent.serve() (REST endpoints)

1 participant