flowstate-epic-flowstate-community-epicdm-flowstate-agents-llm-client
Package-local agent skill for @epicdm/flowstate-agents-llm-client.
Tags
Publisher
Versions
1 version published — latest: 1.0.7
- 1.0.7publishedInvalid Date
Skill
flowstate-agents-llm-client Package Skill
Package: @epicdm/flowstate-agents-llm-client
Repository: epic-flowstate-community
Path: packages/flowstate-agents-llm-client
Version: 1.0.7
Use this published Dojo skill as the package-level entrypoint. For detailed workflows, use the package-local skills listed below.
Primary Package Workflow
FlowState Agents LLM Client
Status: Active
Purpose: Help agents use @epicdm/flowstate-agents-llm-client without trusting stale docs or generated feature lists.
Scope: /Users/sthornock/code/epic/epic-flowstate-community/packages/flowstate-agents-llm-client
Trigger: LLM provider setup, single-shot query calls, streaming output, memory/knowledge prompt composition, package maintenance, or Dojo/docs repair.
Input: Provider/model config, prompt params, optional AMS/knowledge-store clients, package source/docs.
Output: Correct LLMClient usage and source-backed package skill routing.
Overview
This package wraps the Vercel AI SDK behind LLMClient. The implemented center is query() and stream(). Some public config fields are reserved or only partially wired, so package skills must distinguish working behavior from typed-but-unimplemented surface area.
Route by Task
| Task | Use Skill |
|---|---|
| Provider/model/pricing changes | llm-client-provider-registry |
| Single-shot LLM calls | llm-client-query-workflow |
| Streaming and tool chunks | llm-client-streaming-tools |
| AMS, Memory Prompt API, or knowledge-store composition | llm-client-memory-knowledge-composition |
| Docs/source drift, ignored config, proxy/budget/schema issues | llm-client-contract-troubleshooting |
| Public API or downstream contract changes | llm-client-maintenance |
Minimum Happy Path
import { LLMClient } from '@epicdm/flowstate-agents-llm-client'
const client = new LLMClient({
provider: 'anthropic',
model: 'claude-3-5-sonnet-20241022',
apiKey: process.env.ANTHROPIC_API_KEY,
})
const result = await client.query({
prompt: 'Summarize this package skill review.',
systemPrompt: 'Return concise engineering prose.',
})
if (!result.success) {
throw result.error
}
console.log(result.content)
Source Authority
Prefer these files over generated Dojo content:
src/llm-client.tssrc/providers/*.tssrc/types/*.tssrc/utils/*.tstests/memory-prompt-integration.test.ts.flowstate/docs/api/index.md
Critical Pitfalls
createLLMProxy()is exported but throws.- Budget fields are typed but not enforced.
responseFormatandschemaare typed but not implemented as structured output validation.- Knowledge-store filters like
knowledgeTypesandminImportanceare typed but ignored. - README still contains stale package scope and model examples.
Verification
yarn workspace @epicdm/flowstate-agents-llm-client test
yarn workspace @epicdm/flowstate-agents-llm-client typecheck
yarn workspace @epicdm/flowstate-agents-llm-client build
Done When
- The correct workflow skill has been used.
- Source behavior, not generated Dojo prose, backs the implementation.
- Reserved/partial config is not documented as operational.
- Downstream coordinator callers are checked for public behavior changes.
Package Skill Inventory
Package Skill Inventory: @epicdm/flowstate-agents-llm-client
Package Context
Package path: /Users/sthornock/code/epic/epic-flowstate-community/packages/flowstate-agents-llm-client
This package centers on LLMClient. Its skills should teach agents which parts of the config surface are implemented, how to call query() and stream(), how provider registry and cost calculation work, and how memory/knowledge composition behaves.
Existing .flowstate/dojo files are generated/prototype artifacts and should not be published as-is.
Skill Map
| Skill | Type | Trigger | Teaches | Evidence | Depends On | Dojo |
|---|---|---|---|---|---|---|
flowstate-agents-llm-client | orchestrator | Use when touching LLMClient setup, query, stream, docs, or package integration | Routes agents to provider, query, streaming, memory/knowledge, troubleshooting, and maintenance workflows | src/llm-client.ts, src/index.ts, coordinator refs | package docs, feature matrix | ready-after-review |
llm-client-provider-registry | reference | Use when adding/changing providers, models, pricing, or LM Studio config | Provider validation, model names, cost metadata, API key/baseUrl rules | src/providers/*.ts, getProviderConfig() | provider docs, maintenance | ready-after-review |
llm-client-query-workflow | workflow | Use when implementing single-shot LLM calls through LLMClient.query() | Query lifecycle, retry, hooks, cost, AMS save, JSON prompt caveats | query() source and coordinator services | provider registry, troubleshooting | ready-after-review |
llm-client-streaming-tools | workflow | Use when consuming LLMClient.stream() or tool chunks | Async generator chunks, tool-call/tool-result events, final usage/cost | stream() source, streaming types | provider registry | ready-after-review |
llm-client-memory-knowledge-composition | workflow | Use when combining AMS, Memory Prompt API, or knowledge-store with LLM prompts | useMemoryPromptApi, includeContextByDefault, autoSave, knowledge injection, ignored filters | memory prompt tests, retrieveKnowledge() | memory-client and knowledge-store skills | ready-after-review |
llm-client-contract-troubleshooting | troubleshooting | Use when docs, generated Dojo, or callers disagree with source behavior | Reserved config fields, retry semantics, budget gaps, proxy stub, JSON/schema gaps | types/config.ts, server/index.ts, docs drift | package review skill | local-only |
llm-client-maintenance | maintenance | Use before changing public config/results or publishing docs/Dojo | Downstream reference checks, provider pricing checks, verification commands | package scripts, coordinator reverse refs | package docs/dojo sync skills | local-only |
Anti-Sprawl Decision
Seven skills is appropriate. The package has one main class, but it has distinct operational tasks: provider setup, query, streaming, memory/knowledge composition, troubleshooting contract drift, and maintenance. Creating one skill per config field or provider would reproduce the bad generated pattern.
Feature Coverage
| Feature Group | Source Evidence | Covered By | Notes |
|---|---|---|---|
LLMClient, query, history | src/llm-client.ts | orchestrator, query workflow | Main public workflow |
| Provider registry/configs | src/providers/* | provider registry | Include model drift checks |
| Retry/cost/env/logger | src/utils/* | query workflow, troubleshooting, maintenance | Logger exists but is not wired into client |
| Streaming/tool chunks | stream() | streaming tools | finishReason hardcoded |
| AMS/Memory Prompt | getMemoryPromptMessages(), tests | memory/knowledge composition | Includes fallback behavior |
| Knowledge-store | retrieveKnowledge() | memory/knowledge composition | Filters are partially ignored |
| Server proxy | src/server/index.ts | troubleshooting/deferred | Stub only |
| Budget/schema/response format | types/config.ts | troubleshooting/deferred | Reserved, not operational |
Composition Model
Start with flowstate-agents-llm-client. Use provider registry for config/model/pricing edits, query workflow for single-shot calls, streaming tools for async generator callers, memory/knowledge composition for stateful agent prompts, and troubleshooting before trusting README or generated Dojo claims. Consult flowstate-agents-knowledge-store and the future memory-client package skill when composing prompt context.
Deferred Skills
| Deferred Skill | Reason | Next Review Condition |
|---|---|---|
llm-client-server-proxy | createLLMProxy() throws | Add when proxy implementation lands |
llm-client-budget-controls | Budget fields are typed but unenforced | Add when query()/stream() enforce budgets |
llm-client-structured-output | responseFormat and schema do not affect calls | Add when schema validation is implemented |
| One skill per provider | Current behavior is registry data plus SDK factory selection | Split only if providers diverge operationally |
Review Questions
- Should
includeAMSContextandsaveToAMSbecome per-call controls or be removed from docs? - Should knowledge filters pass into
KnowledgeStoreClient.retrieve()? - Should retry honor
retryableErrors? - Should
query()return AI SDK tool calls inLLMResult.toolCalls? - Should README be migrated from
@epic-flow/*to@epicdm/*before Dojo publication?
Review Gate
Package Skills Review: @epicdm/flowstate-agents-llm-client
Verdict
Pass with fixes.
The new local skillset teaches actual package workflows and explicitly rejects generated Dojo claims around unimplemented budget, proxy, schema, and filter behavior. It should replace the generated feature-list content as the source for future Dojo artifacts.
Findings
| Severity | Skill | Issue | Evidence | Required Fix |
|---|---|---|---|---|
| Important | all | Existing Dojo artifacts are generated and overstate source behavior | .flowstate/dojo/course.json, .flowstate/dojo/skill.yaml | Rebuild Dojo artifacts from reviewed skills before publishing |
| Important | query/memory/troubleshooting | Public types include unsupported fields | types/config.ts, llm-client.ts | Keep warnings visible until implementation or docs cleanup |
| Minor | provider registry | README model/package-scope drift remains | README vs provider source | Update docs before final package publication |
| Minor | maintenance | Verification passed after authoring; keep this evidence current before Dojo publish | test, typecheck, build passed in this pass | Re-run before final Dojo publish if source changes |
Coverage
| Feature Group | Status | Skill | Notes |
|---|---|---|---|
| Provider/model registry | Covered | llm-client-provider-registry | Source as authority |
| Query workflow | Covered | llm-client-query-workflow | Includes result handling caveats |
| Streaming/tool chunks | Covered | llm-client-streaming-tools | Includes finish reason caveat |
| AMS/Memory Prompt/knowledge-store | Covered | llm-client-memory-knowledge-composition | Includes ignored filters |
| Contract drift | Covered | llm-client-contract-troubleshooting | Rejects generated claims |
| Maintenance | Covered | llm-client-maintenance | Includes reverse reference check |
Drift and Contract Risks
| Area | Risk | Evidence | Decision |
|---|---|---|---|
| Budget | Typed but unenforced | types/config.ts, llm-client.ts | Warn and defer skill |
| Structured output | Typed but not implemented | QueryParams, query() | Warn and defer skill |
| Proxy | Exported stub throws | src/server/index.ts | Warn and defer skill |
| Knowledge filters | Typed but ignored | retrieveKnowledge() | Warn in composition skill |
| README/Dojo | Overstates behavior | README, .flowstate/dojo/* | Rebuild before publish |
Dojo Publication Decision
Do not publish existing generated Dojo files. The reviewed local skills are eligible to become Dojo source content after package verification commands pass and manifests are rebuilt.
Follow-Up Work
- Package verification passed:
yarn workspace @epicdm/flowstate-agents-llm-client testyarn workspace @epicdm/flowstate-agents-llm-client typecheckyarn workspace @epicdm/flowstate-agents-llm-client build
- Rebuild
.flowstate/dojofrom reviewed local skills. - Update README/docs drift.
- Decide whether to implement or remove reserved config fields.
Usage
Start with this skill to understand the package purpose, then use the package-local focused skills for specific workflows. Keep this Dojo version aligned with packages/flowstate-agents-llm-client/package.json. Do not treat generated feature lists as lessons; use workflow evidence from CODE-REVIEW.md, SKILL-INVENTORY.md, and REVIEW.md.
Install
Run this in your project to install via CLI:
fscloud dojo skill install flowstate-epic-flowstate-community-epicdm-flowstate-agents-llm-client --target <target> --out ./skillsReplace <target> with your agent target identifier. See the CLI docs for details.