Parent PRD
#2
What to build
Evolve @agentskit/core to serve as the foundation for the entire v3 ecosystem. This means:
- Upgrade ToolDefinition: enforce
schema: JSONSchema7 type, add optional init()/dispose() lifecycle methods, allow execute to return AsyncIterable<unknown>, add optional tags/category for discovery
- Add SkillDefinition:
name, description, systemPrompt, optional examples, tools (tool name hints), delegates (other skill names), temperature, onActivate hook
- Add VectorMemory:
store(docs), search(query, options), delete(ids) — separate from ChatMemory
- Add AgentEvent: Union type for lifecycle events (
llm:start, llm:end, tool:start, tool:end, memory:load, agent:step, error, etc.)
- Add Observer:
{ name: string, on: (event: AgentEvent) => void | Promise<void> }
- Add EvalSuite / EvalResult: Minimal contract types for evaluation
- Extract shared primitives: Pull
executeToolCall, consumeStream, buildMessage out of ChatController into standalone exported functions so both ChatController and the future AgentRunner can use them
- Emit AgentEvent from ChatController at appropriate lifecycle points
Core must remain zero external dependencies and under 10 KB gzipped.
Acceptance criteria
Blocked by
None — can start immediately
User stories addressed
- User story 4 (swap providers)
- User story 6 (custom tools with simple contract)
- User story 7 (JSON Schema for tool params)
- User story 25 (observability optional)
- User story 35 (custom memory backends with clear contract)
Parent PRD
#2
What to build
Evolve
@agentskit/coreto serve as the foundation for the entire v3 ecosystem. This means:schema: JSONSchema7type, add optionalinit()/dispose()lifecycle methods, allowexecuteto returnAsyncIterable<unknown>, add optionaltags/categoryfor discoveryname,description,systemPrompt, optionalexamples,tools(tool name hints),delegates(other skill names),temperature,onActivatehookstore(docs),search(query, options),delete(ids)— separate from ChatMemoryllm:start,llm:end,tool:start,tool:end,memory:load,agent:step,error, etc.){ name: string, on: (event: AgentEvent) => void | Promise<void> }executeToolCall,consumeStream,buildMessageout of ChatController into standalone exported functions so both ChatController and the future AgentRunner can use themCore must remain zero external dependencies and under 10 KB gzipped.
Acceptance criteria
ToolDefinitionupdated with JSONSchema7 type, lifecycle methods, AsyncIterable support, discovery metadataSkillDefinitioninterface exported from coreVectorMemoryinterface exported from core (separate from ChatMemory)AgentEventunion type exported from coreObserverinterface exported from coreEvalSuiteandEvalResulttypes exported from coreexecuteToolCall,consumeStream,buildMessage) exported as standalone functionsanyBlocked by
None — can start immediately
User stories addressed