atomic

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.7
    publishedInvalid 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

TaskUse Skill
Provider/model/pricing changesllm-client-provider-registry
Single-shot LLM callsllm-client-query-workflow
Streaming and tool chunksllm-client-streaming-tools
AMS, Memory Prompt API, or knowledge-store compositionllm-client-memory-knowledge-composition
Docs/source drift, ignored config, proxy/budget/schema issuesllm-client-contract-troubleshooting
Public API or downstream contract changesllm-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.ts
  • src/providers/*.ts
  • src/types/*.ts
  • src/utils/*.ts
  • tests/memory-prompt-integration.test.ts
  • .flowstate/docs/api/index.md

Critical Pitfalls

  • createLLMProxy() is exported but throws.
  • Budget fields are typed but not enforced.
  • responseFormat and schema are typed but not implemented as structured output validation.
  • Knowledge-store filters like knowledgeTypes and minImportance are 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

SkillTypeTriggerTeachesEvidenceDepends OnDojo
flowstate-agents-llm-clientorchestratorUse when touching LLMClient setup, query, stream, docs, or package integrationRoutes agents to provider, query, streaming, memory/knowledge, troubleshooting, and maintenance workflowssrc/llm-client.ts, src/index.ts, coordinator refspackage docs, feature matrixready-after-review
llm-client-provider-registryreferenceUse when adding/changing providers, models, pricing, or LM Studio configProvider validation, model names, cost metadata, API key/baseUrl rulessrc/providers/*.ts, getProviderConfig()provider docs, maintenanceready-after-review
llm-client-query-workflowworkflowUse when implementing single-shot LLM calls through LLMClient.query()Query lifecycle, retry, hooks, cost, AMS save, JSON prompt caveatsquery() source and coordinator servicesprovider registry, troubleshootingready-after-review
llm-client-streaming-toolsworkflowUse when consuming LLMClient.stream() or tool chunksAsync generator chunks, tool-call/tool-result events, final usage/coststream() source, streaming typesprovider registryready-after-review
llm-client-memory-knowledge-compositionworkflowUse when combining AMS, Memory Prompt API, or knowledge-store with LLM promptsuseMemoryPromptApi, includeContextByDefault, autoSave, knowledge injection, ignored filtersmemory prompt tests, retrieveKnowledge()memory-client and knowledge-store skillsready-after-review
llm-client-contract-troubleshootingtroubleshootingUse when docs, generated Dojo, or callers disagree with source behaviorReserved config fields, retry semantics, budget gaps, proxy stub, JSON/schema gapstypes/config.ts, server/index.ts, docs driftpackage review skilllocal-only
llm-client-maintenancemaintenanceUse before changing public config/results or publishing docs/DojoDownstream reference checks, provider pricing checks, verification commandspackage scripts, coordinator reverse refspackage docs/dojo sync skillslocal-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 GroupSource EvidenceCovered ByNotes
LLMClient, query, historysrc/llm-client.tsorchestrator, query workflowMain public workflow
Provider registry/configssrc/providers/*provider registryInclude model drift checks
Retry/cost/env/loggersrc/utils/*query workflow, troubleshooting, maintenanceLogger exists but is not wired into client
Streaming/tool chunksstream()streaming toolsfinishReason hardcoded
AMS/Memory PromptgetMemoryPromptMessages(), testsmemory/knowledge compositionIncludes fallback behavior
Knowledge-storeretrieveKnowledge()memory/knowledge compositionFilters are partially ignored
Server proxysrc/server/index.tstroubleshooting/deferredStub only
Budget/schema/response formattypes/config.tstroubleshooting/deferredReserved, 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 SkillReasonNext Review Condition
llm-client-server-proxycreateLLMProxy() throwsAdd when proxy implementation lands
llm-client-budget-controlsBudget fields are typed but unenforcedAdd when query()/stream() enforce budgets
llm-client-structured-outputresponseFormat and schema do not affect callsAdd when schema validation is implemented
One skill per providerCurrent behavior is registry data plus SDK factory selectionSplit only if providers diverge operationally

Review Questions

  • Should includeAMSContext and saveToAMS become 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 in LLMResult.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

SeveritySkillIssueEvidenceRequired Fix
ImportantallExisting Dojo artifacts are generated and overstate source behavior.flowstate/dojo/course.json, .flowstate/dojo/skill.yamlRebuild Dojo artifacts from reviewed skills before publishing
Importantquery/memory/troubleshootingPublic types include unsupported fieldstypes/config.ts, llm-client.tsKeep warnings visible until implementation or docs cleanup
Minorprovider registryREADME model/package-scope drift remainsREADME vs provider sourceUpdate docs before final package publication
MinormaintenanceVerification passed after authoring; keep this evidence current before Dojo publishtest, typecheck, build passed in this passRe-run before final Dojo publish if source changes

Coverage

Feature GroupStatusSkillNotes
Provider/model registryCoveredllm-client-provider-registrySource as authority
Query workflowCoveredllm-client-query-workflowIncludes result handling caveats
Streaming/tool chunksCoveredllm-client-streaming-toolsIncludes finish reason caveat
AMS/Memory Prompt/knowledge-storeCoveredllm-client-memory-knowledge-compositionIncludes ignored filters
Contract driftCoveredllm-client-contract-troubleshootingRejects generated claims
MaintenanceCoveredllm-client-maintenanceIncludes reverse reference check

Drift and Contract Risks

AreaRiskEvidenceDecision
BudgetTyped but unenforcedtypes/config.ts, llm-client.tsWarn and defer skill
Structured outputTyped but not implementedQueryParams, query()Warn and defer skill
ProxyExported stub throwssrc/server/index.tsWarn and defer skill
Knowledge filtersTyped but ignoredretrieveKnowledge()Warn in composition skill
README/DojoOverstates behaviorREADME, .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 test
    • yarn workspace @epicdm/flowstate-agents-llm-client typecheck
    • yarn workspace @epicdm/flowstate-agents-llm-client build
  • Rebuild .flowstate/dojo from 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 ./skills

Replace <target> with your agent target identifier. See the CLI docs for details.