chatkit-python

Provide a FastAPI chat backend with SSE streaming and conversation persistence.

Updated Jan 2, 2026
One-click install
npx skills add https://github.com/Tahasaif3/Hackathon-Todo-AI-Evolution --skill chatkit-python-tahasaif3
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chatkit-python
Source: https://github.com/Tahasaif3/Hackathon-Todo-AI-Evolution/tree/main/.claude/skills/chatkit-python
Command: npx skills add https://github.com/Tahasaif3/Hackathon-Todo-AI-Evolution --skill chatkit-python-tahasaif3

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a FastAPI-based backend for OpenAI ChatKit frontends, enabling chat endpoints with SSE streaming, conversation persistence, and integration with the OpenAI Agents SDK and Gemini via LiteLLM.

Core Features & Use Cases

  • FastAPI chat backend for OpenAI ChatKit with a streaming /api/chat endpoint.
  • SSE streaming of assistant responses and built-in conversation persistence.
  • MCP/tool integration: Connects to MCP-based tools and Gemini via LiteLLM for task-oriented chat experiences. Example: build a Todo assistant with persistent conversations.

Quick Start

Install dependencies, configure environment, and run the server with uvicorn. Typical steps:

  • pip install fastapi uvicorn sse-starlette "openai-agents[litellm]"
  • export GOOGLE_API_KEY=your-gemini-api-key
  • export MCP_SERVER_URL=http://localhost:8000/api/mcp
  • uvicorn your_app:app --reload --port 8000 --host 0.0.0.0

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 for OpenAI ChatKit?

You can build a FastAPI chat backend using this Skill to expose a streaming /api/chat endpoint with SSE streaming and conversation persistence. It handles assistant responses and integrates tool-enabled interactions.

Can I use Gemini with OpenAI Agents SDK for tool-enabled chat in my backend?

Yes, you can use Gemini via LiteLLM for tool-enabled interactions in your chat backend. The Skill integrates OpenAI Agents SDK with LiteLLM to connect MCP-based tools for task-oriented chat experiences.

What do I need to configure before running a FastAPI streaming chat server?

You need to install dependencies like fastapi, uvicorn, sse-starlette, and openai-agents, then configure environment variables such as GOOGLE_API_KEY and MCP_SERVER_URL to run the uvicorn server successfully.

Does this FastAPI chat backend support persistent conversations across sessions?

Yes, the FastAPI chat backend provides built-in conversation persistence. It maintains chat history for task-oriented experiences, allowing you to build assistants like a Todo app with persistent conversations.

What is the best way to connect MCP-based tools to a FastAPI chat application?

The best way to connect MCP-based tools is using this FastAPI backend, which integrates MCP tool connections via the OpenAI Agents SDK. You configure the MCP_SERVER_URL environment variable to enable tool interactions.

Why use SSE streaming instead of WebSockets for FastAPI chat responses?

SSE streaming provides reliable server-to-client streaming for assistant responses over standard HTTP. This Skill uses sse-starlette to implement SSE streaming, which is ideal for unidirectional chat response delivery.