{"_id":"agent-lattice","_rev":"31-b49b6148fb29806709013735487d7079","name":"agent-lattice","dist-tags":{"latest":"0.26.0"},"versions":{"0.9.12":{"name":"agent-lattice","version":"0.9.12","_id":"agent-lattice@0.9.12","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"d033a11429747998bc51b5cadcd3065b45cedc06","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.9.12.tgz","fileCount":4,"integrity":"sha512-wENNvg01AB9X0xGsSl4k744QgmPMtOZbUIeGplTg9r9DbmKflgUfEDoEaBEJgH3I5wA6qgosaxbZDagLMLcpqQ==","signatures":[{"sig":"MEUCIFoSmO9kkCxXWX/kKwF/uaKb+n9+U+1FUNVnazpg501yAiEAlaALxnGacZXhhAIARUXC6ptT/TiP84stRoPkL9s+2g0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1294975},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1551fa647f83e7540197a22d91623dba25fe3b9b","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.9.12_1783425204968_0.22393643131064445","host":"s3://npm-registry-packages-npm-production"}},"0.9.13":{"name":"agent-lattice","version":"0.9.13","_id":"agent-lattice@0.9.13","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"921657bbc93c3e9c02791c8b086118be7e5af078","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.9.13.tgz","fileCount":4,"integrity":"sha512-xZixtSnvg+mC5mCS1oHxO8F0ffUYyN5e1lORjScqCB10ctm5j3/ZcGjR7Tsq+JwNpDJI1zfyesweXZyrkoQVtA==","signatures":[{"sig":"MEYCIQCexdoixTCtPqUhl3MzfsMmcYXYk8bqSHXroXOy3udTRwIhAJYAHCs+JVP+ovuBHv6aNQxHj/lu3RygAm/0SNmSknXf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1295527},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1551fa647f83e7540197a22d91623dba25fe3b9b","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.9.13_1783499230436_0.19460859398792762","host":"s3://npm-registry-packages-npm-production"}},"0.9.14":{"name":"agent-lattice","version":"0.9.14","_id":"agent-lattice@0.9.14","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"63a4a4828c8212640cd4f495fe13f101ca3b4de5","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.9.14.tgz","fileCount":4,"integrity":"sha512-sYouzuZpbPGP6TFKHCx5oOZaaiEoJ0shy26Z30cM5tiRKsmZ9hsbTrHxLi1YgKaOLEnhb3tuGxTaH3kGc00wdg==","signatures":[{"sig":"MEYCIQCqo3iF5+IgvgW1NQBSVJGXhrCWjaXoUVrNXvp4KYcHDwIhALJ3Oy4ZVwIkdvFBFFIvIVQWxVpOCb/QdXEPcuHuOphG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1296280},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1551fa647f83e7540197a22d91623dba25fe3b9b","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.9.14_1783559927945_0.09853171224170376","host":"s3://npm-registry-packages-npm-production"}},"0.9.15":{"name":"agent-lattice","version":"0.9.15","_id":"agent-lattice@0.9.15","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"e35fdae255ed7c642b548b15d2c3d31be7c09cc0","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.9.15.tgz","fileCount":4,"integrity":"sha512-SQt2kuz9Qz3+/qd+bNVkCfzfhH4VDJGvMrVK1xci2GBlWJWjUCJ7v4ZOvtIjzZ7K/X08CwkQV2p7MNltYNQohQ==","signatures":[{"sig":"MEQCIGNWeoIDAsN4XPPzJhyNSvPvgH4j97l4vyMUcO/zYnQCAiBrDPRRZvYux3XHuzbSalJTXKXO6dRllJfaReLi086bUA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1302885},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1551fa647f83e7540197a22d91623dba25fe3b9b","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.9.15_1783585072112_0.34602213148689986","host":"s3://npm-registry-packages-npm-production"}},"0.9.16":{"name":"agent-lattice","version":"0.9.16","_id":"agent-lattice@0.9.16","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"acfb2a624ac3ec3ecb5345c60e0f4c4d525a38db","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.9.16.tgz","fileCount":4,"integrity":"sha512-mb24BsjyaKakex7X0hz2FtZnai1cHDwmqg7egaosLtqb9zGA8WT0c2+R/6Arv0tyuylU2jOToH+kAV/U/ZN+4g==","signatures":[{"sig":"MEQCIA+IVOyiXhCBEUjJ14UKyUWNwzWVRhNirJ1au7CRyHa8AiAE9BUpkOSH5Jtieo2VzbYpzO9xXubRcsh9MOkVGphyuw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1303349},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1551fa647f83e7540197a22d91623dba25fe3b9b","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.9.16_1783586165981_0.8719364509682186","host":"s3://npm-registry-packages-npm-production"}},"0.9.17":{"name":"agent-lattice","version":"0.9.17","_id":"agent-lattice@0.9.17","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"e9911e55167bcd0ea13ce25e52e0d57a122db670","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.9.17.tgz","fileCount":4,"integrity":"sha512-1L6nEUWpAVdtUx18bOxwHGrdbZuPjV8WAYAQs6prUPchmo5Ma7zLxL+V6eOJV2OUXoXYjp47s0ZxURskiJc09w==","signatures":[{"sig":"MEQCIGAbdO58490Aq872zzAtGFdmqJBWbqwumqjpDKOo4IrvAiBe4EbHcYRhZVMg+PRl+qyz+ab4Wrh+fEqjtC7s2Yud6Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1303738},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1551fa647f83e7540197a22d91623dba25fe3b9b","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.9.17_1783587062407_0.6687031814519808","host":"s3://npm-registry-packages-npm-production"}},"0.9.18":{"name":"agent-lattice","version":"0.9.18","_id":"agent-lattice@0.9.18","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"d8e8fa10c4f778445895e455781fb865e2a121d1","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.9.18.tgz","fileCount":4,"integrity":"sha512-i186i+edXl2ODvWFh8CR83lAw/Xq62gsNpJoyRIPQiKTpFVrakZZ3FEdwyJVT0AbAQdWvW+TPOocv2QLture1A==","signatures":[{"sig":"MEUCIQDHqTGRtbkMhJ0o5u25LRDyl9zYJUGmzxDQU7CzghmfwwIgH44/gFWx9FPOSKuC6iOjbpygvm9xZ1LYut+BP/6RTs4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1301503},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"e0611a72c935de7c654a2499f96e6cbf9c036c3e","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.9.18_1783587718263_0.7956399152143137","host":"s3://npm-registry-packages-npm-production"}},"0.9.19":{"name":"agent-lattice","version":"0.9.19","_id":"agent-lattice@0.9.19","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"6ac1f50f6b5ea05b12716e012587a85d63a17348","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.9.19.tgz","fileCount":4,"integrity":"sha512-aeMHREJX3xqrm3EUbBcMghMetk+NCivMauLT00NTErM6tHVgHEpmupSnyCGOsSnPgP1S3/pyr+P9hNio6YcCcQ==","signatures":[{"sig":"MEUCIQCtLr/JsPm+Ib62nlF9ylOsuFUZ5ohjhsnBeLt8CxUE9AIgZD8bj0Ss0Gx+w2GdfjgBYoIduXIrPyGCm55rbXTG1AQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1302351},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"e0611a72c935de7c654a2499f96e6cbf9c036c3e","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.9.19_1783590835061_0.1599445777273827","host":"s3://npm-registry-packages-npm-production"}},"0.9.20":{"name":"agent-lattice","version":"0.9.20","_id":"agent-lattice@0.9.20","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"bd7ceeae26251fe479401f36ae851bafa5967379","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.9.20.tgz","fileCount":4,"integrity":"sha512-st+XbNc1Ns3H70BF66fQdAqG/iWx+KTI6Nz/PtRQdW2pPowLpQNv9ZezGiAG40PyryvnSVywufAH1fopgG8jIA==","signatures":[{"sig":"MEUCIQDRF4VEzqVUPtLO9YVN5qnyV6hQ4d4GtkUzLbKctMT1KQIgEdUaqch6zB7Pm6NH16w4cuk0v++w981qQ5WnYkIK8Ok=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1303982},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"67e41010e73307d8c833d467b1510e5d6ce8138d","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.9.20_1783776319983_0.7307690333677244","host":"s3://npm-registry-packages-npm-production"}},"0.9.21":{"name":"agent-lattice","version":"0.9.21","_id":"agent-lattice@0.9.21","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"a2420e21187fe944648e95dbe3e4018ad392bffb","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.9.21.tgz","fileCount":4,"integrity":"sha512-WwRrMR3B2vp379eGRHcnT4kNctdwqKxudKpaLn4ivlIVx7lrIDSkiFak7DSPsYyEBnL2efI3NatEKN4rpK6ESA==","signatures":[{"sig":"MEYCIQCKy4kevTpnbjJe81pJICjarhg6k1Cp0fxek1K/gYfMHwIhALxesx9USkXenAkPe8gBvzVt2vbMiu4Ao5/UuZ1ntm0l","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1310984},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1b7ccf62bd5aa43494e2137d410122e78fd9d778","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.9.21_1783814919994_0.8983459101010751","host":"s3://npm-registry-packages-npm-production"}},"0.9.23":{"name":"agent-lattice","version":"0.9.23","_id":"agent-lattice@0.9.23","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"1c180924baf7a5cc2b26d55b94ac0f4e76e8f08a","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.9.23.tgz","fileCount":4,"integrity":"sha512-tspbtuislkTUjjvdpxeGD/q06ezzvc5H1i7SVsfwQDmLntnB67nBwmRaMSRamOsTQYzjmMHkfb9VYJZV3XO0sQ==","signatures":[{"sig":"MEYCIQC4qd17QMckaIeD4JHmXF+GV9zgUMXmv7Y8UovgoR2KPQIhANDif+bB+taXK8oIP1YD1Lb2A/jAy6XzL1yQlgJVXVLW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1314667},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1b7ccf62bd5aa43494e2137d410122e78fd9d778","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.9.23_1783840188628_0.4205034677951982","host":"s3://npm-registry-packages-npm-production"}},"0.9.24":{"name":"agent-lattice","version":"0.9.24","_id":"agent-lattice@0.9.24","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"a2309ded26a1d66f517c5cebab6e70c9f9f2ee02","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.9.24.tgz","fileCount":4,"integrity":"sha512-MSR24i0KSNf1kx+lS9X5Oyj+LXu1fDajk3bj+VghjvFPwaScw/ptMSxZMFazO9PNRPJFJUZ7e1j2bXht9YOtvA==","signatures":[{"sig":"MEQCICWFutF5nz7HefQrEoQGofUFnD3OP0yKKou2WnNuQTb7AiBLLoyEPyYgE5DOsuyuGc7hMDJn40wHkwGSIjOABLbxEg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1320168},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1b7ccf62bd5aa43494e2137d410122e78fd9d778","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.9.24_1783843244208_0.21074099777638766","host":"s3://npm-registry-packages-npm-production"}},"0.9.25":{"name":"agent-lattice","version":"0.9.25","_id":"agent-lattice@0.9.25","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"eb167e36fc09396b025f8ec184efe25abea559eb","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.9.25.tgz","fileCount":4,"integrity":"sha512-Tt0cKA9Q9q/iMjFUaTK+RwlP90CXLDSMBdABQy3jrmFQWn/THyW0QumgtfDyLvIjdG4tJMFnogW82Uin//+ATw==","signatures":[{"sig":"MEYCIQDxlS6RBVan9SqlXz6JYhkg/CC4s/URtKPDd+0OFy1qGQIhAL6pYLS/tR2bP7msZY9my7T/l1BC6sNQAsJEpsFx9Kvg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1330314},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1b7ccf62bd5aa43494e2137d410122e78fd9d778","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.9.25_1784001326969_0.4630049600584434","host":"s3://npm-registry-packages-npm-production"}},"0.12.0":{"name":"agent-lattice","version":"0.12.0","_id":"agent-lattice@0.12.0","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"78a1530f6b3f7304090aa02f22a365a341610981","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.12.0.tgz","fileCount":4,"integrity":"sha512-fh76dENjKG6kpmsjALYJLoNGkov3P8xarLQaF06VX2xU5Ah6Hkfyjx55lEAuGO+lcdboH/QPML3822rC4Gtlkg==","signatures":[{"sig":"MEQCIA2ZR1Cc85wqOmsWzjm0sXYXO1qRvZV44NgqUvk51qL/AiBiRTtaYecldxpes1MicQNSYeacgjIEyzEDFgibOa+eOA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1351806},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"c825864a2164fda35cee13a24caed40e6fad2e91","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.12.0_1785059416125_0.4747913489001083","host":"s3://npm-registry-packages-npm-production"}},"0.14.0":{"name":"agent-lattice","version":"0.14.0","_id":"agent-lattice@0.14.0","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"5e77fc9be331f33df6764132b86ffb3f25ca6594","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.14.0.tgz","fileCount":4,"integrity":"sha512-Xlst/PMggegW6bppD1wfRoqggJpyZC2DcRi0YrhujNrLCEtmVoXk5TpAhEJupu+gCzgcjWttRqacHaKNKKDYCw==","signatures":[{"sig":"MEUCIAMRtjBZnorX5n4ukPoX6Oy67Bjql9hHS5QYIaco+EDqAiEAly50EnueG0mpa0zH6vrosjNTWAsq74bN34te8OH1ef0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1364560},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"70b53ce3bf4fbfdceb8a9444508f878684cd79f5","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.14.0_1785071774467_0.7105737212785601","host":"s3://npm-registry-packages-npm-production"}},"0.15.0":{"name":"agent-lattice","version":"0.15.0","_id":"agent-lattice@0.15.0","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"928212d835b60ef0b0615f28655ca9d916f01f3a","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.15.0.tgz","fileCount":4,"integrity":"sha512-dxQJybSURQuhakQVmEZG4sHfjGBjNHeTesxYCUI3qDaR0xFebR5N9Nv5S5GGXWCmJaBdSbcV5ceATdeEvFm3hA==","signatures":[{"sig":"MEQCIC2WLVfyF2el/nmrx8Hy7XdzlMfgneMQx+bOQ/F33CfCAiBUczNyqp71avS+YKSqAefejiwgLCC5J9JLbecQ7tmTjw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1367791},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"9eb82f3ca28958a97013d1f1959f7d8b6ff2b22b","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.15.0_1786004524153_0.017904321398948486","host":"s3://npm-registry-packages-npm-production"}},"0.16.0":{"name":"agent-lattice","version":"0.16.0","_id":"agent-lattice@0.16.0","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"e0069dc766062e9d04113e2f928eced2a57f6edb","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.16.0.tgz","fileCount":4,"integrity":"sha512-b9PApW3Hy3KtN4HMlW6P146+ZeA0rPcMNrRlnLns+wdbgIE0WIUeXlkLT+2WJTZ1b7hkBV5b2g9fPdKw1Ak1rg==","signatures":[{"sig":"MEQCIG9Jo36L/Cw2zYgAcofxEPBw/ByWy8nlyQ3zg6iIqS2VAiA6iomk4th95r191gZ+SObim3pKCa4idmnkwCuwWZkSfg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1382801},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"635b0457f1deaa1ea0cfbb40e8c9dfa17b4f2837","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.16.0_1786185740883_0.1872107745142677","host":"s3://npm-registry-packages-npm-production"}},"0.17.0":{"name":"agent-lattice","version":"0.17.0","_id":"agent-lattice@0.17.0","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"d9145ee1b1a901e032de67c4c8645887268ad0b3","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.17.0.tgz","fileCount":4,"integrity":"sha512-naKuQs2mRAxqWbvL8PPUh7QxTuOn7NJdIskCT0gvuA3u1lA2poYpF053H1ZPK277kPnxaf82lbExrHoe8Nhw9g==","signatures":[{"sig":"MEQCIEXQpn1vNtbqQ+9o4+x+cigFQnkjkCp0RrNUx0t67PloAiBpc3VHVD5l1gRkDA5b0F49Bl2lfv+6l61nsSVF/xhBtA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1794245},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"275a41cb078fb7ffe69d975d54efdb231fd2efa5","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.17.0_1786206767468_0.2927015787090921","host":"s3://npm-registry-packages-npm-production"}},"0.17.1":{"name":"agent-lattice","version":"0.17.1","_id":"agent-lattice@0.17.1","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"08a3893a9965bbfe862d9b3a5a5e7a3f34957488","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.17.1.tgz","fileCount":4,"integrity":"sha512-eOYzYYsAmtimIzSX6onJgk6aB9irY4fZhkP2/6RQmxNDhmeJ7PkXvzOZW6grgyqInzSTEMdp/bjf4JVgk3lbEw==","signatures":[{"sig":"MEYCIQCS2ciOsa5oA3LliPOzvGseUhbAzWzaW7RMVvxI8SfTBAIhAN4WgiHK8zBGi9U9WivhigmJObnr75oU9pWXKihJEEQY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1799438},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f2889319584eb2720a27ee9fb70844c5a69ce4fb","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.17.1_1786417213299_0.9784479174964511","host":"s3://npm-registry-packages-npm-production"}},"0.18.0":{"name":"agent-lattice","version":"0.18.0","_id":"agent-lattice@0.18.0","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"e68f49e589ff4dc54f85f2eb8649dae6f2fa906f","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.18.0.tgz","fileCount":4,"integrity":"sha512-ufcVxNggcU+TDAoFrd2hSUyqwdv8jwAHpQvnktJCyE+zf3BXxzmy+NLP4poZQMk+4gTkf4fjeYQfsaf23QR0xg==","signatures":[{"sig":"MEUCICVDBfiKbWztFUD266mkm3PY1WGd8x7KZBfEe/8MhHRrAiEAqlNR8ljwE++aLlasRnxGxzUAmMNuI3TAQhHkfz8uzvY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1799914},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"80b1d55d75ab8facd8510939e519bcfa867b487b","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.18.0_1786522846001_0.012244631426208796","host":"s3://npm-registry-packages-npm-production"}},"0.19.0":{"name":"agent-lattice","version":"0.19.0","_id":"agent-lattice@0.19.0","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"63a65875b09fbf62e065778690ca82ce4931df2a","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.19.0.tgz","fileCount":4,"integrity":"sha512-JEoBO0MyeJhUTlkYQeBzKTr1tVdB0vIcOQGYax0VHt5c0ma+99tdTckzkNsw6reBahaAKkTH4EFPucRulwKoTw==","signatures":[{"sig":"MEYCIQDuzHYOrxBwmjNO4H48T2n1BI12LzyhJZpCVuSA4yQ1bgIhAM9G7jK2yh7wuQUrnGRUx6AQ4u2OI3GCNcOmez9fVhoh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1915228},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"c82310fb597452304e01c647aa5e7a1ab9bdfaab","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@langfuse/tracing":"5.10.0","@opentelemetry/api":"1.9.1","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.19.0_1786536861962_0.6168392334036863","host":"s3://npm-registry-packages-npm-production"}},"0.20.0":{"name":"agent-lattice","version":"0.20.0","_id":"agent-lattice@0.20.0","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"c31a58687ebd3604802410aa3ebd77d17d3f0332","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.20.0.tgz","fileCount":4,"integrity":"sha512-8gCBfa3IeC8PYJ4tDlOWvKArOa4WigdlK5aC76wvfW2wVbz9f2CdpcdBfbzqUzRI27+bnRe8raezHlRU3+kxHA==","signatures":[{"sig":"MEQCIGC5rtcN15B8FVxCWQCjQJuJibNQDIRJaoJz3Eyl3eq7AiBkw+rbJ0oGZZwI0H7HKrbgS4drfA1PNs0IuXhq8tynfw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1926087},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"6671507ac673849f798f3d2c1a7f899eff58c596","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@langfuse/tracing":"5.10.0","@opentelemetry/api":"1.9.1","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.20.0_1787131840931_0.9246455732573264","host":"s3://npm-registry-packages-npm-production"}},"0.21.0":{"name":"agent-lattice","version":"0.21.0","_id":"agent-lattice@0.21.0","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"dcef51f1aa7887b3808f99a5e1ad7cb9dce58a32","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.21.0.tgz","fileCount":4,"integrity":"sha512-pmJyggL1qsjg2NvmOasizldQu6uMlAoaYnaiX/1MFgCvmSJeGycX+hlTj2gn5qQVvfLp8SDd1LsXgtZYgD4Z+g==","signatures":[{"sig":"MEYCIQCswVKRSnUcPV+Ellm7zhojvQsYJbGI80Aagdem5q+32AIhAJt3RUkdFcvQx8SOcvqH/xaqRQxRsu6j1Fyc+x2oAcjw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1933384},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"b5796460bbc78feae45a7184e99c4025327026a5","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@langfuse/tracing":"5.10.0","@opentelemetry/api":"1.9.1","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.21.0_1787133257919_0.7139921814382248","host":"s3://npm-registry-packages-npm-production"}},"0.22.0":{"name":"agent-lattice","version":"0.22.0","_id":"agent-lattice@0.22.0","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"815f813ca6e734d68a731008ed999f5ec0ff9f70","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.22.0.tgz","fileCount":4,"integrity":"sha512-BLdVyvarzEg6zTNxInPaByEVdBfMHnOPKa5tccgSl3Oqa+JagBnFWjDqeX/mYNtBoF495Qlpm6hH9PyLXkP65Q==","signatures":[{"sig":"MEQCIEpLw7/G3G2fvUBo+3BMnGii9lWi9YsxML/YtG0L7CH3AiBGeqtlMEjibCi+Ac7lt5NPEjmaMO7NpIFCGFPUeIdXHw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1936184},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f1e241bea22e8d046417ec027d6d0d8159e0a56f","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@langfuse/tracing":"5.10.0","@opentelemetry/api":"1.9.1","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.22.0_1787135667167_0.7700203304522335","host":"s3://npm-registry-packages-npm-production"}},"0.23.0":{"name":"agent-lattice","version":"0.23.0","_id":"agent-lattice@0.23.0","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"30d10478e83a6006fd2a3137767a64f5f22eef81","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.23.0.tgz","fileCount":4,"integrity":"sha512-M5BxvPl7HEh+58yeSjHpnufX7+bI6l0AQqF/MTF9eyL6rwadUduXvDh+M4Kb543wnMXtkomsRqLiQ5F6+1MYaw==","signatures":[{"sig":"MEYCIQDwHPz+sU465GUIMqkeQQzebqd3LMF6LvqiyJuQUpO7EAIhAMYj2Oybcp45vZzRA46hcuQ82IHlhwnWXNE8KJcZO4Zy","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1937715},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"ffca7d45c4f3188e9c17e735a13774875a829ee1","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@langfuse/tracing":"5.10.0","@opentelemetry/api":"1.9.1","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.23.0_1787152076833_0.6886813075321512","host":"s3://npm-registry-packages-npm-production"}},"0.24.0":{"name":"agent-lattice","version":"0.24.0","_id":"agent-lattice@0.24.0","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"b6a00a624e8f5203921d49a463e0ac4802bd0555","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.24.0.tgz","fileCount":4,"integrity":"sha512-8TNLUwkk//6h/v+x0uJ14BP//WKEfLjHpwfMLJm6mO+G0JuImI8g6TF/uJUpdQ/IHknUjnYAv4z0ioEd72w8Hw==","signatures":[{"sig":"MEYCIQD7Ru/9IJ5LDmlr23UXlxfkD5YxCrPFeL/lzsmO7y3RLQIhAPpQU54XsivCeISa7PGw6hMSx5Fj3Dv7RRunxwygFOmF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1943978},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"4eb9e182b7ae6ad746661d19888cb184182257b1","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@langfuse/tracing":"5.10.0","@opentelemetry/api":"1.9.1","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.24.0_1788320775705_0.6947272821588502","host":"s3://npm-registry-packages-npm-production"}},"0.25.0":{"name":"agent-lattice","version":"0.25.0","_id":"agent-lattice@0.25.0","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"8287b92bc4b13e2310a91421a3e9d18532f558c2","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.25.0.tgz","fileCount":4,"integrity":"sha512-SQ4xlJpBY30cXjutASNoJtZ37PMnh3W5QEtEU0gBxNN5rHGvdOcpqAzpDEYBTEJFCwCm1MlTc/xJe5zMELAfTg==","signatures":[{"sig":"MEQCIGLXWImWhHM76PZ1fbKDN56cTErsbFOS9zW6QY5RvEjUAiAS1jF2RZaXQSNIZm6qwXLQP6dEkMv3GsHHq4BnW1Hq0A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1947814},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"5ad171649dea9c31eae0bbb2db3744a551815cec","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@langfuse/tracing":"5.10.0","@opentelemetry/api":"1.9.1","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.25.0_1788351525628_0.0025740977590746894","host":"s3://npm-registry-packages-npm-production"}},"0.25.1":{"name":"agent-lattice","version":"0.25.1","_id":"agent-lattice@0.25.1","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"dist":{"shasum":"9a925cebadadbea53c64c69caff3d04e66facf4f","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.25.1.tgz","fileCount":4,"integrity":"sha512-E8Axn0q4iIt8jnB64msX8GQDXnCBtZfEO/DJ4ReGr79DrQl35ZoN1zkd2n5Z8wvrEkaGR0Lp+pOf8g4qNCfcBg==","signatures":[{"sig":"MEQCIECbnCQcT/8CSavfcSQ0FpDjT719FmvzXJY8Hf/DmYXHAiBmzsmFD3GuqJRfDMBAHqCV0izF3UjKT59bBi5CgyeTFw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCJDlbxm51aAobTzucZQdv19P3IXXuFK1gHem1E+E0oRQIhANPkeBlgs/aEQwQsUwxSJ+/+6NnS30yIHvWsShtTXShH","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1949509},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"656ebea52596d96cb77409e5b9e1352e6cabaa29","scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@langfuse/tracing":"5.10.0","@opentelemetry/api":"1.9.1","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-lattice_0.25.1_1789523421861_0.10554309254709349","host":"s3://npm-registry-packages-npm-production"}},"0.26.0":{"_id":"agent-lattice@0.26.0","dist":{"shasum":"de2f67194a3144dbd556329db63d7904223a01b7","tarball":"https://registry.npmjs.org/agent-lattice/-/agent-lattice-0.26.0.tgz","fileCount":4,"integrity":"sha512-qsrJPgbeZaxKRvgpqre6PHxSSWX0JMOEVjEUCTXVQEzg1e6ZozTcQktcQFSHwoj6WGNqiBOzv1nflfWyCxVLaw==","signatures":[{"sig":"MEYCIQDXiSaB3a5hEklEXc3GS/TEFLMdhcfsEVz8STkqhQ054AIhANq8m2U8FhaqqJQ9oz+bmK5oLXnxsOTi7DqYyETfOvoE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICNKRSeY4+Y9UJcqfnZkO8e3DkF5LR/SRU6iet27DMOuAiEAqRr/ScgWlijALqtSb2svFI/fdQEgZ+iz3ti8tH+4z9I="}],"unpackedSize":1954793},"main":"./dist/index.js","name":"agent-lattice","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"bun test ./src/__tests__","build":"node ./scripts/build.mjs","docs:deploy":"cd ../docs && bun run deploy","pack:dry-run":"bun run build && npm pack --dry-run","prepublishOnly":"bun run build","test:integration:deepseek":"DEEPSEEK_MODEL=${DEEPSEEK_MODEL:-deepseek-v4-flash} bun test ./src/__tests__/integration.test.ts"},"version":"0.26.0","_npmUser":{"name":"npm-while1","email":"1074676408@qq.com"},"_npmVersion":"10.9.2","description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","directories":{},"maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"_nodeVersion":"23.11.0","dependencies":{"zod":"^4.3.6","langsmith":"0.7.14","@anthropic-ai/sdk":"^0.80.0","@langfuse/tracing":"5.10.0","@opentelemetry/api":"1.9.1","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^6.0.2","javascript-obfuscator":"^5.4.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-lattice_0.26.0_1790747102864_0.8006083278785159"}}},"time":{"created":"2026-07-07T11:53:24.578Z","modified":"2026-09-30T05:45:03.143Z","0.9.11":"2026-07-06T06:14:00.409Z","0.9.12":"2026-07-07T11:53:25.126Z","0.9.13":"2026-07-08T08:27:10.621Z","0.9.14":"2026-07-09T01:18:48.124Z","0.9.15":"2026-07-09T08:17:52.264Z","0.9.16":"2026-07-09T08:36:06.129Z","0.9.17":"2026-07-09T08:51:02.612Z","0.9.18":"2026-07-09T09:01:58.438Z","0.9.19":"2026-07-09T09:53:55.229Z","0.9.20":"2026-07-11T13:25:20.181Z","0.9.21":"2026-07-12T00:08:40.173Z","0.9.23":"2026-07-12T07:09:48.786Z","0.9.24":"2026-07-12T08:00:44.438Z","0.9.25":"2026-07-14T03:55:27.146Z","0.12.0":"2026-07-26T09:50:16.268Z","0.14.0":"2026-07-26T13:16:14.662Z","0.15.0":"2026-08-06T08:22:04.326Z","0.16.0":"2026-08-08T10:42:21.040Z","0.17.0":"2026-08-08T16:32:47.648Z","0.17.1":"2026-08-11T03:00:13.479Z","0.18.0":"2026-08-12T08:20:46.174Z","0.19.0":"2026-08-12T12:14:22.154Z","0.20.0":"2026-08-19T09:30:41.099Z","0.21.0":"2026-08-19T09:54:18.095Z","0.22.0":"2026-08-19T10:34:27.382Z","0.23.0":"2026-08-19T15:07:56.995Z","0.24.0":"2026-09-02T03:46:15.859Z","0.25.0":"2026-09-02T12:18:45.801Z","0.25.1":"2026-09-16T01:50:21.975Z","0.26.0":"2026-09-30T05:45:02.960Z"},"description":"AgentLattice framework for coordinated agent systems with tools, tracing, and teams","maintainers":[{"name":"npm-while1","email":"1074676408@qq.com"}],"readme":"# AgentLattice\n\nAgentLattice is a TypeScript framework for building coordinated agent systems\nwith tools, skills, tracing, supervisor delegation, and mailbox-backed teams.\n\nInstall it from npm as `agent-lattice`. It works with Anthropic and\nAnthropic-compatible providers such as DeepSeek, without installing the Claude\nCode CLI runtime.\n\n> **Integrating this SDK from an AI agent?** Start at\n> <https://docs.claude-code-sdk.com/llms.txt> for an index of the documentation,\n> where every page is served as clean Markdown. Read\n> <https://docs.claude-code-sdk.com/llms-full.txt> to take it all in one request.\n\n## Install\n\n```bash\nnpm install agent-lattice zod\n```\n\n## Minimal Usage\n\nThe examples use DeepSeek's Anthropic-compatible endpoint.\n\n```ts\nimport { createAgent } from \"agent-lattice\";\n\nconst agent = createAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n});\n\nfor await (const message of agent.query(\"Say hello\")) {\n  console.log(message);\n}\n```\n\n`createAgent()` includes a private workspace and the built-in file/shell tools\nby default. Use `createBareAgent()` when your host wants to provide every prompt\nand tool explicitly:\n\n```ts\nimport { createBareAgent, createBuiltinTools } from \"agent-lattice\";\n\nconst agent = createBareAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n  systemPrompt: \"You are a concise engineering assistant.\",\n  tools: createBuiltinTools({\n    cwd: process.cwd(),\n    allowedDirectories: [process.cwd()],\n  }),\n});\n```\n\n`Agent` is a type-only export — instances come from these factories (or\n`AgentSpec.spawn()`), never from `new Agent()`, because the factories also\ngenerate the session id and install the workspace. (Breaking in 0.17.0: the\n`Agent` class constructor is no longer exported.)\n\n`agent.query()` yields `stream_event` messages while the model is still\nresponding, so a host can render output incrementally:\n\n```ts\nfor await (const message of agent.query(\"Say hello\")) {\n  if (message.type === \"stream_event\") {\n    const event = message.event as { type: string; delta?: { text?: string } };\n    if (event.type === \"content_block_delta\" && event.delta?.text) {\n      process.stdout.write(event.delta.text);\n    }\n  }\n}\n```\n\nThe SDK produces the next event only after the loop takes the current one.\nSlow work in the loop body delays later events without dropping or reordering\nthem, so keep expensive handling off the loop itself.\n\n`query()` yields these SDK messages:\n\n| Type | When | What it carries |\n| --- | --- | --- |\n| `system` | Query start | Session init metadata (model, tools, `session_id`). |\n| `stream_event` | While the model is responding | Raw provider stream event for incremental rendering. |\n| `assistant` | After each model turn is assembled | The `AssistantModelMessage` with text / `tool_use` blocks and provider metadata. |\n| `user` | After a whole tool batch finishes | Tool results as `ToolResultBlock[]`; the prompt is never echoed. |\n| `result` | Once, at the end of the query | Final text, `subtype` (`\"success\"`, `\"interrupted\"`, or an error variant), optional `structuredResult`, and token usage. |\n\nFor the exact per-event guarantees see\n[Streaming Events](https://docs.claude-code-sdk.com/concepts/streaming-events/).\n\nPass `{ stream: false }` to disable model streaming for a query:\n\n```ts\nconst result = await agent.prompt(\"Say hello\", { stream: false });\n```\n\nPass `outputFormat` when you want the model to produce JSON matching a schema:\n\n```ts\nconst jsonResult = await agent.prompt(\"Return JSON only.\", {\n  outputFormat: \"json\",\n});\n\nconst result = await agent.prompt(\"Return the answer to 2 + 2.\", {\n  outputFormat: {\n    type: \"json_schema\",\n    schema: {\n      type: \"object\",\n      properties: {\n        answer: { type: \"number\" },\n      },\n      required: [\"answer\"],\n      additionalProperties: false,\n    },\n  },\n});\n```\n\nWhen `outputFormat` is set, the SDK sends structured output parameters to the\nprovider and returns the final text unchanged. Parse or validate the returned\nJSON in your application when you need a typed value.\n\nPass `thinkingConfig` on the agent to configure reasoning for every query, or\non an individual query to override the agent default:\n\n```ts\nconst agent = createAgent({\n  apiKey: process.env.ANTHROPIC_API_KEY,\n  model: \"claude-sonnet-4-6\",\n  thinkingConfig: { type: \"adaptive\" },\n});\n\nconst result = await agent.prompt(\"Solve this carefully.\", {\n  thinkingConfig: { type: \"enabled\", budgetTokens: 8_000 },\n});\n```\n\nUse `{ type: \"adaptive\" }` for models that support adaptive thinking. Use\n`{ type: \"enabled\", budgetTokens }` for models that require a fixed budget, or\n`{ type: \"disabled\" }` to turn thinking off. A fixed\nbudget is capped at `maxTokens - 1` to satisfy the Anthropic API constraint.\nWhen omitted, the SDK does not send a thinking configuration.\n\n`{ type: \"disabled\" }` is sent to the provider explicitly as\n`thinking: { \"type\": \"disabled\" }` rather than omitted, because some\nAnthropic-compatible providers (for example DeepSeek's\n`https://api.deepseek.com/anthropic` endpoint) default thinking to on —\nomitting the field would leave it enabled.\n\nOn DeepSeek, the on/off switch is the only thinking control that works:\nDeepSeek accepts `budget_tokens` but ignores the value, treats `adaptive` as\nplain enabled thinking, and does not support `reasoning_effort` at all. Its own\nthinking-strength knob is `output_config.effort`, which the SDK does not expose\nyet. See\n[Provider Compatibility](https://docs.claude-code-sdk.com/reference/provider-compatibility/)\nfor the full matrix.\n\nFor Kimi K3 through an Anthropic-compatible endpoint or gateway, use\n`reasoningEffort` to send the provider's top-level `reasoning_effort` parameter:\n\n```ts\nconst agent = createAgent({\n  apiKey: process.env.MOONSHOT_API_KEY,\n  baseURL: process.env.KIMI_ANTHROPIC_BASE_URL,\n  model: \"kimi-k3\",\n  reasoningEffort: \"high\",\n});\n\nconst result = await agent.prompt(\"Solve this carefully.\", {\n  reasoningEffort: \"low\",\n});\n```\n\nThe supported values are `\"low\"`, `\"high\"`, and `\"max\"`. A query-level value\noverrides the agent default. When omitted, the SDK does not send\n`reasoning_effort`, so the provider applies its own default (`\"max\"` for Kimi\nK3). Kimi K3 does not accept `thinkingConfig`; use `reasoningEffort` instead.\nThe Kimi Open Platform endpoint at `https://api.moonshot.cn/v1` uses the OpenAI\nChat Completions protocol and is not a valid `baseURL` for the SDK's built-in\nAnthropic client.\n\n## Multimodal Input\n\nPass Anthropic-compatible content blocks for image or document prompts:\n\n```ts\nconst result = await agent.prompt([\n  { type: \"text\", text: \"Summarize this screenshot.\" },\n  {\n    type: \"image\",\n    source: {\n      type: \"base64\",\n      media_type: \"image/png\",\n      data: imageBase64,\n    },\n  },\n]);\n\nconsole.log(result.result);\n```\n\n## JSONL Context Tracing\n\nPass a `ContextTracer` to observe an agent run without changing the agent loop.\nThe built-in JSONL tracer writes one structured event per line:\n\n```ts\nimport { createAgent, createJsonlContextTracer } from \"agent-lattice\";\n\nconst tracer = createJsonlContextTracer({\n  path: \".agent-runs/session.jsonl\",\n});\n\nconst agent = createAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n  tracer,\n});\n\nawait agent.prompt(\"Remember that my name is Ada.\");\n```\n\nEach JSONL entry includes `session_id`, `run_id`, `seq`, `source`, `type`, and\n`data`. Agent runs record transcript and context events such as `run_start`,\n`user_message`, `model_request`, `assistant_message`, `tool_use`,\n`tool_result`, and `result`. When the model client reports token usage,\n`assistant_message` events carry it as `data.message.usage`, and the `result`\nevent carries the query's summed usage as `data.usage` (since 0.23.1). For\nteam runners, pass the tracer per query to propagate it into delegated agents:\n\n```ts\nfor await (const event of team.query(\"Ask engineering to investigate.\", {\n  tracer,\n})) {\n  console.log(event);\n}\n```\n\n## LangSmith Context Tracing\n\nThe SDK depends on `langsmith` directly and uses its official `RunTree` /\n`RunTreeConfig` types for this adapter, so the tracer works out of the box —\nno constructor wiring needed.\n\nConfigure LangSmith with its standard environment variables:\n\n```bash\nLANGSMITH_TRACING=true\nLANGSMITH_ENDPOINT=https://api.smith.langchain.com\nLANGSMITH_API_KEY=<your-langsmith-api-key>\nLANGSMITH_PROJECT=<your-langsmith-project>\n# Required only for org-scoped or multi-workspace API keys.\nLANGSMITH_WORKSPACE_ID=<your-langsmith-workspace-id>\n```\n\n```ts\nimport {\n  createAgent,\n  createCompositeContextTracer,\n  createJsonlContextTracer,\n  createLangSmithContextTracer,\n} from \"agent-lattice\";\n\nconst tracer = createCompositeContextTracer([\n  createJsonlContextTracer({ path: \".agent-runs/session.jsonl\" }),\n  createLangSmithContextTracer({\n    projectName: process.env.LANGSMITH_PROJECT,\n    workspaceId: process.env.LANGSMITH_WORKSPACE_ID,\n    tags: [\"local-debug\"],\n  }),\n]);\n\nconst agent = createAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n  tracer,\n});\n\ntry {\n  await agent.prompt(\"Trace this run.\", { stream: false });\n} finally {\n  await tracer.close?.();\n}\n```\n\nClose or flush the LangSmith tracer before a short-lived test process exits so\nLangSmith receives the final root run patch.\n\nIf you prefer explicit values over environment variables, pass them to the SDK\ntracer. `workspaceId` is optional and only selects a LangSmith workspace; it is\nnot the tracing project name.\n\n```ts\nimport { createLangSmithContextTracer } from \"agent-lattice\";\n\nconst tracer = createLangSmithContextTracer({\n  apiKey: process.env.LANGSMITH_API_KEY,\n  apiUrl: process.env.LANGSMITH_ENDPOINT,\n  projectName: process.env.LANGSMITH_PROJECT,\n  // Optional: only when LangSmith requires an explicit workspace.\n  workspaceId: process.env.LANGSMITH_WORKSPACE_ID,\n});\n```\n\n`RunTree` defaults to the bundled langsmith constructor since 0.17.0; pass\n`RunTree` or `runTree` only to inject a custom runtime or a test fake.\n\nLangSmith receives one root `chain` run per SDK query. For an `Agent` query,\nmodel turns and SDK tool calls appear as child `llm` and `tool` runs. For a\n`Team` query, the root represents the complete Team invocation; the initial\nLead run, delegated Member runs, and later Lead runs all appear beneath that\nroot and share one trace session. Each Agent keeps its own SDK session identity,\nrecorded as `agent_session_id` metadata, so tracing does not change Agent state\nor returned SDK messages.\n\nWhen the model client reports token usage, each `llm` run ends with\n`usage_metadata` in its outputs (`input_tokens`, `output_tokens`,\n`total_tokens`, plus cache buckets under `input_token_details`), so LangSmith\nshows token consumption and inferred cost per model turn. Anthropic cache\ntokens are additive, so they are summed into `input_tokens` the same way\nLangSmith's own Anthropic wrapper does. *Requires 0.23.1 or later.*\n\n## Langfuse Context Tracing\n\n*Requires 0.19.0 or later.*\n\nThe Langfuse adapter targets the current Langfuse JS SDK generation\n(`@langfuse/tracing` v5), which is OpenTelemetry-based. Register the\n`LangfuseSpanProcessor` once at process startup, then create the tracer —\nno other wiring needed.\n\nConfigure Langfuse with its standard environment variables:\n\n```bash\nLANGFUSE_PUBLIC_KEY=<your-langfuse-public-key>\nLANGFUSE_SECRET_KEY=<your-langfuse-secret-key>\nLANGFUSE_BASE_URL=https://us.cloud.langfuse.com # or your self-hosted host\n```\n\n```bash\nnpm install @langfuse/otel @opentelemetry/sdk-trace-node\n```\n\n```ts\n// instrumentation: register the span processor before agents run.\nimport { LangfuseSpanProcessor } from \"@langfuse/otel\";\nimport { NodeTracerProvider } from \"@opentelemetry/sdk-trace-node\";\n\nexport const langfuseSpanProcessor = new LangfuseSpanProcessor();\n\nconst tracerProvider = new NodeTracerProvider({\n  spanProcessors: [langfuseSpanProcessor],\n});\ntracerProvider.register();\n```\n\n```ts\nimport {\n  createAgent,\n  createCompositeContextTracer,\n  createJsonlContextTracer,\n  createLangfuseContextTracer,\n} from \"agent-lattice\";\nimport { langfuseSpanProcessor } from \"./instrumentation\";\n\nconst tracer = createCompositeContextTracer([\n  createJsonlContextTracer({ path: \".agent-runs/session.jsonl\" }),\n  createLangfuseContextTracer({\n    // Drained by tracer.flush()/close() so spans reach Langfuse before a\n    // short-lived process exits.\n    spanProcessor: langfuseSpanProcessor,\n    tags: [\"local-debug\"],\n  }),\n]);\n\nconst agent = createAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n  tracer,\n});\n\ntry {\n  await agent.prompt(\"Trace this run.\", { stream: false });\n} finally {\n  await tracer.close?.();\n}\n```\n\nLangfuse receives one trace per SDK query: the agent run is a root `chain`\nobservation carrying the trace name, session id, and tags; model turns appear\nas child `generation` observations and SDK tool calls as child `tool`\nobservations. For a `Team` query, delegated runs nest as child `chain`\nobservations under the team root, so one handoff invocation stays one trace.\n\nWhen the model client reports token usage, each `generation` observation ends\nwith `usageDetails` (`input`, `output`, `cache_creation_input_tokens`,\n`cache_read_input_tokens`, `total`), so Langfuse shows token consumption and\ninferred cost per model turn. Anthropic `input_tokens` already excludes cache\ntokens, matching Langfuse's mutually-exclusive usage buckets. *Requires 0.23.1\nor later.*\n\n`startObservation` defaults to the bundled `@langfuse/tracing` function; pass\n`startObservation` only to inject a custom runtime or a test fake.\n\nCustom sinks can implement the same interface for SQLite, OpenTelemetry, object\nstorage, or host-specific observability. A `ContextTracer` port object exposes\nmethods only — `failOnError` is bound when the factory creates the tracer, not\nset as a field afterwards. Implement a custom sink with `defineContextTracer()`.\n*Requires 0.17.0 or later.* (Breaking in 0.17.0: the public `failOnError` field\nwas removed from `ContextTracer`; custom tracers created before 0.17.0 must go\nthrough `defineContextTracer()`.)\n\n```ts\nimport { defineContextTracer } from \"agent-lattice\";\n\nconst tracer = defineContextTracer({\n  async onEvent(event) {\n    // TODO: Replace with your own storage/logging code.\n  },\n});\n```\n\n## DeepSeek Anthropic-compatible API\n\nDeepSeek exposes an Anthropic-compatible endpoint. Configure `baseURL` and use a\nDeepSeek model name:\n\n```ts\nconst agent = createAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n});\n```\n\nPass an explicit `deepseek-*` model name — unknown names are silently mapped to\n`deepseek-v4-flash`. For which SDK options DeepSeek actually honors (thinking\nbudgets are ignored; `reasoningEffort` does not apply; structured output is not\nsupported), see\n[Provider Compatibility](https://docs.claude-code-sdk.com/reference/provider-compatibility/).\n\n## Custom Tool\n\n```ts\nimport { createAgent, tool } from \"agent-lattice\";\nimport { z } from \"zod/v4\";\n\nconst agent = createAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n  tools: [\n    tool(\n      \"calculator\",\n      \"Evaluate a simple arithmetic expression\",\n      z.object({ expr: z.string() }),\n      async input => ({ content: String(Function(`return ${input.expr}`)()) }),\n    ),\n  ],\n});\n\nconst result = await agent.prompt(\"What is 2+2?\");\nconsole.log(result.result);\n```\n\n## End The Run From A Tool\n\n*Requires 0.16.0 or later.*\n\nA tool that has the final answer can end the run itself by returning\n`endTurn: true`. The SDK finishes with `subtype: \"success\"` and uses that\ntool's text content as the result, without calling the model again:\n\n```ts\nconst finish = tool(\n  \"finish\",\n  \"Submit the final answer and end the run\",\n  z.object({ answer: z.string() }),\n  async ({ answer }) => ({ content: answer, endTurn: true }),\n);\n```\n\n`endTurn` does not cancel the other tools of the same batch — they already\nstarted concurrently, their `tool_result` blocks still enter the history, and\n`onToolResult` hooks and trace events run for them as usual. Only the next\nmodel call is skipped. When several tools in a batch set `endTurn`, the first\none's content becomes the result text.\n\nA tool can also return `structuredResult` next to `endTurn: true` to carry a\nstructured payload to `SDKResultMessage.structuredResult`\n(*requires 0.20.0 or later*). Without `endTurn`, `structuredResult` is\nignored.\n\n## Structured Output Via submit_output\n\n*Requires 0.20.0 or later.*\n\nSet `AgentOptions.outputSchema` when a run must deliver a typed result rather\nthan free text. The SDK injects a built-in `submit_output` tool (exported as\n`SUBMIT_OUTPUT_TOOL_NAME`) whose input schema is your schema converted to JSON\nSchema — a zod schema works directly, since `OutputSchema<T>` is just\n`{ parse(input: unknown): T }`:\n\n```ts\nimport { createAgent } from \"agent-lattice\";\nimport { z } from \"zod/v4\";\n\nconst reviewSchema = z.object({\n  approved: z.boolean(),\n  issues: z.array(z.string()),\n});\n\nconst reviewer = createAgent({\n  model: \"claude-sonnet-4-6\",\n  systemPrompt: \"Review the change and submit your verdict.\",\n  outputSchema: reviewSchema,\n});\n\nconst result = await reviewer.prompt(\"Review the patch in this workspace.\");\nif (result.subtype === \"success\") {\n  console.log(result.structuredResult); // { approved: false, issues: [...] }\n}\n```\n\nThe structure is enforced by the harness, not by prompt discipline:\n\n- The model submits its answer by calling `submit_output`. The payload is\n  validated against the schema first; a validation failure goes back into the\n  loop as an error `tool_result`, so the model can fix it and retry. A valid\n  submission ends the run with `subtype: \"success\"` and the payload on\n  `SDKResultMessage.structuredResult`.\n- If the model ends its turn without calling `submit_output`, the run fails\n  with `subtype: \"error_missing_output\"` and a `MissingOutputError`. There is\n  no fallback that parses the final text as JSON.\n- `submit_output` must be the only tool call in its batch. A batch that mixes\n  it with other calls — or contains two submissions — is rejected with code\n  `submit_output_exclusive_batch` and the loop continues.\n- The name is reserved: registering your own `submit_output` tool while\n  `outputSchema` is set throws from `createAgent`/`addTools`.\n\nBy default a valid submission ends the run immediately — the bounded, cheapest\nbehavior for schema-delivering workers. For human-facing sessions that should\nclose with a natural-language summary, set `submitOutputEndTurn: false`: the\nsubmission is recorded (re-submitting revises it, last one wins), the tool\nresult goes back to the model, and the run ends when the model stops. A text\nending after a submission succeeds with the last submission as\n`structuredResult`; ending without any submission still fails with\n`error_missing_output`. *Requires 0.25.0 or later.*\n\nUnlike `outputFormat` (which relies on the provider's\n`response_format`/`json_schema` support — DeepSeek ignores it, see\n[Provider Compatibility](https://docs.claude-code-sdk.com/reference/provider-compatibility/)),\n`submit_output` only requires a model that can call tools, so it ports to any\ntool-capable provider.\n\nThe same schema composes with `agentTool()` for parent/child delegation: give\nit to the child agent, and an `ask` call returns the child's validated output\nas a JSON string. Since 0.21.0 the parent side inherits the child's declared\nschema, so the `agentTool()` copy can be omitted. Passing\n`AgentToolOptions.outputSchema` explicitly is still allowed, but it must match\nthe target's declaration (compared by reference, then by derived JSON Schema\nstructure) — a mismatch throws at assembly time, so drift fails fast instead\nof at call time. The error message suggests sharing one schema instance or\nomitting the `agentTool()` copy:\n\n```ts\nimport { agentTool, createAgent } from \"agent-lattice\";\n\nconst child = createAgent({\n  model: \"claude-sonnet-4-5\",\n  systemPrompt: \"You review code and submit a structured verdict.\",\n  outputSchema: reviewSchema, // child submits via submit_output\n});\n\nconst parent = createAgent({\n  model: \"claude-sonnet-4-6\",\n  tools: [\n    agentTool(\"review\", child, {\n      description: \"Ask the reviewer to audit a change.\",\n      // outputSchema is inherited from the child (0.21.0+); an explicit copy\n      // must match the child's declaration or agentTool() throws.\n    }),\n  ],\n});\n```\n\nIf the child ends without submitting or submits a payload that fails the\nschema, the tool returns an `is_error` `tool_result` starting with\n`child_output_invalid:`, so the parent model sees the failure and can retry.\n\n*Behavior change in 0.21.0:* where the child declares an `outputSchema` and\nthe parent does not, the `ask` tool result changed from the fixed text\n`\"Structured output submitted.\"` to the validated JSON. That is the intended\nfix and ships in a minor under 0.x. Host-defined `AgentLike` adapters carry no\nreadable declaration, so nothing is inherited or cross-checked for them; an\nexplicit `outputSchema` still applies. Whenever a schema is in effect, the\ngenerated tool description states that the tool returns the target's\nvalidated structured output as JSON.\n\nTwo more contract combinations are pinned down since 0.23.0:\n\n- **Target declares no `outputSchema`, `agentTool()` declares one\n  explicitly.** Assembly allows it (nothing to cross-check against), and an\n  `ask` call validates the child's `structuredResult` against the parent-side\n  schema and returns it as JSON. This fits children that end through a custom\n  `endTurn` + `structuredResult` tool performing domain validation beyond the\n  schema (for example reference truthfulness), with the contract declared by\n  the parent alone.\n- **Neither side declares a schema.** When the child ends with a\n  `structuredResult`, the `ask` tool result is its JSON as-is (unvalidated)\n  instead of falling back to the text content and dropping it. The trust\n  level is the same as the text result; the schema's job is validation only,\n  not gating the structured channel. This applies on both the direct path and\n  the team runtime delegate path.\n\n*Behavior change in 0.23.0:* existing code where the child ends with\n`endTurn` + `structuredResult` and the parent declares no schema now receives\nthe structured JSON from `ask` instead of the text content.\n\n### Typed delegation\n\n*Requires 0.21.0 or later.*\n\n`AgentToolOptions.inputSchema` replaces the default `{mode, task,\nexpectedOutput, acceptanceCriteria, workspaceGrants}` input shape with your\nown schema (a zod schema works directly), and `mapInput` projects the\nvalidated input into the child prompt:\n\n```ts\nconst judge = createAgent({\n  model: \"claude-sonnet-4-5\",\n  systemPrompt: \"You judge a case and submit a structured verdict.\",\n  outputSchema: verdictSchema,\n});\n\nconst judgeTool = agentTool(\"judge\", judge, {\n  description: \"Judge a case from its summary and documents.\",\n  inputSchema: z.object({\n    caseSummary: z.string(),\n    documents: z.array(z.object({ title: z.string(), content: z.string() })),\n  }),\n  mapInput: input => renderJudgeTask(input.caseSummary, input.documents),\n});\n```\n\n- The parent's arguments are parsed against `inputSchema` before anything\n  runs; invalid input is rejected as an error `tool_result` in the parent's\n  loop — the same semantics as a plain `tool()` call — and the child is never\n  invoked.\n- `inputSchema` and `mapInput` must come as a pair: `agentTool()` throws at\n  assembly time when one is missing.\n- Typed delegation is ask-only: there is no `mode` field and no\n  `workspaceGrants`.\n- `mapInput` may return a string or `ContentBlock[]`; `ContentBlock[]` is only\n  supported for direct `ask` calls — inside a team runtime the projected\n  prompt must be a string, or the call fails at runtime.\n- Because typed input no longer matches `AgentToolInput`, `agentTool()` now\n  returns `ToolDefinition<any>`.\n\n## Concurrent Tool Calls\n\nThe model requests concurrency by returning multiple `tool_use` blocks in one\nassistant message. The SDK makes the final safety decision. By default, only\ntools whose parsed input passes `isConcurrencySafe(input)` run together:\n\n```ts\nconst search = tool(\n  \"search\",\n  \"Search documents\",\n  z.object({ query: z.string() }),\n  async ({ query }) => {\n    // App code: replace with your database or search client.\n    return { content: await documentIndex.search(query) };\n  },\n  { isConcurrencySafe: () => true },\n);\n\nconst agent = createAgent({\n  model: \"claude-sonnet-4-6\",\n  tools: [search],\n  toolConcurrency: { mode: \"safe\", maxConcurrency: 8 },\n});\n```\n\n`safe` is the default mode, `maxConcurrency` defaults to `10`, and tools without\nan `isConcurrencySafe` declaration stay sequential. Use `mode: \"all\"` only when\nevery tool in the Agent is safe to overlap. Use `mode: \"sequential\"` to disable\ntool concurrency even for tools marked safe.\n\n`agentTool()` accepts the same declaration as `AgentToolOptions.isConcurrencySafe`,\nso a supervisor can fan out independent delegations in one turn. The input the\npredicate receives is the tool's parsed input — the `inputSchema`-validated\nvalue for typed delegation, the `AgentToolInput` shape otherwise. Keep in mind\nthe target's lifecycle: an `AgentSpec` spawns a fresh session per call, while an\n`AgentLike` target keeps history across calls and is usually not safe to call\nconcurrently. *Requires 0.24.0 or later.*\n\nFor durable child sessions, `AgentToolOptions.prepareTarget` runs after the\nchild's input has been validated and mapped to a task, before the child starts.\nIt receives the target, task, tool-use ID, parent run ID, trace session ID, and\nabort signal; return the `AgentLike` to call. A host can spawn the supplied\n`AgentSpec` with a per-call `HistoryStore` and return an adapter that records\nits event stream. Without the hook, a spec still spawns a fresh session as\nbefore. Direct `ask` child trace events share the parent's trace session and\ncarry both `parent_run_id` and `parent_tool_use_id`, so concurrent calls to the\nsame child can be distinguished. The host owns cleanup if preparing a child\nfails. *Requires 0.26.0 or later.*\n\nWhen concurrency is available, the SDK tells the model to batch independent\ncalls and to use separate assistant responses when a later call needs an earlier\nresult. Runtime safety checks and `toolBatchPolicy` remain authoritative.\n\nThe SDK waits for the complete batch before requesting the model again. Tools\nmay finish in any order, while the `tool_result` blocks sent to the model remain\nin the original `tool_use` order. One tool failure does not discard the other\nresults. On abort, running handlers receive the shared `AbortSignal`, queued\nhandlers do not start, and the SDK waits for handlers that already started to\nsettle.\n\n## Tool Batch Policy\n\nUse `toolBatchPolicy` when some tools must not run in the same model response.\nThe policy sees the complete batch before any tool executes. If it rejects the\nbatch, no tool runs and every tool call receives a structured `is_error: true`\nresult.\n\n```ts\nconst lead = createAgent({\n  model: \"claude-sonnet-4-6\",\n  tools: [incrementRevision],\n  toolBatchPolicy: {\n    validate({ toolCalls }) {\n      const incrementsRevision = toolCalls.find(\n        call => call.name === \"incrementRevision\",\n      );\n      const handoff = toolCalls.find(\n        call => call.kind === \"agent_tool\" &&\n          (call.input as { mode?: string }).mode === \"handoff\",\n      );\n      if (incrementsRevision && handoff) {\n        return {\n          allowed: false,\n          code: \"invalid_tool_batch\",\n          message: \"Update the revision before delegating dependent work.\",\n          conflictingToolCallIds: [incrementsRevision.id, handoff.id],\n          suggestedNextStep: \"Run incrementRevision first, then hand off the new revision.\",\n        };\n      }\n      return { allowed: true };\n    },\n  },\n});\n```\n\nThe policy may be synchronous or asynchronous. If it throws, the SDK rejects\nthe whole batch with `tool_batch_policy_error`; no tool has executed. Without a\npolicy, tool execution is unchanged. A policy prevents known bad combinations\ninside one model response, but it does not replace database transactions or\nrevision checks against concurrent external updates.\n\n## Strict Option Validation And Tool Metadata\n\n*Requires 0.22.0 or later.*\n\nThe option objects of `createAgent()`/`createBareAgent()`/`defineAgent()`\n(`AgentOptions`), `agentTool()` (`AgentToolOptions`), `delegateTool()`\n(`DelegateToolOptions`), and `tool()` (`ToolOptions`) are validated strictly:\nan unknown key throws at assembly time —\n\n```\nAgentOptions: unknown option \"bogusOption\". Check for a typo, or upgrade the SDK if this option was added in a newer version.\n```\n\n(`agentTool()`/`delegateTool()` prefix the message with `agentTool(\"<name>\"):` /\n`delegateTool(\"<name>\"):` instead.) The point is to fail fast on the old-SDK +\nnew-API combination: before 0.22.0 an unknown option was silently ignored, so\ncalling a newer API on an older install \"worked\" with the feature absent.\n\n*Behavior change in 0.22.0:* extra keys that used to be silently ignored —\nfor example host fields spread into an options object — now throw. If your\nhost assembles options by spreading wider objects, strip the extra fields when\nupgrading.\n\nSeparately, `ToolOptions.metadata` and `AgentToolOptions.metadata` accept a\n`Record<string, unknown>` that is passed through to `ToolDefinition.metadata`:\n\n```ts\nconst search = tool(\n  \"search\",\n  \"Search documents\",\n  z.object({ query: z.string() }),\n  async ({ query }) => ({ content: await documentIndex.search(query) }),\n  { metadata: { contractVersion: 3 } },\n);\n```\n\nThe SDK never reads or interprets `metadata`, and it is never shown to the\nmodel — it is host-owned, machine-readable annotation (for example a contract\nversion). When not passed, the key is absent from the `ToolDefinition`.\n\n## Automatic Context Compaction\n\nHistory only grows, so a long-running agent eventually exceeds the model's\ncontext window. Enable `autoCompact` to replace the older part of the\nconversation with a model-written summary:\n\n```ts\nconst agent = createAgent({\n  apiKey: process.env.ANTHROPIC_API_KEY,\n  model: \"claude-sonnet-4-6\",\n  autoCompact: true, // or { thresholdTokens: 150_000, keepRecentMessages: 8 }\n});\n```\n\nCompaction runs between turns, once a response reports more input tokens than\n`thresholdTokens` (default `100000`). Everything except the last\n`keepRecentMessages` messages (default `6`) is summarized, and the history is\nrebuilt as that summary followed by the retained messages. The summary is\nwrapped in an instruction telling the model that compaction just happened and to\ncontinue from it, so the next turn resumes the task instead of restarting it.\n\nUnlike the `onModelRequest` hook, which shapes a single request, this **rewrites\nthe stored conversation** — that is what makes the saving persist, but the\nreplaced turns are gone.\n\nThe cut point never separates a `tool_result` from the `tool_use` that produced\nit, because the model API rejects that. If no safe cut leaves anything to\nsummarize, compaction is skipped.\n\nCompaction costs a model call. Its tokens are folded into `result.usage`, and a\n`system` message with `subtype: \"compaction\"` reports what happened:\n\n```ts\nfor await (const message of agent.query(\"Refactor this module.\")) {\n  if (message.type === \"system\" && message.subtype === \"compaction\") {\n    console.log(`compacted ${message.compacted_messages} messages`, message.usage);\n  }\n}\n```\n\nThe trigger depends on reported usage, so a custom `ModelClient` that omits\n`usage` never compacts. Override the instruction with `prompt`, or read the\nbuilt-in one from `DEFAULT_COMPACTION_PROMPT`.\n\nThe threshold is a forecast, so a single large tool result can still carry a\nrequest past the window. Compaction then runs as a recovery — summarize, then\nretry the same turn — on either `stop_reason: \"model_context_window_exceeded\"`\nor an API error naming a too-long prompt. It is attempted once per query; if\nsummarizing fails or there is nothing left to summarize, the original failure\nsurfaces unchanged.\n\n`stop_reason: \"max_tokens\"` deliberately does **not** trigger compaction. It\nmeans the *output* hit `maxTokens`, not that the input was too large — the model\nhad room to read and ran out of room to write, so compacting the history would\nnot make the answer complete. Raise `maxTokens` instead.\n\n## Hooks\n\n`permission` and `toolBatchPolicy` decide whether something runs. Hooks decide\nwhat it looks like — redacting tool output, trimming context before a request,\nor injecting retrieved documents:\n\n```ts\nconst agent = createAgent({\n  apiKey: process.env.ANTHROPIC_API_KEY,\n  model: \"claude-sonnet-4-6\",\n  tools: [queryDatabase],\n  hooks: {\n    async onToolResult({ toolName, result, error }) {\n      if (toolName !== \"queryDatabase\") return; // undefined: leave unchanged\n      return { ...result, content: await redact(result.content) };\n    },\n    onModelRequest({ messages, turn }) {\n      if (messages.length < 40) return;\n      return { messages: compact(messages) };\n    },\n  },\n});\n```\n\n`onToolResult` sees every result on its way to the model, including handler\nfailures, aborted calls, and calls blocked by `toolBatchPolicy`. `onModelRequest`\nshapes a single request; the stored conversation is untouched, so trimming\ncontext does not destroy history.\n\nA hook returns a replacement or nothing, and must not mutate what it receives. A\nhook that throws propagates out of `query()` rather than becoming an error\n`result` — a redaction hook that failed quietly would leak the data it exists to\nprotect. Hooks run before the matching trace event, so traces record what was\nactually sent.\n\nCompose independent concerns with `createCompositeAgentHooks([a, b, c])`, which\nchains them in order, each receiving the previous one's output.\n\n## Business Context For Tools\n\nPass host application data through `context`. The SDK gives that context to\ntool handlers, but does not automatically put it into the model transcript. The\nmodel sees the data only if a tool returns it.\n\n```ts\nimport { createBareAgent, tool } from \"agent-lattice\";\nimport { z } from \"zod/v4\";\n\ntype QcContext = {\n  patientRecordId: string;\n  scoringStandardId: string;\n};\n\nconst readPatientRecordInput = z.object({});\nconst qcTool = tool<QcContext>();\n\nconst readPatientRecord = qcTool(\n  \"read_patient_record\",\n  \"Read the current patient record\",\n  readPatientRecordInput,\n  async (_input, { context }) => {\n    return {\n      content: JSON.stringify({\n        patientRecordId: context?.patientRecordId,\n        scoringStandardId: context?.scoringStandardId,\n      }),\n    };\n  },\n);\n\nconst agent = createBareAgent<QcContext>({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n  tools: [readPatientRecord],\n});\n\nconst result = await agent.prompt(\"Review the current patient record.\", {\n  context: {\n    patientRecordId: \"ocr_123\",\n    scoringStandardId: \"tumor-treatment-process-v1\",\n  },\n});\n```\n\n## Permission Callback\n\n```ts\nconst agent = createAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n  tools: [dangerousTool],\n  permission: async request => {\n    if (request.toolName === \"danger\") {\n      return { behavior: \"deny\", message: \"Blocked by policy\" };\n    }\n    return { behavior: \"allow\" };\n  },\n});\n```\n\nDenied tools are returned to Claude as error `tool_result` blocks so the model\ncan explain or choose another path.\n\n## Skills\n\nSkills are reusable instruction bundles. They are lighter than Claude Code\nruntime plugins: the SDK reads skill instructions and injects matching skills\ninto the model request, but it does not depend on the Claude Code runtime.\n\n```ts\nimport { createAgent, loadSkill, skill } from \"agent-lattice\";\n\nconst codeReview = skill({\n  name: \"code-review\",\n  description: \"Review code changes and pull requests\",\n  instructions: \"Always list bugs and risks before summaries.\",\n});\n\nconst pdf = await loadSkill(\"./skills/pdf\");\n\nconst agent = createAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n  skills: [codeReview, pdf],\n});\n```\n\n`loadSkill(path)` expects a `SKILL.md` file:\n\n```md\n---\nname: pdf\ndescription: Read and inspect PDF documents\n---\n\nRender pages before claiming layout is correct.\n```\n\n## MCP Tools\n\nThe SDK can expose MCP server tools as agent tools. The first version supports\nstdio MCP servers, remote Streamable HTTP servers, OAuth providers, and a\ngeneric `MCPClient` adapter.\n\n```ts\nimport {\n  connectMCPStdioServer,\n  createAgent,\n} from \"agent-lattice\";\n\nconst mcp = await connectMCPStdioServer(\n  {\n    command: \"node\",\n    args: [\"./mcp-server.js\"],\n  },\n  {\n    namePrefix: \"docs\",\n  },\n);\n\nconst agent = createAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n  tools: mcp.tools,\n});\n\ntry {\n  const result = await agent.prompt(\"Search the docs for installation steps.\");\n  console.log(result.result);\n} finally {\n  await mcp.close();\n}\n```\n\nUse `createMCPTools(client)` if your host application already manages an MCP\nclient connection.\n\nConnect a remote Streamable HTTP MCP server:\n\n```ts\nimport {\n  connectMCPStreamableHTTPServer,\n  createAgent,\n} from \"agent-lattice\";\n\nconst mcp = await connectMCPStreamableHTTPServer(\"https://mcp.example.com/mcp\", {\n  namePrefix: \"remote\",\n  requestInit: {\n    headers: {\n      \"X-Workspace\": \"demo\",\n    },\n  },\n});\n\nconst agent = createAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n  tools: mcp.tools,\n});\n```\n\nPass an official MCP `OAuthClientProvider` when the remote server requires OAuth:\n\n```ts\nconst mcp = await connectMCPStreamableHTTPServer(\"https://mcp.example.com/mcp\", {\n  authProvider,\n});\n```\n\n## AgentLike Composition\n\n`Agent` and `Team` satisfy the same `AgentLike` shape:\n\n```ts\ntype AgentLike<TContext = unknown> = {\n  query(prompt, options?): AsyncGenerator<SDKMessage | TeamRunnerMessage>;\n  prompt(prompt, options?): Promise<SDKResultMessage>;\n  interrupt(): boolean;\n};\n```\n\n`interrupt()` ends the in-flight model request with an `\"interrupted\"` result\n(see [Interrupting A Query](#interrupting-a-query)); on a `Team` or\n`TeamRunner` it delegates to the lead/root agent. It returns `true` when a\nquery was interrupted and `false` when idle. *Requires 0.16.0 or later; the\n`boolean` return requires 0.17.0 or later.*\n\nThat means a team can be used anywhere a callable agent is expected. From the\noutside, a team is an agent; inside, it can contain a whole organization.\n\n## Agent Specs (Templates) And Sessions\n\n*Requires 0.15.0 or later.*\n\n`createAgent()` returns a live session: one conversation, one history, one\nworkspace. `defineAgent()` returns an `AgentSpec` — a template carrying the\nsame options but no state. `spawn()` creates an independent session from it:\n\n```ts\nimport { agentTool, defineAgent } from \"agent-lattice\";\n\nconst reviewerSpec = defineAgent({\n  name: \"reviewer\",\n  model: \"claude-sonnet-4-5\",\n  systemPrompt: \"You are a senior code reviewer...\",\n});\n\n// Register the spec: every tool call spawns a fresh session with no memory\n// of previous calls. This is the safe default for reuse.\nconst lead = createAgent({\n  model: \"claude-sonnet-4-5\",\n  tools: [\n    agentTool(\"review\", reviewerSpec, {\n      description: \"Ask the reviewer to audit a change.\",\n    }),\n  ],\n});\n\n// Register a spawned session instead when the target should remember earlier\n// tasks across calls — continuity is an explicit opt-in.\nconst reviewSession = reviewerSpec.spawn();\n```\n\nThe same union applies to `delegateTool()`. The generated tool description\nstates which semantics a target has, so the calling agent knows whether each\ntask must be self-contained. Existing code that passes an `AgentLike` keeps\nits current behavior: a long-lived session with history.\n\n## Team Mailbox Collaboration\n\nUse `createTeam()` when you want to talk to one `AgentLike` while it coordinates\nwith named members internally. The team automatically injects member\n`agentTool()` tools and drives the mailbox runtime when you call `team.query()`\nor `team.prompt()`.\n\n```ts\nimport {\n  createAgent,\n  createMemoryMailbox,\n  createTeam,\n  teamMember,\n} from \"agent-lattice\";\n\nconst researcher = createAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n  systemPrompt: \"You research agent SDK architecture and report concise findings.\",\n});\n\nconst team = createTeam({\n  name: \"engineering\",\n  lead: createAgent({\n    apiKey: process.env.DEEPSEEK_API_KEY,\n    baseURL: \"https://api.deepseek.com/anthropic\",\n    model: \"deepseek-v4-flash\",\n    systemPrompt: \"You lead engineering work. Delegate research tasks to researcher.\",\n  }),\n  members: [\n    teamMember({\n      name: \"researcher\",\n      role: \"executor\",\n      focus: \"Research agent architecture\",\n      agent: researcher,\n    }),\n  ],\n  mailbox: createMemoryMailbox(),\n});\n\nfor await (const event of team.query(\"Ask the researcher to inspect the SDK design.\")) {\n  console.log(event);\n}\n```\n\n`team.query()` streams both the lead agent's normal SDK messages and team\nruntime events such as `team_message`, `team_agent`, and nested `agent_message`\nevents. `team.prompt()` consumes that stream and returns only the final result.\n\n`createTeam()` injects member AgentLike tools into the lead. Those tools expose\nan explicit action contract: `mode: \"ask\"` waits for the member result,\n`mode: \"handoff\"` returns an acceptance receipt to the lead while the team\nruntime continues the accepted mailbox work, and `mode: \"observe\"` reports\nunsupported unless a host runtime provides observation support. In the default\n`team.query()` and `team.prompt()` path, a handoff receipt is not the final\ndelivery: the runtime waits for the member's upstream reply, feeds it back to\nthe lead, and keeps going until the root lead returns the final result or the\nrun terminates.\n\nAfter one model response queues one or more handoffs, the SDK does not call the\nlead model again immediately. It first runs those members, collects their\ncompleted or failed reports, and only then calls the lead again. All handoffs\nfrom the current tool batch are queued before the lead pauses. The receipt keeps\n`status: \"accepted\"` for compatibility and also includes `phase: \"queued\"`,\n`completion_pending: true`, `message_id`, `work_item_id`, and `thread_id`.\n\nAccepted handoffs use work-item failure isolation by default. If one member\nreturns an agent error such as `MaxTurnsError` or `APIError`, the runtime marks\nthat work item `failed`, sends a failure report to the lead, and continues the\nother accepted handoffs. The lead receives successful and failed reports\ntogether and decides whether to retry, revise the task, accept a partial result,\nor finish. A run-wide `AbortError` still stops the runner; the runtime marks the\ncurrent and remaining accepted work `cancelled` before propagating the abort.\n\nHandoff work is serial by default. Set a bounded concurrency limit on the team\nwhen independent members should run at the same time:\n\n```ts\nconst team = createTeam({\n  name: \"research\",\n  lead,\n  members,\n  runner: { maxConcurrentWorkItems: 4 },\n});\n```\n\nYou can also pass `maxConcurrentWorkItems` to `createTeamRunner()`. The limit\nmust be a positive integer and defaults to `1`. It applies across different\nmember mailboxes; work addressed to the same mailbox remains serial because an\nAgent may keep mutable conversation state. Runtime events are emitted as work\nactually progresses, while the reports injected back into the lead stay in the\noriginal handoff order.\n\nTeam member tools can also request explicit shared workspace write grants:\n\n```ts\nfor await (const event of team.query(\n  \"Ask backend to implement the API in the shared repo.\",\n  {\n    permissions: {\n      workspaceGrants: [{\n        root: \"/work/shared/txt-notebook-app\",\n        access: [\"write\"],\n        reason: \"Project shared workspace\",\n      }],\n    },\n  },\n)) {\n  console.log(event);\n}\n```\n\nWhen the lead calls a member tool, it may include `workspaceGrants` scoped to\nthat member, for example `/work/shared/txt-notebook-app/backend`. The runtime\nonly accepts write grants that are covered by the caller's current permissions. The\naccepted grants are written to mailbox metadata, included in the child agent's\ntask/system context, and enforced by the built-in write tools. Read-only tools\nsuch as `Read`, `LS`, `Glob`, and `Grep` can inspect any path the host process\ncan read and do not require workspace grants. If a write tool is denied, the\nmodel receives a structured `permission_denied` tool result with the requested\npath, allowed roots, and a deterministic suggested next step.\nGrant `access` values are operation categories, not tool names; `write` covers\n`Write`, `Edit`, and obvious Bash writes.\n\nManagers should choose one workspace strategy explicitly when delegating:\nask the member to write deliverables in its own private workspace and report\npaths, or provide `workspaceGrants: [{ root, access: [\"write\"], reason }]` for\nevery shared or manager-owned root named as a write destination.\n\nAdvanced mailbox controls remain available through `team.send()`,\n`team.drain()`, and `team.mailbox`. Member agents that can accept tools receive\n`team_send`, `team_inbox`, `team_read`, `team_reply`, `team_followup`, and\n`team_status` so they can process assigned mailbox work. The lead does not\nreceive raw mailbox tools by default; pass `exposeLeadMailboxTools: true` only\nwhen the lead should manually operate the team mailbox.\n\nFor durable local storage, pass a SQLite-like database. `better-sqlite3` works\nwithout the SDK taking a hard dependency on it:\n\n```ts\nimport Database from \"better-sqlite3\";\nimport {\n  createAgent,\n  createSQLiteMailbox,\n  createTeam,\n} from \"agent-lattice\";\n\nconst mailbox = createSQLiteMailbox({\n  database: new Database(\"team-mailbox.db\"),\n});\n\nconst team = createTeam({\n  name: \"engineering\",\n  lead: createAgent({\n    apiKey: process.env.DEEPSEEK_API_KEY,\n    baseURL: \"https://api.deepseek.com/anthropic\",\n    model: \"deepseek-v4-flash\",\n  }),\n  members: [],\n  mailbox,\n});\n```\n\nHosts can also provide their own `TeamMailbox` adapter for Redis, Cloudflare D1,\nDurable Objects, or another queue/storage backend.\n\n### Nested teams\n\nBecause `teamMember().agent` accepts any `AgentLike`, a `Team` can be a member\nof another `Team`:\n\n```ts\nimport {\n  createAgent,\n  createTeam,\n  teamMember,\n} from \"agent-lattice\";\n\nconst createDeepSeekAgent = (systemPrompt: string) => createAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n  systemPrompt,\n});\n\nconst ceoAgent = createDeepSeekAgent(\n  [\n    \"You are the CEO agent.\",\n    \"Clarify product goals, decide which department owns the work, and ask for concise progress reports.\",\n    \"Do not implement engineering details yourself.\",\n  ].join(\"\\n\"),\n);\nconst engineeringHeadAgent = createDeepSeekAgent(\n  [\n    \"You are the engineering head agent.\",\n    \"Break engineering goals into backend and frontend work, route tasks to the right executor, and report outcomes upstream.\",\n    \"Keep architecture decisions explicit.\",\n  ].join(\"\\n\"),\n);\nconst backendAgent = createDeepSeekAgent(\n  [\n    \"You are the backend executor agent.\",\n    \"Handle APIs, data models, storage, integrations, and server-side correctness.\",\n    \"Escalate product or UI decisions instead of guessing.\",\n  ].join(\"\\n\"),\n);\nconst frontendAgent = createDeepSeekAgent(\n  [\n    \"You are the frontend executor agent.\",\n    \"Handle UI flows, client state, accessibility, and browser behavior.\",\n    \"Escalate API contract questions instead of inventing them.\",\n  ].join(\"\\n\"),\n);\n\nconst engineeringTeam = createTeam({\n  name: \"engineering\",\n  lead: engineeringHeadAgent,\n  members: [\n    teamMember({ name: \"backend\", role: \"executor\", agent: backendAgent }),\n    teamMember({ name: \"frontend\", role: \"executor\", agent: frontendAgent }),\n  ],\n});\n\nconst companyTeam = createTeam({\n  name: \"company\",\n  lead: ceoAgent,\n  members: [\n    teamMember({\n      name: \"engineering\",\n      role: \"head\",\n      focus: \"Own engineering delivery\",\n      agent: engineeringTeam,\n    }),\n  ],\n});\n```\n\nUse this pattern to model CEO -> Head Team -> Executor Agent without hard-coding\nthat hierarchy into the SDK.\n\n### Routing loops\n\nThe SDK does not block routing loops by default. A task can move from a manager\nto a member, back to the manager for context, and then back to the same member.\nThat is normal organizational flow, not necessarily a runtime error.\n\nUse `maxTurns`, permission callbacks, mailbox status, and host-level monitoring\nto control cost and risk. If your application needs a strict hierarchy, expose\nonly the allowed members at each layer and enforce routing with permission\ncallbacks or a host-level policy.\n\n### Team runtime drain\n\nMailbox routing is explicit: a pending message belongs to its `to` mailbox and\nmust be handled by that member's agent. `claimNext(mailboxId)` only claims one\npending message for that mailbox and marks it `processing`.\n\n```ts\nconst message = await team.mailbox.claimNext(\"engineering::researcher\");\n```\n\nUse `team.drain()` to let the runtime advance already-routed work:\n\n```ts\nconst result = await team.drain({\n  maxRounds: 5,\n  maxMessages: 20,\n});\n```\n\n`drain()` iterates members, claims pending messages from each member's own\nmailbox, and prompts that member agent. It does not re-route work. The member\nmust call `team_reply` for a final result or `team_followup` for progress. If a\nmember ends without either, the runtime marks the original message `failed` and\nsends a diagnostic follow-up to the upstream mailbox.\n\n## Agent Workspace Tools\n\n`createAgent()` includes a private workspace and these built-in tools by\ndefault:\n\n- `Read`\n- `Write`\n- `Edit`\n- `LS`\n- `Glob`\n- `Grep`\n- `Bash`\n\nUse `createBuiltinTools()` or `createAgentWorkspaceTools()` when you want to\nassemble the tool list yourself, especially with `createBareAgent()`:\n\n```ts\nimport { createBareAgent, createBuiltinTools } from \"agent-lattice\";\n\nconst agent = createBareAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n  systemPrompt: \"Use the configured project directory for file work.\",\n  tools: createBuiltinTools({\n    cwd: process.cwd(),\n    allowedDirectories: [process.cwd()],\n  }),\n  permission: async request => {\n    if (request.toolName === \"Bash\" || request.toolName === \"Write\" || request.toolName === \"Edit\") {\n      return { behavior: \"deny\", message: \"This host did not approve write or shell access.\" };\n    }\n    return { behavior: \"allow\" };\n  },\n});\n```\n\n`Read`, `LS`, `Glob`, and `Grep` are read-only observation tools and are not\ngated by workspace grants. `Write`, `Edit`, and obvious Bash writes are gated to\nthe configured workspace roots and task-scoped shared workspace grants, so\nproduction hosts should pair write and shell access with a permission callback.\nShell redirects to `/dev/null` are treated as discard targets, not workspace\nwrites.\n\nPass `workspace: false` to opt out of the built-in workspace entirely — no\nbuilt-in file/shell tools and no workspace prompt section, equivalent to\n`createBareAgent()` (*requires 0.23.0 or later*). Unlike `createBareAgent()`,\nthe option also works through `defineAgent()`, so\n`defineAgent({ workspace: false })` spawns bare sessions — handy for\ntyped-delegation specialists that should have no filesystem or shell surface\nat all.\n\n## Multi-turn Session\n\n```ts\nconst agent = createAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n});\n\nawait agent.prompt(\"My name is Ada.\");\nconst result = await agent.prompt(\"What is my name?\");\nconsole.log(result.result);\n```\n\nThe SDK stores conversation state in memory for the lifetime of the `Agent`\ninstance. To persist it or resume a conversation in another process, attach a\n`HistoryStore` — see [Persistent History And Resume](#persistent-history-and-resume).\n\nAn `Agent` is a conversation, not a reusable client. Because the history is\ninstance state, starting a query while another is still running would interleave\nboth conversations; the SDK rejects the second one with `ConcurrentQueryError`.\nCreate one Agent per concurrent conversation — in a server, per request or per\nuser session rather than a shared module-level instance. Sequential reuse, as\nabove, is the intended pattern.\n\n## Persistent History And Resume\n\n*Requires 0.16.0 or later.*\n\nPass a `HistoryStore` to seed an Agent's history from durable storage and have\nevery later write mirrored back. `createJsonlHistoryStore()` persists one JSON\nmessage per line:\n\n```ts\nimport { createAgent, createJsonlHistoryStore } from \"agent-lattice\";\n\nconst historyStore = createJsonlHistoryStore({\n  path: \".agent-sessions/ada.jsonl\",\n});\n\nconst agent = createAgent({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  baseURL: \"https://api.deepseek.com/anthropic\",\n  model: \"deepseek-v4-flash\",\n  historyStore,\n});\n\n// The first query lazily loads any history the store already holds, then the\n// new prompt continues from it. Every user, assistant, and tool_result message\n// is appended to the file as it lands.\nconst result = await agent.prompt(\"What is my name?\");\n\n// A copy of the live history, safe to inspect or mutate.\nconst transcript = await agent.getHistory();\n```\n\nThe store contract is three methods — `load()`, `append(message)`, and\n`replace(messages)` — each synchronous or returning a promise:\n\n- `load()` runs once per Agent lifetime, lazily before the first query (the\n  constructor cannot be async). Resuming across processes is simply a new\n  Agent over the same store; the \"one Agent, one conversation\" rule is\n  unchanged.\n- `append(message)` follows every message added to the history.\n- `replace(messages)` follows compaction, which rewrites the whole history —\n  a store must support full replacement, not just appends.\n\nThe JSONL store's `load()` skips malformed lines rather than failing, so a\ntorn final write does not lose the rest of the transcript. By default a\nfailing store is swallowed and the conversation continues in memory only,\nmirroring the tracer's failure semantics; bind `failOnError: true` when the\nstore is created (via `createJsonlHistoryStore()` options or\n`defineHistoryStore()`) to propagate store errors out of `query()` instead.\n\nImplement a custom store with `defineHistoryStore()`, which validates the\nthree methods and binds `failOnError`; the returned port object exposes\nmethods only. *Requires 0.17.0 or later.* (Breaking in 0.17.0: the public\n`failOnError` field was removed from `HistoryStore`; custom stores created\nbefore 0.17.0 must go through `defineHistoryStore()`.)\n\n```ts\nimport { defineHistoryStore } from \"agent-lattice\";\n\nconst historyStore = defineHistoryStore({\n  load: () => loadMessagesFromYourDatabase(),\n  append: message => appendMessageToYourDatabase(message),\n  replace: messages => replaceMessagesInYourDatabase(messages),\n});\n```\n\nTo rewrite the history from the host instead of from compaction, use\n`agent.replaceHistory(messages)`. *Requires 0.17.0 or later.* It is idle-only:\ncalling it while a query is running throws `ConcurrentQueryError`, the same\nguard as a concurrent `query()`. When a `historyStore` is configured the store\nis replaced too, so persistence stays in sync, and the replacement also\nsuppresses the lazy `load()` — seeding never overwrites what the host just\ninstalled. The SDK does not validate the content: the host owns it, and the\nhistory must be well-formed (e.g. no dangling `tool_use` without its matching\n`tool_result`).\n\n```ts\nawait agent.replaceHistory([\n  { role: \"user\", content: \"My name is Ada.\" },\n  { role: \"assistant\", content: [{ type: \"text\", text: \"Nice to meet you, Ada.\" }] },\n]);\n```\n\n## Deadlines\n\n`QueryOptions.signal` bounds a whole query — every model request, tool call, and\nturn together. `requestTimeoutMs` bounds each single model request, so an agent\nthat legitimately runs many tool-using turns does not have to fit them all into\none budget:\n\n```ts\nconst agent = createAgent({\n  apiKey: process.env.ANTHROPIC_API_KEY,\n  model: \"claude-sonnet-4-6\",\n  requestTimeoutMs: 120_000,\n});\n\nconst result = await agent.prompt(\"Audit this repository.\", {\n  signal: AbortSignal.timeout(600_000),\n  requestTimeoutMs: 60_000, // overrides the agent default for this query\n});\n```\n\nA request deadline produces `subtype: \"error_timeout\"` with a `TimeoutError`,\ndistinct from the `\"error_abort\"` of a caller-initiated cancellation, so hosts\ncan retry timeouts without retrying deliberate cancellations.\n\nBoth limits are enforced by the SDK rather than delegated. `ModelRequest` carries\n`signal` and `timeoutMs` so a client can cancel its own work, but the agent loop\nalso races the call, so a `ModelClient` that honours neither cannot stall the\nloop indefinitely. Losing that race abandons the call rather than cancelling it.\n\n## Interrupting A Query\n\n*Requires 0.16.0 or later; `interrupt()` returns `boolean` from 0.17.0.*\n\n`agent.interrupt()` ends the current query without tearing the conversation\ndown. Where `QueryOptions.signal` terminates the query with `\"error_abort\"`,\n`interrupt()` aborts only the in-flight model request and finishes with\n`subtype: \"interrupted\"` — normal control flow, so `is_error` stays `false`.\nAs on abort, the partial assistant message is dropped, but every completed\nturn stays in the history, so the host can continue the same Agent with a new\n`query()` that injects its own message:\n\n```ts\nconst pending = agent.prompt(\"Draft the release notes.\");\nagent.interrupt(); // e.g. the user typed a correction\nconst result = await pending;\n// result.subtype === \"interrupted\"\n\nawait agent.prompt(\"Actually, skip 0.15.x and cover 0.16.0 only.\");\n```\n\nAn interrupt that lands while a tool batch is executing takes effect once the\nbatch completes: its tool results are written to history first, and the query\nends `\"interrupted\"` before the next model call. `interrupt()` returns `true`\nwhen a query was running and is now interrupted, and `false` when idle — a\n`false` tells the host there is nothing to wait for, so it can send its next\nquery directly.\n\n## Token Usage And Truncation\n\nEvery `result` message reports `usage`, summed over the model requests in that\nquery, plus the `stop_reason` of the last response:\n\n```ts\nconst result = await agent.prompt(\"Summarize this file.\");\nconsole.log(result.usage);\n// { input_tokens: 1200, output_tokens: 512, cache_read_input_tokens: 800 }\n\nif (result.stop_reason === \"max_tokens\") {\n  // subtype is still \"success\", but result is a fragment, not an answer.\n}\n```\n\n`stop_reason: \"max_tokens\"` means the model hit its output budget mid-response.\nThe SDK does not treat that as an error, so checking this field is the only way\nto distinguish a complete answer from a truncated one.\n\nWhen a response containing tool calls is truncated at `max_tokens`, the SDK\ndoes not execute those calls: the last `tool_use` input may be incomplete, and\na truncated value can even survive JSON parsing with its meaning changed.\nEvery call in the batch gets an error `tool_result` explaining the truncation\nand asking the model to reissue the call with a shorter output, and the loop\ncontinues. *Requires 0.18.0 or later.*\n\nUsage comes from the model client. The built-in Anthropic client fills it in from\nthe response, including the streaming path; a custom `ModelClient` that omits\n`usage` produces zeroed counts rather than an error.\n\nAssistant messages also carry provider response metadata: `providerResponseId`\nis the provider-assigned response id and `model` is the model that actually\nserved the response, which may differ from the requested `AgentOptions.model`.\nThe built-in Anthropic client fills both in on streaming and non-streaming\nrequests; a custom `ModelClient` may set them on the `AssistantModelMessage` it\nreturns. Both fields are optional and absent when the client does not report\nthem.\n\n*Requires 0.16.0 or later.*\n\n## Invalid tool argument JSON\n\n*Requires 0.25.1 or later.*\n\nWhen a completed Anthropic-compatible stream contains malformed tool argument JSON, the SDK does not execute the tool. It returns a matching `tool_result` with `is_error: true`, identifies the JSON syntax problem (including a character position when available), lists required top-level fields, and asks the model to regenerate complete arguments from the tool schema. Raw argument excerpts are not echoed in the error.\n\nIncomplete intermediate chunks are not errors if the final JSON is valid. Valid JSON objects, including `{}`, still go through normal schema validation. Valid JSON values that are not objects are rejected before execution. Existing turn limits still apply; this feedback does not guarantee that a model will correct its response.\n","readmeFilename":"README.md"}