| name | use-ai-foundation-sdk |
| description | Query, explain, integrate, and debug the Halo AI Foundation Java SDK, browser/Vue SDK, UI Message transport, and FormKit model selector. Use when an AI coding agent needs to answer AI Foundation API questions, add AI capabilities to a Halo plugin, implement text generation, structured output, tools, embeddings, reranking, RAG, image generation, streaming chat, message persistence, or model selection, or verify a consumer plugin against the official SDK contracts. |
Use AI Foundation SDK
Treat Halo AI Foundation as an independent SDK. Derive answers and code from its official
documentation and public contracts.
Do not trust memory
AI Foundation evolves independently of other AI libraries. Never write its API calls from memory
or translate a similarly named API from another SDK. Verify every public type, method, option,
event, and package export against the documentation and source for the version used by the target
project.
Use the closest version-matched evidence
Do not clone the repository by default. Use this evidence order:
- If the current workspace is already an AI Foundation source checkout containing
api/, dev/,
and ui/packages/sdk/, use it directly.
- Inspect the target project for its SDK versions:
- Java:
run.halo.aifoundation:api:<version> in Gradle files or version catalogs.
- Browser/Vue:
@halo-dev/ai-foundation-sdk in package.json and the active lockfile.
- Prefer dependencies already resolved in the target project:
- Read the Java source JAR from the Gradle module cache. If no source JAR exists, inspect public
signatures from the binary JAR.
- Read the npm package version, root exports, declaration files, and runtime files from
node_modules/@halo-dev/ai-foundation-sdk.
- Read references/local-artifacts.md for exact lookup commands.