Typed Agent Service
Description
Typed AI agent service (TypeScript): Zod 4 tool schemas as the single source of truth (runtime validation, inferred types, generated JSON Schema), a bounded provider-agnostic tool-use agent loop, SSE streaming, and an RFC 9457 error boundary. React and Angular front ends over the same endpoints. Fastify 5, every claim mapped to a test.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
typed-agent-service
[](https://github.com/jkelly-dev1/typed-agent-service/actions/workflows/ci.yml)
A TypeScript AI agent service built as a personal learning project: Fastify 5, Zod 4 tool schemas, a provider-agnostic tool-use agent loop, SSE streaming, a typed error boundary, and two small front ends -- React and Angular -- that render the same stream. It runs fully offline on a deterministic mock provider by default and switches to a real model (Anthropic or OpenAI) with two environment variables.
The rule this repo follows: no claim without a test. The table below maps each claim in this README to the test that enforces it.
What it demonstrates
- Zod schemas as the single source of truth for tools: one schema validates every model-supplied tool call at runtime, infers the executor's input type at compile time, and generates the JSON Schema the model sees.
- A bounded agent loop: tool requests are validated, executed, and fed back; a hard iteration cap stops a model that never finishes.
- Streaming SSE and buffered JSON endpoints over the same typed event contract, with client-disconnect and timeout cancellation.
- An RFC 9457 problem+json error boundary with stable machine-readable codes that never leaks internals.
- A provider seam (mock / Anthropic / OpenAI) where tests and CI never touch the network.
- A React client that consumes the same typed event contract, including its own
SSE framing because
EventSourcecannot POST, and the two different ways this API reports failure. - An Angular client over the SAME endpoints and the same contract, written standalone, signal-based and zoneless, so the contract is proven to be a contract rather than a shape one framework happened to fit.
Claims backed by tests
| Claim | Test |
|---|---|
| Schema-invalid tool calls never reach an executor | tests/tools.test.ts "rejects schema-invalid in |
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Awesome Llm Apps
100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI Headroom
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agen
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI