- Home
- Skills
- Frontend & Web Apps
- AI Stream Contract Lab
Works with the AI Agents you already use
AI Stream Contract Lab
Integrate streaming AI chat from browser to backend to inference provider. Fix SSE hangs, Stop and reconnect behavior, and test partial output and agent tool replay without API credits.
Free
AI Stream Contract Lab
Example session with this skill installed
Our React chat reads SSE from an API route. Stop aborts browser fetch. The provider adapter never gets a signal, and the UI marks EOF complete. After Stop and immediate Send, a late event from the old run can appear in the new reply. Give me the smallest integration fix and a test plan that needs no model API key.
- Read your context and instructions
- Compiled the ai stream contract
Findings
| Boundary | Observed | Change |
|---|---|---|
| Browser → route | Stop aborts the fetch. | Leave busy state, keep partial text, and fence events by run ID. |
| Route → provider | Adapter receives no cancellation signal. | Forward the route signal where the runtime and adapter support it. Verify provider cleanup separately. |
| Stream → UI | EOF is marked complete. | Require the documented terminal event. Treat early EOF as incomplete. |
Provider-free checks
Use a stub that pauses after the first delta. Stop run A, immediately start run B, then release a late A event. Assert B receives only its own content, A is incomplete, and the stub observes cancellation or reports that cleanup is still unknown. Run a normal completion and an early EOF case through the same parser. Assert that only the normal run is persisted as complete. These are proposed checks based on the supplied trace.
Connects securely to your tools. The creator never sees your data.
About this skill
Build or debug a streaming LLM chat UI across your frontend, API route, and inference provider. Trace where completion, truncation, cancellation, and reconnect diverge. Get a boundary-by-boundary diagnosis, the smallest compatible patch, and a local test matrix using a fake provider. Covers SSE and fetch streams, late events, partial responses, and duplicate agent tool results. Works with supplied snippets or an authorized repository. Local verification uses synthetic data and needs no live inference API.
Requires local environment access for stub testing. Does not execute live deployments or direct provider API calls.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 9 days ago
- Free with an Agensi account
Permissions
No special permissions declared or detected
What's inside
Frequently Asked Questions
New in Frontend & Web Apps
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Frontend & Web Apps.