OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add getsentry/junior --skill pi-agent-integration
Guides implementation and review of the latest `@earendil-works/pi-agent-core` API. Use when a task mentions Pi `Agent`, agent loops, streaming, tools, queues, continuation, proxying, aborts, sessions, skills, compaction, or the current `AgentHarness` scaffold.
npx skills add getsentry/junior --skill pi-agent-integration
Implement Pi consumers against the latest published API. Keep streaming stable, queue behavior explicit, and wrapper code small.
| Request type | Read first |
|---|---|
Wire or update Agent, loop, provider, stream, or tool APIs | references/api-surface.md |
| Add Pi behavior in an app, library, runtime, or adapter | references/common-use-cases.md |
Use AgentHarness, sessions, skills, resources, compaction, or execution helpers | references/harness.md |
| Debug streaming, tools, queues, continuation, proxy, abort, or harness failures | references/troubleshooting-workarounds.md |
Load each reference that the task needs. Keep guidance Pi-specific unless the user asks about a consuming product.
latest for @earendil-works/pi-agent-core before relying on a contract. Treat the published package as authoritative. Treat upstream main as unreleased evidence.streamFn when constructing Agent. Also pass it as the last argument to low-level loop functions.Agent when event handling must finish before run settlement. Use agentLoop only when an observational event stream is enough.message_update when assistantMessageEvent.type === "text_delta".prompt(), continue(), or reset() while an agent is active. Queue mid-run input with steer() or followUp().user or toolResult tail. An assistant tail can only drain queued steering or follow-up messages.streamFn, convertToLlm, transformContext, getApiKey, queue providers, and loop hooks no-throw for expected failures. Return safe values or encode the failure in stream events.0.84.1, do not recommend AgentHarness run, queue, hook, or navigation paths for production use. They are scaffold APIs and most reject with HarnessNotImplemented. Use bare Agent, session APIs, and standalone helpers until the published implementation is complete.streamFn, getApiKey, sessionId, thinkingBudgets, transport, maxRetryDelayMs, onPayload, onResponse, beforeToolCall, afterToolCall, shouldStopAfterTurn, prepareNextTurnWithContext, toolExecution, steeringMode, and followUpMode.Agent through agent.state and public runtime options. Call reset() only when idle.transformContext for message-level pruning or injection. Use convertToLlm for provider-compatible role conversion and filtering."one-at-a-time" or "all" when ordering or batching matters.streamFn with streamProxy-style behavior for server-proxied model access.toolExecution, per-tool executionMode, beforeToolCall, afterToolCall, thrown tool errors, and terminate before adding a custom tool runner.prompt(), continue(), and reset(). Verify queued steer() and followUp() behavior.continue() with empty history and with user, toolResult, and assistant tails.convertToLlm emits only provider-compatible messages.streamFn encodes expected provider failures instead of throwing or rejecting.Agent.subscribe() listener settlement and waitForIdle() with async listeners.AgentHarness scaffold, verify implemented status in the published source before recommending any method.latest only.main behavior as published behavior.