[{"data":1,"prerenderedAt":948},["ShallowReactive",2],{"docs:/docs/agents/tags":3},{"id":4,"title":5,"body":6,"description":941,"extension":942,"meta":943,"navigation":107,"path":944,"seo":945,"stem":946,"__hash__":947},"docs/docs/agents/tags.md","Tag Vocabulary for Agents",{"type":7,"value":8,"toc":927},"minimark",[9,14,23,28,36,176,181,280,283,287,290,406,410,453,457,460,616,620,683,687,690,837,841,923],[10,11,13],"h1",{"id":12},"tag-vocabulary","Tag Vocabulary",[15,16,17,18,22],"p",{},"Tags control task routing, prioritization, and filtering in ",[19,20,21],"code",{},"@nolag/agents",".",[24,25,27],"h2",{"id":26},"capability-tags","Capability Tags",[15,29,30,31,35],{},"Capability tags describe what a worker agent can do. When an orchestrator dispatches a task with required capabilities, only workers whose registered capabilities include ",[32,33,34],"strong",{},"all"," of the required tags will receive the task.",[37,38,39],"code-tabs",{},[40,41,47],"pre",{"className":42,"code":43,"filename":44,"language":45,"meta":46,"style":46},"language-typescript shiki shiki-themes github-light github-dark","// Worker registers capabilities\nroom.handoff.register({\n  capabilities: [\"research\", \"finance\", \"summarization\"],\n});\n\n// Orchestrator dispatches with required capabilities\nawait room.handoff.dispatch({\n  type: \"analyze-earnings\",\n  payload: { ticker: \"ACME\" },\n  capabilities: [\"research\", \"finance\"],  // Worker must have BOTH tags\n});\n","TypeScript","typescript","",[19,48,49,58,72,96,102,109,115,130,142,154,171],{"__ignoreMap":46},[50,51,54],"span",{"class":52,"line":53},"line",1,[50,55,57],{"class":56},"sJ8bj","// Worker registers capabilities\n",[50,59,61,65,69],{"class":52,"line":60},2,[50,62,64],{"class":63},"sVt8B","room.handoff.",[50,66,68],{"class":67},"sScJk","register",[50,70,71],{"class":63},"({\n",[50,73,75,78,82,85,88,90,93],{"class":52,"line":74},3,[50,76,77],{"class":63},"  capabilities: [",[50,79,81],{"class":80},"sZZnC","\"research\"",[50,83,84],{"class":63},", ",[50,86,87],{"class":80},"\"finance\"",[50,89,84],{"class":63},[50,91,92],{"class":80},"\"summarization\"",[50,94,95],{"class":63},"],\n",[50,97,99],{"class":52,"line":98},4,[50,100,101],{"class":63},"});\n",[50,103,105],{"class":52,"line":104},5,[50,106,108],{"emptyLinePlaceholder":107},true,"\n",[50,110,112],{"class":52,"line":111},6,[50,113,114],{"class":56},"// Orchestrator dispatches with required capabilities\n",[50,116,118,122,125,128],{"class":52,"line":117},7,[50,119,121],{"class":120},"szBVR","await",[50,123,124],{"class":63}," room.handoff.",[50,126,127],{"class":67},"dispatch",[50,129,71],{"class":63},[50,131,133,136,139],{"class":52,"line":132},8,[50,134,135],{"class":63},"  type: ",[50,137,138],{"class":80},"\"analyze-earnings\"",[50,140,141],{"class":63},",\n",[50,143,145,148,151],{"class":52,"line":144},9,[50,146,147],{"class":63},"  payload: { ticker: ",[50,149,150],{"class":80},"\"ACME\"",[50,152,153],{"class":63}," },\n",[50,155,157,159,161,163,165,168],{"class":52,"line":156},10,[50,158,77],{"class":63},[50,160,81],{"class":80},[50,162,84],{"class":63},[50,164,87],{"class":80},[50,166,167],{"class":63},"],  ",[50,169,170],{"class":56},"// Worker must have BOTH tags\n",[50,172,174],{"class":52,"line":173},11,[50,175,101],{"class":63},[177,178,180],"h3",{"id":179},"common-capability-tags","Common capability tags",[182,183,184,197],"table",{},[185,186,187],"thead",{},[188,189,190,194],"tr",{},[191,192,193],"th",{},"Tag",[191,195,196],{},"Description",[198,199,200,211,221,231,241,251,260,270],"tbody",{},[188,201,202,208],{},[203,204,205],"td",{},[19,206,207],{},"research",[203,209,210],{},"Web research, data gathering, source verification",[188,212,213,218],{},[203,214,215],{},[19,216,217],{},"drafting",[203,219,220],{},"Content creation, report writing, email composition",[188,222,223,228],{},[203,224,225],{},[19,226,227],{},"review",[203,229,230],{},"Quality review, fact-checking, compliance checks",[188,232,233,238],{},[203,234,235],{},[19,236,237],{},"summarization",[203,239,240],{},"Text summarization, key point extraction",[188,242,243,248],{},[203,244,245],{},[19,246,247],{},"finance",[203,249,250],{},"Financial analysis, calculations, reporting",[188,252,253,257],{},[203,254,255],{},[19,256,19],{},[203,258,259],{},"Code generation, review, debugging",[188,261,262,267],{},[203,263,264],{},[19,265,266],{},"translation",[203,268,269],{},"Language translation, localization",[188,271,272,277],{},[203,273,274],{},[19,275,276],{},"customer-support",[203,278,279],{},"User queries, issue resolution, FAQ",[15,281,282],{},"These are conventions, not enforced values. Use any string that makes sense for your domain.",[24,284,286],{"id":285},"priority-tags","Priority Tags",[15,288,289],{},"Priority tags control the order in which workers process tasks. Workers process higher-priority tasks first when multiple tasks are queued. Workers can also filter which priority levels they accept.",[37,291,292],{},[40,293,295],{"className":42,"code":294,"filename":44,"language":45,"meta":46,"style":46},"// Dispatch with priority\nawait room.handoff.dispatch({\n  type: \"generate-report\",\n  payload: { ... },\n  capabilities: [\"drafting\"],\n  priority: \"urgent\",  // Workers process urgent tasks first\n});\n\n// Workers can filter by priority\nroom.handoff.register({\n  capabilities: [\"drafting\"],\n  priorityFilter: [\"urgent\", \"normal\"],  // Ignore \"low\" priority\n});\n",[19,296,297,302,312,321,331,340,354,358,362,367,375,383,401],{"__ignoreMap":46},[50,298,299],{"class":52,"line":53},[50,300,301],{"class":56},"// Dispatch with priority\n",[50,303,304,306,308,310],{"class":52,"line":60},[50,305,121],{"class":120},[50,307,124],{"class":63},[50,309,127],{"class":67},[50,311,71],{"class":63},[50,313,314,316,319],{"class":52,"line":74},[50,315,135],{"class":63},[50,317,318],{"class":80},"\"generate-report\"",[50,320,141],{"class":63},[50,322,323,326,329],{"class":52,"line":98},[50,324,325],{"class":63},"  payload: { ",[50,327,328],{"class":120},"...",[50,330,153],{"class":63},[50,332,333,335,338],{"class":52,"line":104},[50,334,77],{"class":63},[50,336,337],{"class":80},"\"drafting\"",[50,339,95],{"class":63},[50,341,342,345,348,351],{"class":52,"line":111},[50,343,344],{"class":63},"  priority: ",[50,346,347],{"class":80},"\"urgent\"",[50,349,350],{"class":63},",  ",[50,352,353],{"class":56},"// Workers process urgent tasks first\n",[50,355,356],{"class":52,"line":117},[50,357,101],{"class":63},[50,359,360],{"class":52,"line":132},[50,361,108],{"emptyLinePlaceholder":107},[50,363,364],{"class":52,"line":144},[50,365,366],{"class":56},"// Workers can filter by priority\n",[50,368,369,371,373],{"class":52,"line":156},[50,370,64],{"class":63},[50,372,68],{"class":67},[50,374,71],{"class":63},[50,376,377,379,381],{"class":52,"line":173},[50,378,77],{"class":63},[50,380,337],{"class":80},[50,382,95],{"class":63},[50,384,386,389,391,393,396,398],{"class":52,"line":385},12,[50,387,388],{"class":63},"  priorityFilter: [",[50,390,347],{"class":80},[50,392,84],{"class":63},[50,394,395],{"class":80},"\"normal\"",[50,397,167],{"class":63},[50,399,400],{"class":56},"// Ignore \"low\" priority\n",[50,402,404],{"class":52,"line":403},13,[50,405,101],{"class":63},[177,407,409],{"id":408},"standard-priority-levels","Standard priority levels",[182,411,412,421],{},[185,413,414],{},[188,415,416,419],{},[191,417,418],{},"Priority",[191,420,196],{},[198,422,423,433,443],{},[188,424,425,430],{},[203,426,427],{},[19,428,429],{},"urgent",[203,431,432],{},"Processed immediately, preempts normal work",[188,434,435,440],{},[203,436,437],{},[19,438,439],{},"normal",[203,441,442],{},"Default priority for most tasks",[188,444,445,450],{},[203,446,447],{},[19,448,449],{},"low",[203,451,452],{},"Background work, processed when no higher-priority tasks are queued",[24,454,456],{"id":455},"status-tags","Status Tags",[15,458,459],{},"Status tags are automatically managed by the Handoff pattern to track task lifecycle. You don't set these directly - they're emitted as events via the Observe pattern.",[37,461,462],{},[40,463,465],{"className":42,"code":464,"filename":44,"language":45,"meta":46,"style":46},"// Tasks have automatic status tracking\nroom.observe.on(\"task:dispatched\", (e) => {\n  // status: \"pending\"\n});\n\nroom.observe.on(\"task:claimed\", (e) => {\n  // status: \"in_progress\"\n});\n\nroom.observe.on(\"task:completed\", (e) => {\n  // status: \"completed\"\n});\n\nroom.observe.on(\"task:failed\", (e) => {\n  // status: \"failed\"\n});\n",[19,466,467,472,502,507,511,515,536,541,545,549,570,575,579,583,605,611],{"__ignoreMap":46},[50,468,469],{"class":52,"line":53},[50,470,471],{"class":56},"// Tasks have automatic status tracking\n",[50,473,474,477,480,483,486,489,493,496,499],{"class":52,"line":60},[50,475,476],{"class":63},"room.observe.",[50,478,479],{"class":67},"on",[50,481,482],{"class":63},"(",[50,484,485],{"class":80},"\"task:dispatched\"",[50,487,488],{"class":63},", (",[50,490,492],{"class":491},"s4XuR","e",[50,494,495],{"class":63},") ",[50,497,498],{"class":120},"=>",[50,500,501],{"class":63}," {\n",[50,503,504],{"class":52,"line":74},[50,505,506],{"class":56},"  // status: \"pending\"\n",[50,508,509],{"class":52,"line":98},[50,510,101],{"class":63},[50,512,513],{"class":52,"line":104},[50,514,108],{"emptyLinePlaceholder":107},[50,516,517,519,521,523,526,528,530,532,534],{"class":52,"line":111},[50,518,476],{"class":63},[50,520,479],{"class":67},[50,522,482],{"class":63},[50,524,525],{"class":80},"\"task:claimed\"",[50,527,488],{"class":63},[50,529,492],{"class":491},[50,531,495],{"class":63},[50,533,498],{"class":120},[50,535,501],{"class":63},[50,537,538],{"class":52,"line":117},[50,539,540],{"class":56},"  // status: \"in_progress\"\n",[50,542,543],{"class":52,"line":132},[50,544,101],{"class":63},[50,546,547],{"class":52,"line":144},[50,548,108],{"emptyLinePlaceholder":107},[50,550,551,553,555,557,560,562,564,566,568],{"class":52,"line":156},[50,552,476],{"class":63},[50,554,479],{"class":67},[50,556,482],{"class":63},[50,558,559],{"class":80},"\"task:completed\"",[50,561,488],{"class":63},[50,563,492],{"class":491},[50,565,495],{"class":63},[50,567,498],{"class":120},[50,569,501],{"class":63},[50,571,572],{"class":52,"line":173},[50,573,574],{"class":56},"  // status: \"completed\"\n",[50,576,577],{"class":52,"line":385},[50,578,101],{"class":63},[50,580,581],{"class":52,"line":403},[50,582,108],{"emptyLinePlaceholder":107},[50,584,586,588,590,592,595,597,599,601,603],{"class":52,"line":585},14,[50,587,476],{"class":63},[50,589,479],{"class":67},[50,591,482],{"class":63},[50,593,594],{"class":80},"\"task:failed\"",[50,596,488],{"class":63},[50,598,492],{"class":491},[50,600,495],{"class":63},[50,602,498],{"class":120},[50,604,501],{"class":63},[50,606,608],{"class":52,"line":607},15,[50,609,610],{"class":56},"  // status: \"failed\"\n",[50,612,614],{"class":52,"line":613},16,[50,615,101],{"class":63},[177,617,619],{"id":618},"task-status-lifecycle","Task status lifecycle",[182,621,622,631],{},[185,623,624],{},[188,625,626,629],{},[191,627,628],{},"Status",[191,630,196],{},[198,632,633,643,653,663,673],{},[188,634,635,640],{},[203,636,637],{},[19,638,639],{},"pending",[203,641,642],{},"Task dispatched, waiting for a worker to claim",[188,644,645,650],{},[203,646,647],{},[19,648,649],{},"in_progress",[203,651,652],{},"Worker has claimed the task and is processing",[188,654,655,660],{},[203,656,657],{},[19,658,659],{},"completed",[203,661,662],{},"Worker finished successfully",[188,664,665,670],{},[203,666,667],{},[19,668,669],{},"failed",[203,671,672],{},"Worker reported an error",[188,674,675,680],{},[203,676,677],{},[19,678,679],{},"timed_out",[203,681,682],{},"No worker claimed the task before the timeout",[24,684,686],{"id":685},"custom-tags","Custom Tags",[15,688,689],{},"Beyond capabilities and priorities, you can attach arbitrary key-value tags to both tasks and agents. Custom tags are useful for routing by department, region, confidentiality level, or any other dimension specific to your application.",[37,691,692],{},[40,693,695],{"className":42,"code":694,"filename":44,"language":45,"meta":46,"style":46},"// Custom tags on tasks\nawait room.handoff.dispatch({\n  type: \"review\",\n  payload: { document },\n  capabilities: [\"review\"],\n  tags: {\n    department: \"legal\",\n    region: \"eu-west\",\n    confidentiality: \"internal\",\n  },\n});\n\n// Custom tags on agents\nroom.handoff.register({\n  capabilities: [\"review\"],\n  tags: {\n    department: \"legal\",\n    clearance: \"confidential\",\n  },\n});\n",[19,696,697,702,712,721,726,734,739,749,759,769,774,778,782,787,795,803,807,816,827,832],{"__ignoreMap":46},[50,698,699],{"class":52,"line":53},[50,700,701],{"class":56},"// Custom tags on tasks\n",[50,703,704,706,708,710],{"class":52,"line":60},[50,705,121],{"class":120},[50,707,124],{"class":63},[50,709,127],{"class":67},[50,711,71],{"class":63},[50,713,714,716,719],{"class":52,"line":74},[50,715,135],{"class":63},[50,717,718],{"class":80},"\"review\"",[50,720,141],{"class":63},[50,722,723],{"class":52,"line":98},[50,724,725],{"class":63},"  payload: { document },\n",[50,727,728,730,732],{"class":52,"line":104},[50,729,77],{"class":63},[50,731,718],{"class":80},[50,733,95],{"class":63},[50,735,736],{"class":52,"line":111},[50,737,738],{"class":63},"  tags: {\n",[50,740,741,744,747],{"class":52,"line":117},[50,742,743],{"class":63},"    department: ",[50,745,746],{"class":80},"\"legal\"",[50,748,141],{"class":63},[50,750,751,754,757],{"class":52,"line":132},[50,752,753],{"class":63},"    region: ",[50,755,756],{"class":80},"\"eu-west\"",[50,758,141],{"class":63},[50,760,761,764,767],{"class":52,"line":144},[50,762,763],{"class":63},"    confidentiality: ",[50,765,766],{"class":80},"\"internal\"",[50,768,141],{"class":63},[50,770,771],{"class":52,"line":156},[50,772,773],{"class":63},"  },\n",[50,775,776],{"class":52,"line":173},[50,777,101],{"class":63},[50,779,780],{"class":52,"line":385},[50,781,108],{"emptyLinePlaceholder":107},[50,783,784],{"class":52,"line":403},[50,785,786],{"class":56},"// Custom tags on agents\n",[50,788,789,791,793],{"class":52,"line":585},[50,790,64],{"class":63},[50,792,68],{"class":67},[50,794,71],{"class":63},[50,796,797,799,801],{"class":52,"line":607},[50,798,77],{"class":63},[50,800,718],{"class":80},[50,802,95],{"class":63},[50,804,805],{"class":52,"line":613},[50,806,738],{"class":63},[50,808,810,812,814],{"class":52,"line":809},17,[50,811,743],{"class":63},[50,813,746],{"class":80},[50,815,141],{"class":63},[50,817,819,822,825],{"class":52,"line":818},18,[50,820,821],{"class":63},"    clearance: ",[50,823,824],{"class":80},"\"confidential\"",[50,826,141],{"class":63},[50,828,830],{"class":52,"line":829},19,[50,831,773],{"class":63},[50,833,835],{"class":52,"line":834},20,[50,836,101],{"class":63},[177,838,840],{"id":839},"custom-tag-patterns","Custom tag patterns",[182,842,843,856],{},[185,844,845],{},[188,846,847,850,853],{},[191,848,849],{},"Pattern",[191,851,852],{},"Example",[191,854,855],{},"Use case",[198,857,858,871,884,897,910],{},[188,859,860,863,868],{},[203,861,862],{},"Department routing",[203,864,865],{},[19,866,867],{},"department: \"legal\"",[203,869,870],{},"Route tasks to department-specific agents",[188,872,873,876,881],{},[203,874,875],{},"Region affinity",[203,877,878],{},[19,879,880],{},"region: \"eu-west\"",[203,882,883],{},"Keep data processing within a geographic region",[188,885,886,889,894],{},[203,887,888],{},"Tenant isolation",[203,890,891],{},[19,892,893],{},"tenantId: \"acme-corp\"",[203,895,896],{},"Multi-tenant agent systems",[188,898,899,902,907],{},[203,900,901],{},"Model selection",[203,903,904],{},[19,905,906],{},"model: \"gpt-4\"",[203,908,909],{},"Route to agents running specific LLM models",[188,911,912,915,920],{},[203,913,914],{},"Confidentiality",[203,916,917],{},[19,918,919],{},"confidentiality: \"internal\"",[203,921,922],{},"Restrict sensitive tasks to cleared agents",[924,925,926],"style",{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":46,"searchDepth":60,"depth":60,"links":928},[929,932,935,938],{"id":26,"depth":60,"text":27,"children":930},[931],{"id":179,"depth":74,"text":180},{"id":285,"depth":60,"text":286,"children":933},[934],{"id":408,"depth":74,"text":409},{"id":455,"depth":60,"text":456,"children":936},[937],{"id":618,"depth":74,"text":619},{"id":685,"depth":60,"text":686,"children":939},[940],{"id":839,"depth":74,"text":840},"Reference guide for capability, priority, status, and custom tags in @nolag/agents.","md",{},"/docs/agents/tags",{"title":5,"description":941},"docs/agents/tags","fz0JvxwqdyYHr3cOhCgL5ZhdVdAPAqNvYkNumB1RuIs",1788160342407]