Litestar ai serving
Skill litestar-org/litestar-skills/plugins/litestar/skills/litestar-ai-serving
Opinionated first-party agent skills, plugins, subagents, slash commands, and MCP servers for the Litestar framework ecosystem — publishable to Claude Code, Gemini CLI, Codex CLI, Cursor, OpenCode, and VS Code/Copilot from a single repo.
npx -y skills add litestar-org/litestar-skills --skill litestar-ai-servingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 13 stars13 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Auto-activate for Google ADK, LlmAgent, Runner, SQLSpecSessionService, Vertex AI, SSE agent chats, tool calls, or Litestar model workflows. Not for offline ML training.
SKILL.md
2.4 KB, as published. Nobody here has run it
Litestar AI Serving
Use this skill for HTTP-facing AI agent endpoints, Google ADK integration, session-backed conversations, and Litestar service boundaries around model workflows.
Code Style Rules
- Keep agent orchestration behind service functions or providers.
- Use typed request and response DTOs at the HTTP boundary.
- Store multi-turn state through the project's database stack.
- Stream only when the client contract needs incremental output.
Quick Reference
- AI serving patterns: ai-serving.md
- Pair with sqlspec for ADK session stores.
- Pair with litestar-realtime for streaming or event fan-out.
Workflow
- Define the HTTP contract before agent internals.
- Wire agent runners through DI.
- Persist session state through the chosen data stack.
- Test deterministic failure, timeout, and cancellation paths.
Guardrails
- Do not expose raw agent internals as the API contract.
- Do not block request workers with unbounded model calls.
- Do not store prompts, tool outputs, or memory without a retention decision.
- Do not skip authorization on agent endpoints.
Validation Checkpoint
- Request and response DTOs are explicit.
- Session persistence is wired.
- Timeouts and model failures are handled.
- Auth policy matches the sensitivity of tools and data.
Example
@get("/chat/{session_id:str}")
async def chat(session_id: str, runner: Runner, body: ChatRequest) -> ChatResponse:
result = await runner.run_async(session_id=session_id, new_message=body.message)
return ChatResponse(message=result.final_response)
</example>
References Index
Official References
- https://docs.litestar.dev/ - Litestar documentation
- https://docs.litestar.dev/latest/reference/ - Litestar API reference