chatkit-python

Build a FastAPI chat backend with SSE streaming and SQLModel persistence.

Updated Dec 28, 2025
One-click install
npx skills add https://github.com/shuremali02/The-Evolution-of-Todo---Mastering-Spec-Driven-Development---Cloud-Native-AI --skill chatkit-python-shuremali02
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chatkit-python
Source: https://github.com/shuremali02/The-Evolution-of-Todo---Mastering-Spec-Driven-Development---Cloud-Native-AI/tree/main/.claude/skills/chatkit-python
Command: npx skills add https://github.com/shuremali02/The-Evolution-of-Todo---Mastering-Spec-Driven-Development---Cloud-Native-AI --skill chatkit-python-shuremali02

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Build custom chat API backends for OpenAI ChatKit frontend using FastAPI, providing SSE streaming, conversation persistence, and MCP/Gemini integration.

Core Features & Use Cases

  • SSE streaming chat endpoint via FastAPI for real-time conversations
  • Conversation persistence using SQLModel for histories and thread management
  • MCP tool integration to perform task workflows (add_task, list_tasks, complete_task, delete_task)
  • Fallback behavior when MCP server is unavailable
  • Optional authentication integration pattern for secure endpoints
  • Non-streaming chat endpoint for simple integrations

Quick Start

Deploy the FastAPI chat backend and point your ChatKit frontend to the /api/chat endpoint to begin streaming assistant responses.

Frequently Asked Questions about chatkit-python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a FastAPI chat backend with SSE streaming?

FastAPI chat backends with SSE streaming provide real-time conversation updates to ChatKit frontends via a /api/chat endpoint, persisting chat histories using SQLModel and integrating MCP tools for task workflows.

How does conversation persistence work in a FastAPI chat application?

Conversation persistence in a FastAPI chat backend uses SQLModel to store chat histories and manage thread sessions, ensuring multi-user chat contexts maintain state across multiple interactions.

Can I integrate MCP tools with a FastAPI SSE streaming endpoint?

Yes, you can integrate MCP tools with a FastAPI SSE streaming endpoint to execute task workflows like add_task, list_tasks, complete_task, and delete_task, including fallback handling when the MCP server is unavailable.

Does the ChatKit FastAPI backend support non-streaming chat endpoints?

Yes, the ChatKit FastAPI backend supports a non-streaming chat endpoint for simple integrations alongside the primary SSE streaming endpoint, offering flexibility depending on your frontend architecture requirements.

What happens when the MCP server is unavailable in a FastAPI chat backend?

When the MCP server is unavailable, the FastAPI chat backend implements fallback behavior to ensure the SSE streaming chat endpoint remains operational without interrupting the core conversation experience.

Do I need OpenAI agents to use the FastAPI chat backend with ChatKit?

The FastAPI chat backend integrates with ChatKit frontends and supports OpenAI agents alongside Gemini integration, requiring you to point your frontend to the /api/chat endpoint to begin streaming responses.