Skip to content

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

Open

Description

@AmitoVrito

agent.serve() / serve_agent() shipped in #1076 (merged to main, in CHANGELOG [Unreleased]) but has no docs page yet. Per our convention every shipped feature needs one in the docs site.

Scope (in SynapseKit/synapsekit-docs)

  • New page covering:
    • serve_agent(agent, host="127.0.0.1", port=8000, path="/chat") and the native agent.serve(...) method on ReActAgent / FunctionCallingAgent / ReasoningAgent.
    • build_agent_app(agent, path=...) for mounting into an existing FastAPI app or testing with TestClient.
    • Behavior: POST {path} with {"query": "..."}; SSE streaming (data: {"token": ...} … data: [DONE]) when the agent implements stream(), else JSON {"response": ...}.
    • Install: pip install "synapsekit[serve]" (FastAPI + uvicorn).
    • Security notes: binds 127.0.0.1 by default (pass host="0.0.0.0" to expose); no authentication — add your own; errors return a generic message and are logged server-side.
  • Cross-link with the existing synapsekit serve CLI (cli/serve.py), which serves a RAG/agent/graph over /health /query /run /stream — clarify when to use which.
  • Add the page to sidebars.ts.

Do at or before the next release.

Activity

  1. added
    documentation
    on Nov 4, 2026
  2. anumitha21 commented on Nov 16, 2026

    @anumitha21

    Hi! I’d like to take this one. I’ve set up the repo locally and the test suite passes. My plan is to read the agent.serve() implementation, document the REST endpoints, and include example requests I’ve actually run the codebase . Could you assign this to me?

  3. AmitoVrito commented on Nov 17, 2026

    @AmitoVrito
    CollaboratorAuthor

    Sounds great, allocating it you😊

  4. anumitha21 commented on Nov 18, 2026

    @anumitha21

    Hi @AmitoVrito , I've submitted a PR covering the agent.serve() / serve_agent() documentation here: #1104. Ready for review whenever you have time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions