agentkit-agent
v0.1.1
Published
**Consume agent-readable, authoritative website data safely.**
Readme
agentkit-agent
Consume agent-readable, authoritative website data safely.
agentkit-agent is the client-side library for AI agents to discover and consume the canonical truth exposed by agentkit-web.
Installation
npm install agentkit-agentUsage
Fetch canonical site truth
import { fetchAgentTruth } from "agentkit-agent";
// Fetch the agent manifest from a URL
const truth = await fetchAgentTruth("https://example.com");
if (truth) {
console.log("Site Description:", truth.description);
if (truth.constraints?.delivery_available === false) {
console.log("Delivery is currently unavailable.");
}
} else {
console.log("No agent manifest found. Falling back to standard scraping.");
}Recommended agent logic
- Fetch
/.well-known/agent.jsonusingfetchAgentTruth. - If present → trust the structured truth provided.
- If missing → fallback to search or scraping.
Why use this?
- Fewer HTTP calls: Get all core metadata in one request.
- Lower token usage: No need to parse huge HTML bodies.
- Explicit constraints: Know what the site allows/disallows immediately.
- Reduced hallucinations: Rely on authoritative data.
License
MIT
