Imported from pavkam/agent-kit (
.agents/skills/agentkit-artifacts/SKILL.md). Install upstream withnpx skills add pavkam/agent-kit --skill agentkit-artifacts. Copyright stays with the author.
AgentKit Artifacts
Read AGENTS.md, the artifact architecture, and the normative artifact specification. When changing C#, also read the modern C# rules.
For a coding host, read the focused profile when artifacts hold truncated tool output, workspace snapshots, or session exports/shares.
Boundary
- Keep portable identities, references, metadata, requests, results, and store contracts in AgentKit.Abstractions. AgentKit.Artifacts owns coordination, integrity, retention, selection, and reconciliation; backends are leaves.
- Artifacts are bounded durable content, not conversation history, durable memory, open streams, provider handles, signed URLs, or host paths.
- Preserve tenant and owner scope, classification, media type, length, hash, version, retention, and mutability in every durable reference.
- Make writes explicitly prepare/finalize, bounded, cancellable, and integrity checked. A partial upload is never readable as committed content.
- Keep artifact storage one-way: callers coordinate session or tool-reference commits. The artifact runtime never appends those records itself.
- Route protected backend effects through security and the selected file or network boundary; every real backend revalidates its bounded grant.
- Define stream ownership, orphan reconciliation, tombstones, external ownership, and deletion semantics instead of pretending cross-store atomicity.
Reference commitment uses a caller-owned durable intent and a pin/retention fence. Timer expiry alone cannot prove an orphan or authorize garbage collection that races a late reference commit. Finalize and abort have one conditional winner; artifact storage never calls back into the referencing coordinator.
Use the specification's acceptance scenarios for focused tests, then run the artifact store's shared conformance suite and DI replacement checks.