{"_id":"@agentlair/langchain","_rev":"8-ca24a6f683e5e16c779c69953ac9df7d","name":"@agentlair/langchain","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@agentlair/langchain","version":"0.1.0","keywords":["agentlair","langchain","langchainjs","ai-agents","agent-identity","behavioral-trust","audit-trail","telemetry","typescript"],"author":{"name":"AgentLair"},"license":"MIT","_id":"@agentlair/langchain@0.1.0","maintainers":[{"name":"piiiico","email":"pico@amdal.dev"}],"homepage":"https://agentlair.dev","bugs":{"url":"https://github.com/piiiico/agentlair-worker/issues"},"dist":{"shasum":"c81bc26d6712a31dad4a486046f7fd933ebc9fd8","tarball":"https://registry.npmjs.org/@agentlair/langchain/-/langchain-0.1.0.tgz","fileCount":22,"integrity":"sha512-Y83J7Jtgzsd3NSY1lleHHQqSBggmhjiEbeiCAK2TYjTVzGw8mw8xvdtdIOHj1Rjc5mJOEZ4LB+f8YMnZKt5osg==","signatures":[{"sig":"MEYCIQCFx6Gh2e7slDewY4CwhD5pAddJYpic9vroL99kjWg46wIhANPsNV7aOMIT2rCXCSTUhwJV4zDgkhWDhYiwf5QdJ/Vn","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56628},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"bun test","build":"tsc","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"piiiico","email":"pico@amdal.dev"},"deprecated":"Superseded by 0.2.0 — wrap-tool primitive (withAgentLair, wrapTool) matching @agentlair/openai-agents. Run: npm install @agentlair/langchain@^0.2.0","repository":{"url":"git+https://github.com/piiiico/agentlair-worker.git","type":"git"},"_npmVersion":"10.9.7","description":"AgentLair behavioral telemetry and AAT token injection for LangChain.js. Captures tool calls, completions, and errors — feeds your agent's trust profile.","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@langchain/core":"^0.3.0"},"peerDependencies":{"@langchain/core":">=0.2.0"},"peerDependenciesMeta":{"@langchain/core":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/langchain_0.1.0_1777759281518_0.21124792532171677","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@agentlair/langchain","version":"0.2.0","keywords":["agentlair","agent-trust","langchain","langchainjs","agent-identity","aat","audit","did-web","behavioral-attestation","agent-authentication-token"],"author":{"url":"piiiico","name":"AgentLair"},"license":"Apache-2.0","_id":"@agentlair/langchain@0.2.0","maintainers":[{"name":"piiiico","email":"pico@amdal.dev"}],"homepage":"https://agentlair.dev","bugs":{"url":"https://github.com/piiiico/agentlair-primitives/issues"},"dist":{"shasum":"84f1e53f08754879ba63f7c3a31e45e57073db9f","tarball":"https://registry.npmjs.org/@agentlair/langchain/-/langchain-0.2.0.tgz","fileCount":6,"integrity":"sha512-iDhkabn4ijunylyqWjlAwtOq9gnVGftrIRFXsEobR5E/iO5UqwtR0vi/iU08J68QLfS+Hy2fVq3VBq65p1u4BA==","signatures":[{"sig":"MEUCID0QlKe1eSpq3/oNXWQWbxWsPyB8VjNkMV+ePfGnYIECAiEAh4GtUgus66z7xkrxUlqoUxKmXwrglxq+6wln6Rl51UY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35853},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"a30b0eb06cd027b2d7e081d3a521b043621be259","scripts":{"test":"bun test","build":"tsc","check":"tsc --noEmit","prepublishOnly":"tsc"},"_npmUser":{"name":"piiiico","email":"pico@amdal.dev"},"deprecated":"Patch in 0.2.1: audit endpoint corrected to /v1/events (mirror of @agentlair/openai-agents v0.1.2 fix). Audit POSTs in 0.2.0 silently fail. Run: npm install @agentlair/langchain@^0.2.1","repository":{"url":"git+https://github.com/piiiico/agentlair-primitives.git","type":"git"},"_npmVersion":"10.9.7","description":"AgentLair adapter for LangChain.js — issue per-agent AATs, attach Bearer tokens to tool calls, emit audit envelopes per invocation.","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"peerDependencies":{"@langchain/core":">=0.3.0"},"peerDependenciesMeta":{"@langchain/core":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/langchain_0.2.0_1778092722066_0.2610335034113056","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@agentlair/langchain","version":"0.2.1","keywords":["agentlair","agent-trust","langchain","langchainjs","agent-identity","aat","audit","did-web","behavioral-attestation","agent-authentication-token"],"author":{"url":"piiiico","name":"AgentLair"},"license":"Apache-2.0","_id":"@agentlair/langchain@0.2.1","maintainers":[{"name":"piiiico","email":"pico@amdal.dev"}],"homepage":"https://agentlair.dev","bugs":{"url":"https://github.com/piiiico/agentlair-primitives/issues"},"dist":{"shasum":"e3d27be726cbe63969680b2257cc9b98015bb596","tarball":"https://registry.npmjs.org/@agentlair/langchain/-/langchain-0.2.1.tgz","fileCount":6,"integrity":"sha512-d8mI/6MoKEtIk7oZ1eA7JmhanKOdacTaaTGceAM8aXTUlrbh+DiM4xdl9NEnByQwCY9LAVle4Dk3cqF4aunt6Q==","signatures":[{"sig":"MEQCID1Fm4zYcKVXBMAG9MmS2gfl7q5KLN1hSLe111Vw/oJVAiB33mQRkJpSDzqGNPBzPHJd+ABTc5zTPx9AjIC6BwSNTg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37360},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"a30b0eb06cd027b2d7e081d3a521b043621be259","scripts":{"test":"bun test","build":"tsc","check":"tsc --noEmit","prepublishOnly":"tsc"},"_npmUser":{"name":"piiiico","email":"pico@amdal.dev"},"repository":{"url":"git+https://github.com/piiiico/agentlair-primitives.git","type":"git"},"_npmVersion":"10.9.7","description":"AgentLair adapter for LangChain.js — issue per-agent AATs, attach Bearer tokens to tool calls, emit audit envelopes per invocation.","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"peerDependencies":{"@langchain/core":">=0.3.0"},"peerDependenciesMeta":{"@langchain/core":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/langchain_0.2.1_1778092905123_0.12504468788648526","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@agentlair/langchain","version":"0.2.2","keywords":["agentlair","agent-trust","langchain","langchainjs","agent-identity","aat","audit","did-web","behavioral-attestation","agent-authentication-token"],"author":{"url":"piiiico","name":"AgentLair"},"license":"Apache-2.0","_id":"@agentlair/langchain@0.2.2","maintainers":[{"name":"piiiico","email":"pico@amdal.dev"}],"homepage":"https://agentlair.dev","bugs":{"url":"https://github.com/piiiico/agentlair-primitives/issues"},"dist":{"shasum":"44b53086f5ebb4da13d1fd0169f213bc8dee5a8a","tarball":"https://registry.npmjs.org/@agentlair/langchain/-/langchain-0.2.2.tgz","fileCount":6,"integrity":"sha512-ooWUjxv1GuhZWRsa7LwtYADE4td/BUp4JjwFtbeBkF0J4XAhVo3iMhFrXZ4Ks+hmqwvvNvo73nby/ivnl8no/Q==","signatures":[{"sig":"MEUCIDVpbFuGvalV991tBvWR1eXM8NgSCoY9LuDS4O1mU2AoAiEA9AumJ/tDyyOSx1EytWa+qCiG+j6zNyUaYBwTdehZaCk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50272},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"55f0a0d06d8a28e237df48d70488d90dc7798642","scripts":{"test":"bun test","build":"tsc","check":"tsc --noEmit","prepublishOnly":"tsc"},"_npmUser":{"name":"piiiico","email":"pico@amdal.dev"},"repository":{"url":"git+https://github.com/piiiico/agentlair-primitives.git","type":"git"},"_npmVersion":"10.9.7","description":"AgentLair adapter for LangChain.js — issue per-agent AATs, attach Bearer tokens to tool calls, emit audit envelopes per invocation.","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"peerDependencies":{"@langchain/core":">=0.3.0"},"peerDependenciesMeta":{"@langchain/core":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/langchain_0.2.2_1778201848288_0.48179346731985606","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@agentlair/langchain","version":"0.3.0","description":"AgentLair adapter for LangChain.js — issue per-agent AATs, attach Bearer tokens to tool calls, emit audit envelopes, and sign outbound HTTP requests with RFC 9421 / Web Bot Auth.","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsc","check":"tsc --noEmit","test":"bun test","prepublishOnly":"tsc"},"keywords":["agentlair","agent-trust","langchain","langchainjs","agent-identity","aat","audit","did-web","behavioral-attestation","agent-authentication-token","rfc9421","http-message-signatures","web-bot-auth"],"author":{"name":"AgentLair","url":"piiiico"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/piiiico/agentlair-primitives.git"},"homepage":"https://agentlair.dev","bugs":{"url":"https://github.com/piiiico/agentlair-primitives/issues"},"engines":{"node":">=18.0.0"},"peerDependencies":{"@langchain/core":">=0.3.0"},"peerDependenciesMeta":{"@langchain/core":{"optional":true}},"devDependencies":{"typescript":"^5.9.3"},"_id":"@agentlair/langchain@0.3.0","gitHead":"c6ce5d707cf4dbc1cc15529fba2b0ffbc6b7f768","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-NfYn12hmKrSRWrT3uRPkRqoYP2K6h65MQJVkyrWpC3h21E1FjhxbxUaF2ym9ooB0OXGKsU263utagKqnaEZzpA==","shasum":"11a5123ccd060e21fa03b4c177af2005f7be000c","tarball":"https://registry.npmjs.org/@agentlair/langchain/-/langchain-0.3.0.tgz","fileCount":6,"unpackedSize":66370,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDk9DpaEmNxxBw82Ot3QNNHhVXAqcAFK+TZ50nLGB89pwIhAKGIDZMkK2UA02iIWbodanHMTWpZ/A6IozWAdad6WUFF"}]},"_npmUser":{"name":"piiiico","email":"pico@amdal.dev"},"directories":{},"maintainers":[{"name":"piiiico","email":"pico@amdal.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/langchain_0.3.0_1778229933503_0.685933422564281"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-02T22:01:21.438Z","modified":"2026-05-08T08:45:33.786Z","0.1.0":"2026-05-02T22:01:21.660Z","0.2.0":"2026-05-06T18:38:42.219Z","0.2.1":"2026-05-06T18:41:45.273Z","0.2.2":"2026-05-08T00:57:28.424Z","0.3.0":"2026-05-08T08:45:33.644Z"},"bugs":{"url":"https://github.com/piiiico/agentlair-primitives/issues"},"author":{"name":"AgentLair","url":"piiiico"},"license":"Apache-2.0","homepage":"https://agentlair.dev","keywords":["agentlair","agent-trust","langchain","langchainjs","agent-identity","aat","audit","did-web","behavioral-attestation","agent-authentication-token","rfc9421","http-message-signatures","web-bot-auth"],"repository":{"type":"git","url":"git+https://github.com/piiiico/agentlair-primitives.git"},"description":"AgentLair adapter for LangChain.js — issue per-agent AATs, attach Bearer tokens to tool calls, emit audit envelopes, and sign outbound HTTP requests with RFC 9421 / Web Bot Auth.","maintainers":[{"name":"piiiico","email":"pico@amdal.dev"}],"readme":"# @agentlair/langchain\n\nAgentLair adapter for [LangChain.js](https://github.com/langchain-ai/langchainjs). Issue an Agent Authentication Token (AAT) per agent run, attach it to outbound tool calls, and emit a signed audit envelope per invocation — without changing how you write tools.\n\n## Install\n\n```bash\nnpm install @agentlair/langchain @langchain/core\n# or\nbun add @agentlair/langchain @langchain/core\n```\n\n`@langchain/core` is an (optional) peer dependency. Zero runtime dependencies otherwise. Works in Node 18+, Bun, and edge runtimes (Cloudflare Workers, Deno Deploy).\n\nGet a free AgentLair API key at [agentlair.dev](https://agentlair.dev) — no card required.\n\n## Usage\n\n```ts\nimport { DynamicStructuredTool } from '@langchain/core/tools';\nimport { withAgentLair } from '@agentlair/langchain';\nimport { z } from 'zod';\n\nconst echo = new DynamicStructuredTool({\n  name: 'echo',\n  description: 'Echo a string back to the caller',\n  schema: z.object({ msg: z.string() }),\n  func: async ({ msg }) => `you said: ${msg}`,\n});\n\n// Wrap once at startup. The original tools are unchanged.\nconst [governedEcho] = withAgentLair([echo], {\n  apiKey: process.env.AGENTLAIR_API_KEY!,\n  audience: 'https://my-mcp.example.com',\n  scopes: ['mcp:tools:read'],\n  agentName: 'demo',\n});\n\n// Use the wrapped tool wherever you used the original — bindTools(),\n// createReactAgent(), createToolCallingAgent(), or directly:\nconst result = await governedEcho.invoke({ msg: 'hello' });\n// On every invoke, AgentLair issued (or reused) an AAT and recorded\n// an audit envelope. Inspect at https://agentlair.dev/v1/audit/<jti>.\n```\n\nThat's it. No changes to your tool definitions — `withAgentLair` returns shallow clones with each tool's `invoke` (or `_call`) wrapped to issue an AAT and emit an audit envelope.\n\n## What it does\n\n1. **Issues an AAT** before each tool invocation (cached and reused until expiry by default — one issue per session, not one per tool call).\n2. **Records an audit envelope** for every tool call — args, result, duration, jti, agent name, audience. Best-effort; failures never block the tool.\n3. **Returns a verifiable did:web** — each AAT embeds `did:web:agentlair.dev:agents:<account_id>`, resolvable against AgentLair's JWKS.\n4. **Signs outbound HTTP requests with RFC 9421 / Web Bot Auth** (v0.3.0+) — `signRequest()` produces `Signature` / `Signature-Input` / `Signature-Agent` headers that Google Cloud Fraud Defense and any Web Bot Auth–aware origin can verify.\n\n## Web Bot Auth (RFC 9421 HTTP Message Signatures)\n\nSign outbound requests inside a LangChain tool so the receiving origin can prove the request came from your AgentLair-anchored agent — no shared secrets, no Bearer rotation:\n\n```ts\nimport { signRequest } from '@agentlair/langchain';\n\n// 32-byte Ed25519 keypair — generate once, register the public half at\n// POST https://agentlair.dev/v1/agents/signing-keys, then keep the private\n// half (and its 32-byte raw seed) wherever your agent stores secrets.\nconst req = new Request('https://api.example.com/resource');\nconst signed = await signRequest(req, { privateKey, publicKey });\nconst res = await fetch(signed);\n```\n\n`signRequest` adds three headers:\n\n- `Signature-Input` — covered components, `created`, `expires`, `keyid` (the RFC 8037 JWK thumbprint), and `tag=\"web-bot-auth\"`.\n- `Signature` — Ed25519 over the canonical signature base.\n- `Signature-Agent` — `https://agentlair.dev/agents/<thumbprint>` — verifiers fetch the JWK there.\n\nThe same Ed25519 keypair you register at `/v1/agents/signing-keys` is the one used here. AgentLair's directory endpoint at `GET /agents/<thumbprint>` resolves the public JWK with no auth required, so any verifier (Google Fraud Defense, a custom origin) can complete the loop.\n\nSee [`docs/web-bot-auth`](https://agentlair.dev/docs/web-bot-auth) for the full architecture.\n\n## With an agent\n\nLangChain.js doesn't bundle agents with a `tools[]` field the way the OpenAI Agents SDK does — you compose the array yourself and hand it to your agent constructor. `withAgentLair` slots in naturally:\n\n```ts\nimport { ChatOpenAI } from '@langchain/openai';\nimport { createReactAgent } from '@langchain/langgraph/prebuilt';\nimport { withAgentLair } from '@agentlair/langchain';\n\nconst tools = withAgentLair([echo, search, calculator], {\n  apiKey: process.env.AGENTLAIR_API_KEY!,\n  audience: 'https://my-mcp.example.com',\n  agentName: 'demo',\n});\n\nconst agent = createReactAgent({\n  llm: new ChatOpenAI({ model: 'gpt-4o-mini' }),\n  tools,\n});\n```\n\n## Explicit Agent Self-Attestation\n\nAgents can post L3 self-attestations directly — no tool wrapping required. Use this when your agent wants to declare intent, record a decision, or attest to a constraint before acting:\n\n```ts\nimport { logAuditEvent } from '@agentlair/langchain';\n\n// Agent declares it will not exceed budget before starting work\nconst entry = await logAuditEvent(\n  {\n    category: 'budget',\n    action: 'budget.no_exceed',\n    details: { limit_usd: 10, projected_usd: 2.5, model: 'gpt-4o-mini' },\n  },\n  { apiKey: process.env.AGENTLAIR_API_KEY! },\n);\nconsole.log(entry.id);         // e.g. \"WSZqkmVNIzXrxwqnIwbF\"\nconsole.log(entry.signature);  // Ed25519 sig — independently verifiable\nconsole.log(entry.prev_hash);  // SHA-256 of previous chain entry\n```\n\nThe entry is hash-chained and Ed25519-signed server-side. Verify the chain at `GET /v1/audit/log`.\n\nValid categories: `task`, `tool_call`, `observation`, `reasoning`, `output`, `budget`, `memory`, `session`, and more — see `ALLOWED_AUDIT_CATEGORIES`.\nAction format: lowercase dot-separated, e.g. `\"task.complete\"`, `\"budget.no_exceed\"`. Validates against `AUDIT_ACTION_REGEX` client-side before the network call.\nThrows `AuditLogError` with typed `code` on validation failures or non-2xx responses.\n\n## Lower-level API\n\nIf you want fine-grained control, wrap one tool at a time or issue tokens by hand:\n\n```ts\nimport { issueAATForAgent, recordAuditEvent, wrapTool } from '@agentlair/langchain';\n\n// Issue a token by hand\nconst aat = await issueAATForAgent({\n  apiKey: process.env.AGENTLAIR_API_KEY!,\n  audience: 'https://my-mcp.example.com',\n  scopes: ['mcp:tools:read', 'mcp:tools:execute'],\n  ttl: 3600,\n});\nconsole.log(aat.jti);      // aat_xxxxxxxxxxxxxxxx\nconsole.log(aat.did);      // did:web:agentlair.dev:agents:acc_...\nconsole.log(aat.token);    // eyJhbGciOiJFZERTQSIsImtpZCI6...\n\n// Wrap a single tool with a custom audit sink\nconst wrapped = wrapTool(myTool, {\n  apiKey: process.env.AGENTLAIR_API_KEY!,\n  audience: 'https://my-mcp.example.com',\n  preIssuedAAT: aat,\n  onAuditEvent: (e) => myObservabilityPipeline.send(e),\n});\n```\n\n## Options\n\n| Option | Type | Default | Notes |\n| --- | --- | --- | --- |\n| `apiKey` | string | — | **Required.** `al_live_*` or `al_pod_*` from agentlair.dev. |\n| `audience` | string | — | **Required.** Target service URL the AAT will be presented to. |\n| `scopes` | string[] | `['mcp:tools:read']` | Each must match `^[a-z][a-z0-9._:-]*$`. |\n| `ttl` | number | 3600 | Lifetime in seconds. Max 86400. |\n| `agentName` | string | — | `al_name` claim in the AAT. |\n| `agentEmail` | string | — | `al_email` claim in the AAT. |\n| `agentLairBaseUrl` | string | `https://agentlair.dev` | Override for staging/self-host. |\n| `cacheAAT` | boolean | true | Reuse the AAT across tool calls until expiry. |\n| `preIssuedAAT` | AAT | — | Skip the issue call entirely. Useful in tests. |\n| `onAuditEvent` | function | best-effort POST | Custom audit sink. Failures never block the tool. |\n| `fetchImpl` | typeof fetch | global `fetch` | For testing or edge runtimes. |\n\n## Verification\n\nAudit envelopes are signed with AgentLair's Ed25519 audit key. To verify a token or audit entry independently:\n\n```bash\n# Token — verify against JWKS\ncurl https://agentlair.dev/.well-known/jwks.json\n\n# Per-token metadata\ncurl https://agentlair.dev/v1/audit/<jti>\n```\n\n## Errors\n\n`issueAATForAgent` throws `AgentLairError` with a typed `code`:\n\n| Code | Meaning |\n| --- | --- |\n| `invalid_options` | apiKey or audience missing/malformed |\n| `network_error` | fetch threw (DNS, timeout, etc.) |\n| `http_error` | non-2xx response from `/v1/tokens/issue` (check `.status`) |\n| `invalid_response` | unparseable JSON or unexpected shape |\n\nTool wrapping (`wrapTool`, `withAgentLair`) never throws on AgentLair-side failures — the original tool error (if any) is rethrown unchanged.\n\n`logAuditEvent` throws `AuditLogError` with a typed `code`:\n\n| Code | Meaning |\n| --- | --- |\n| `invalid_category` | category not in `ALLOWED_AUDIT_CATEGORIES` |\n| `invalid_action` | action violates `AUDIT_ACTION_REGEX` or length limit (1–128 chars) |\n| `details_too_large` | details JSON-serialised size exceeds 4 KB |\n| `network_error` | fetch threw (DNS, timeout, etc.) |\n| `http_error` | non-2xx response from `/v1/audit/log` (check `.status`) |\n| `invalid_response` | unparseable JSON or unexpected response shape |\n\n## Reference\n\n- AgentLair: <https://agentlair.dev>\n- LangChain.js: <https://github.com/langchain-ai/langchainjs>\n- Source: <https://github.com/piiiico/agentlair-primitives>\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}