[{"data":1,"prerenderedAt":3228},["ShallowReactive",2],{"highlight:import \"github.com/zoobz-io/cogito\"\n\n// Create a reasoning thought\nthought := cogito.NewThought(ctx, provider, \"Analyze support ticket\")\n\n// Composable primitives — each builds on accumulated context\npipeline := pipz.NewSequence(pipelineID,\n    cogito.Analyze[TicketAnalysis](\"Extract ticket details\"),\n    cogito.Categorize(\"Classify priority\",\n        \"critical\", \"high\", \"medium\", \"low\",\n    ),\n    cogito.Decide(\"Requires escalation?\"),\n    cogito.Sift(\"Route only critical issues\",\n        cogito.Seek(\"Find similar resolved tickets\", vectorStore),\n    ),\n    cogito.Reflect(\"Summarize findings\"),\n)\n\n// Each step reads previous Notes, adds new ones\nresult, _ := pipeline.Process(ctx, thought)\n\n// Full audit trail — every reasoning step is a Note\nfor _, note := range result.Notes() {\n    fmt.Printf(\"[%s] %s: %s\\n\", note.Source, note.Key, note.Value)\n}":3,"footer-resources":4,"search-sections-cogito":2844,"nav-cogito":3179,"content-tree-cogito":3204,"content-table-nav-cogito":3216},"\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-keyword)\">import\u003C/span>\u003Cspan style=\"color:var(--shiki-string)\"> \"github.com/zoobz-io/cogito\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-comment)\">// Create a reasoning thought\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-text)\">thought\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> :=\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> cogito\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">.\u003C/span>\u003Cspan style=\"color:var(--shiki-function)\">NewThought\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">(\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\">ctx\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> provider\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003Cspan style=\"color:var(--shiki-string)\"> \"Analyze support ticket\"\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-comment)\">// Composable primitives — each builds on accumulated context\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-text)\">pipeline\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> :=\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> pipz\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">.\u003C/span>\u003Cspan style=\"color:var(--shiki-function)\">NewSequence\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">(\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\">pipelineID\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-text)\">    cogito\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">.\u003C/span>\u003Cspan style=\"color:var(--shiki-function)\">Analyze\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">[\u003C/span>\u003Cspan style=\"color:var(--shiki-type)\">TicketAnalysis\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">](\u003C/span>\u003Cspan style=\"color:var(--shiki-string)\">\"Extract ticket details\"\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">),\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-text)\">    cogito\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">.\u003C/span>\u003Cspan style=\"color:var(--shiki-function)\">Categorize\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">(\u003C/span>\u003Cspan style=\"color:var(--shiki-string)\">\"Classify priority\"\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-string)\">        \"critical\"\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003Cspan style=\"color:var(--shiki-string)\"> \"high\"\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003Cspan style=\"color:var(--shiki-string)\"> \"medium\"\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003Cspan style=\"color:var(--shiki-string)\"> \"low\"\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-punctuation)\">    ),\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-text)\">    cogito\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">.\u003C/span>\u003Cspan style=\"color:var(--shiki-function)\">Decide\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">(\u003C/span>\u003Cspan style=\"color:var(--shiki-string)\">\"Requires escalation?\"\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">),\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-text)\">    cogito\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">.\u003C/span>\u003Cspan style=\"color:var(--shiki-function)\">Sift\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">(\u003C/span>\u003Cspan style=\"color:var(--shiki-string)\">\"Route only critical issues\"\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-text)\">        cogito\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">.\u003C/span>\u003Cspan style=\"color:var(--shiki-function)\">Seek\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">(\u003C/span>\u003Cspan style=\"color:var(--shiki-string)\">\"Find similar resolved tickets\"\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> vectorStore\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">),\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-punctuation)\">    ),\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-text)\">    cogito\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">.\u003C/span>\u003Cspan style=\"color:var(--shiki-function)\">Reflect\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">(\u003C/span>\u003Cspan style=\"color:var(--shiki-string)\">\"Summarize findings\"\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">),\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-punctuation)\">)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-comment)\">// Each step reads previous Notes, adds new ones\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-text)\">result\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> _\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> :=\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> pipeline\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">.\u003C/span>\u003Cspan style=\"color:var(--shiki-function)\">Process\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">(\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\">ctx\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> thought\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-comment)\">// Full audit trail — every reasoning step is a Note\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-operator)\">for\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> _\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> note\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> :=\u003C/span>\u003Cspan style=\"color:var(--shiki-operator)\"> range\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> result\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">.\u003C/span>\u003Cspan style=\"color:var(--shiki-function)\">Notes\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">()\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\"> {\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-text)\">    fmt\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">.\u003C/span>\u003Cspan style=\"color:var(--shiki-function)\">Printf\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">(\u003C/span>\u003Cspan style=\"color:var(--shiki-string)\">\"[\u003C/span>\u003Cspan style=\"color:var(--shiki-placeholder)\">%s\u003C/span>\u003Cspan style=\"color:var(--shiki-string)\">] \u003C/span>\u003Cspan style=\"color:var(--shiki-placeholder)\">%s\u003C/span>\u003Cspan style=\"color:var(--shiki-string)\">: \u003C/span>\u003Cspan style=\"color:var(--shiki-placeholder)\">%s\u003C/span>\u003Cspan style=\"color:var(--shiki-tag)\">\\n\u003C/span>\u003Cspan style=\"color:var(--shiki-string)\">\"\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> note\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">.\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\">Source\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> note\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">.\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\">Key\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">,\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\"> note\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">.\u003C/span>\u003Cspan style=\"color:var(--shiki-text)\">Value\u003C/span>\u003Cspan style=\"color:var(--shiki-punctuation)\">)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:var(--shiki-punctuation)\">}\u003C/span>\u003C/span>",[5,1762,2249],{"id":6,"title":7,"body":8,"description":103,"extension":1755,"icon":1756,"meta":1757,"navigation":192,"path":1758,"seo":1759,"stem":1760,"__hash__":1761},"resources/readme.md","README",{"type":9,"value":10,"toc":1739},"minimark",[11,15,83,86,89,94,97,497,505,509,526,529,533,1222,1226,1332,1336,1392,1395,1398,1562,1565,1574,1578,1587,1592,1618,1622,1661,1665,1688,1692,1714,1718,1726,1729,1735],[12,13,14],"h1",{"id":14},"cogito",[16,17,18,29,37,45,53,61,68,75],"p",{},[19,20,24],"a",{"href":21,"rel":22},"https://github.com/zoobz-io/cogito/actions/workflows/ci.yml",[23],"nofollow",[25,26],"img",{"alt":27,"src":28},"CI Status","https://github.com/zoobz-io/cogito/workflows/CI/badge.svg",[19,30,33],{"href":31,"rel":32},"https://codecov.io/gh/zoobz-io/cogito",[23],[25,34],{"alt":35,"src":36},"codecov","https://codecov.io/gh/zoobz-io/cogito/graph/badge.svg?branch=main",[19,38,41],{"href":39,"rel":40},"https://goreportcard.com/report/github.com/zoobz-io/cogito",[23],[25,42],{"alt":43,"src":44},"Go Report Card","https://goreportcard.com/badge/github.com/zoobz-io/cogito",[19,46,49],{"href":47,"rel":48},"https://github.com/zoobz-io/cogito/security/code-scanning",[23],[25,50],{"alt":51,"src":52},"CodeQL","https://github.com/zoobz-io/cogito/workflows/CodeQL/badge.svg",[19,54,57],{"href":55,"rel":56},"https://pkg.go.dev/github.com/zoobz-io/cogito",[23],[25,58],{"alt":59,"src":60},"Go Reference","https://pkg.go.dev/badge/github.com/zoobz-io/cogito.svg",[19,62,64],{"href":63},"LICENSE",[25,65],{"alt":66,"src":67},"License","https://img.shields.io/github/license/zoobz-io/cogito",[19,69,71],{"href":70},"go.mod",[25,72],{"alt":73,"src":74},"Go Version","https://img.shields.io/github/go-mod/go-version/zoobz-io/cogito",[19,76,79],{"href":77,"rel":78},"https://github.com/zoobz-io/cogito/releases",[23],[25,80],{"alt":81,"src":82},"Release","https://img.shields.io/github/v/release/zoobz-io/cogito",[16,84,85],{},"LLM-powered reasoning chains with semantic memory for Go.",[16,87,88],{},"Build autonomous systems that reason, remember, and adapt.",[90,91,93],"h2",{"id":92},"reasoning-that-accumulates","Reasoning That Accumulates",[16,95,96],{},"A Thought is a reasoning context. Primitives read it, reason via LLM, and contribute Notes back. Each step sees what came before.",[98,99,104],"pre",{"className":100,"code":101,"language":102,"meta":103,"style":103},"language-go shiki shiki-themes","thought, _ := cogito.New(ctx, memory, \"should we approve this refund?\")\nthought.SetContent(ctx, \"request\", customerEmail, \"input\")\n\n// Pipeline: each primitive builds on accumulated context\npipeline := cogito.Sequence(\"refund-decision\",\n    cogito.NewAnalyze[RefundRequest](\"parse\", \"extract order ID, amount, and reason\"),\n    cogito.NewSeek(\"history\", \"this customer's previous refund requests\"),\n    cogito.NewDecide(\"approve\", \"does this meet our refund policy?\").\n        WithIntrospection(),\n)\n\nresult, _ := pipeline.Process(ctx, thought)\n\n// Every step left a Note — an auditable chain of reasoning\nfor _, note := range result.AllNotes() {\n    fmt.Printf(\"[%s] %s: %s\\n\", note.Source, note.Key, note.Content)\n}\n// [input] request: \"I'd like a refund for order #12345...\"\n// [analyze] parse: {\"order_id\": \"12345\", \"amount\": 49.99, \"reason\": \"arrived damaged\"}\n// [seek] history: \"No previous refund requests found for this customer\"\n// [decide] approve: \"yes\"\n// [introspect] approve: \"Approved: first-time request, clear damage claim, within policy window\"\n","go","",[105,106,107,156,187,194,201,224,256,278,301,310,315,320,351,356,362,395,461,467,473,479,485,491],"code",{"__ignoreMap":103},[108,109,112,116,120,123,126,129,132,136,139,142,144,147,149,153],"span",{"class":110,"line":111},"line",1,[108,113,115],{"class":114},"sh8_p","thought",[108,117,119],{"class":118},"sq5bi",",",[108,121,122],{"class":114}," _",[108,124,125],{"class":114}," :=",[108,127,128],{"class":114}," cogito",[108,130,131],{"class":118},".",[108,133,135],{"class":134},"s5klm","New",[108,137,138],{"class":118},"(",[108,140,141],{"class":114},"ctx",[108,143,119],{"class":118},[108,145,146],{"class":114}," memory",[108,148,119],{"class":118},[108,150,152],{"class":151},"sxAnc"," \"should we approve this refund?\"",[108,154,155],{"class":118},")\n",[108,157,159,161,163,166,168,170,172,175,177,180,182,185],{"class":110,"line":158},2,[108,160,115],{"class":114},[108,162,131],{"class":118},[108,164,165],{"class":134},"SetContent",[108,167,138],{"class":118},[108,169,141],{"class":114},[108,171,119],{"class":118},[108,173,174],{"class":151}," \"request\"",[108,176,119],{"class":118},[108,178,179],{"class":114}," customerEmail",[108,181,119],{"class":118},[108,183,184],{"class":151}," \"input\"",[108,186,155],{"class":118},[108,188,190],{"class":110,"line":189},3,[108,191,193],{"emptyLinePlaceholder":192},true,"\n",[108,195,197],{"class":110,"line":196},4,[108,198,200],{"class":199},"sLkEo","// Pipeline: each primitive builds on accumulated context\n",[108,202,204,207,209,211,213,216,218,221],{"class":110,"line":203},5,[108,205,206],{"class":114},"pipeline",[108,208,125],{"class":114},[108,210,128],{"class":114},[108,212,131],{"class":118},[108,214,215],{"class":134},"Sequence",[108,217,138],{"class":118},[108,219,220],{"class":151},"\"refund-decision\"",[108,222,223],{"class":118},",\n",[108,225,227,230,232,235,238,242,245,248,250,253],{"class":110,"line":226},6,[108,228,229],{"class":114},"    cogito",[108,231,131],{"class":118},[108,233,234],{"class":134},"NewAnalyze",[108,236,237],{"class":118},"[",[108,239,241],{"class":240},"sYBwO","RefundRequest",[108,243,244],{"class":118},"](",[108,246,247],{"class":151},"\"parse\"",[108,249,119],{"class":118},[108,251,252],{"class":151}," \"extract order ID, amount, and reason\"",[108,254,255],{"class":118},"),\n",[108,257,259,261,263,266,268,271,273,276],{"class":110,"line":258},7,[108,260,229],{"class":114},[108,262,131],{"class":118},[108,264,265],{"class":134},"NewSeek",[108,267,138],{"class":118},[108,269,270],{"class":151},"\"history\"",[108,272,119],{"class":118},[108,274,275],{"class":151}," \"this customer's previous refund requests\"",[108,277,255],{"class":118},[108,279,281,283,285,288,290,293,295,298],{"class":110,"line":280},8,[108,282,229],{"class":114},[108,284,131],{"class":118},[108,286,287],{"class":134},"NewDecide",[108,289,138],{"class":118},[108,291,292],{"class":151},"\"approve\"",[108,294,119],{"class":118},[108,296,297],{"class":151}," \"does this meet our refund policy?\"",[108,299,300],{"class":118},").\n",[108,302,304,307],{"class":110,"line":303},9,[108,305,306],{"class":134},"        WithIntrospection",[108,308,309],{"class":118},"(),\n",[108,311,313],{"class":110,"line":312},10,[108,314,155],{"class":118},[108,316,318],{"class":110,"line":317},11,[108,319,193],{"emptyLinePlaceholder":192},[108,321,323,326,328,330,332,335,337,340,342,344,346,349],{"class":110,"line":322},12,[108,324,325],{"class":114},"result",[108,327,119],{"class":118},[108,329,122],{"class":114},[108,331,125],{"class":114},[108,333,334],{"class":114}," pipeline",[108,336,131],{"class":118},[108,338,339],{"class":134},"Process",[108,341,138],{"class":118},[108,343,141],{"class":114},[108,345,119],{"class":118},[108,347,348],{"class":114}," thought",[108,350,155],{"class":118},[108,352,354],{"class":110,"line":353},13,[108,355,193],{"emptyLinePlaceholder":192},[108,357,359],{"class":110,"line":358},14,[108,360,361],{"class":199},"// Every step left a Note — an auditable chain of reasoning\n",[108,363,365,369,371,373,376,378,381,384,386,389,392],{"class":110,"line":364},15,[108,366,368],{"class":367},"sW3Qg","for",[108,370,122],{"class":114},[108,372,119],{"class":118},[108,374,375],{"class":114}," note",[108,377,125],{"class":114},[108,379,380],{"class":367}," range",[108,382,383],{"class":114}," result",[108,385,131],{"class":118},[108,387,388],{"class":134},"AllNotes",[108,390,391],{"class":118},"()",[108,393,394],{"class":118}," {\n",[108,396,398,401,403,406,408,411,415,418,420,423,425,429,432,434,436,438,441,443,445,447,450,452,454,456,459],{"class":110,"line":397},16,[108,399,400],{"class":114},"    fmt",[108,402,131],{"class":118},[108,404,405],{"class":134},"Printf",[108,407,138],{"class":118},[108,409,410],{"class":151},"\"[",[108,412,414],{"class":413},"scyPU","%s",[108,416,417],{"class":151},"] ",[108,419,414],{"class":413},[108,421,422],{"class":151},": ",[108,424,414],{"class":413},[108,426,428],{"class":427},"suWN2","\\n",[108,430,431],{"class":151},"\"",[108,433,119],{"class":118},[108,435,375],{"class":114},[108,437,131],{"class":118},[108,439,440],{"class":114},"Source",[108,442,119],{"class":118},[108,444,375],{"class":114},[108,446,131],{"class":118},[108,448,449],{"class":114},"Key",[108,451,119],{"class":118},[108,453,375],{"class":114},[108,455,131],{"class":118},[108,457,458],{"class":114},"Content",[108,460,155],{"class":118},[108,462,464],{"class":110,"line":463},17,[108,465,466],{"class":118},"}\n",[108,468,470],{"class":110,"line":469},18,[108,471,472],{"class":199},"// [input] request: \"I'd like a refund for order #12345...\"\n",[108,474,476],{"class":110,"line":475},19,[108,477,478],{"class":199},"// [analyze] parse: {\"order_id\": \"12345\", \"amount\": 49.99, \"reason\": \"arrived damaged\"}\n",[108,480,482],{"class":110,"line":481},20,[108,483,484],{"class":199},"// [seek] history: \"No previous refund requests found for this customer\"\n",[108,486,488],{"class":110,"line":487},21,[108,489,490],{"class":199},"// [decide] approve: \"yes\"\n",[108,492,494],{"class":110,"line":493},22,[108,495,496],{"class":199},"// [introspect] approve: \"Approved: first-time request, clear damage claim, within policy window\"\n",[16,498,499,500,504],{},"Introspection adds a semantic summary explaining ",[501,502,503],"em",{},"why"," — context for subsequent steps or human review. Notes persist with vector embeddings, enabling semantic search across all stored reasoning.",[90,506,508],{"id":507},"install","Install",[98,510,514],{"className":511,"code":512,"language":513,"meta":103,"style":103},"language-bash shiki shiki-themes","go get github.com/zoobz-io/cogito\n","bash",[105,515,516],{"__ignoreMap":103},[108,517,518,520,523],{"class":110,"line":111},[108,519,102],{"class":134},[108,521,522],{"class":151}," get",[108,524,525],{"class":151}," github.com/zoobz-io/cogito\n",[16,527,528],{},"Requires Go 1.21+.",[90,530,532],{"id":531},"quick-start","Quick Start",[98,534,536],{"className":100,"code":535,"language":102,"meta":103,"style":103},"package main\n\nimport (\n    \"context\"\n    \"fmt\"\n    \"log\"\n\n    \"github.com/zoobz-io/cogito\"\n)\n\ntype TicketData struct {\n    CustomerName string   `json:\"customer_name\"`\n    Issue        string   `json:\"issue\"`\n    Urgency      []string `json:\"urgency_indicators\"`\n}\n\nfunc main() {\n    ctx := context.Background()\n\n    // Configure providers\n    cogito.SetProvider(myLLMProvider)\n    cogito.SetEmbedder(cogito.NewOpenAIEmbedder(apiKey))\n\n    // Connect to memory (implement cogito.Memory interface)\n    memory := NewMyMemory()\n\n    // Build a reasoning pipeline\n    pipeline := cogito.Sequence(\"ticket-triage\",\n        cogito.NewAnalyze[TicketData](\"parse\",\n            \"extract customer name, issue description, and urgency indicators\"),\n        cogito.NewSeek(\"history\", \"similar support issues and resolutions\").\n            WithLimit(5),\n        cogito.NewCategorize(\"category\", \"what type of support issue is this?\",\n            []string{\"billing\", \"technical\", \"account\", \"feature_request\"}),\n        cogito.NewAssess(\"urgency\",\n            \"how urgent is this ticket based on tone and content?\"),\n        cogito.NewDecide(\"escalate\",\n            \"should this ticket be escalated to a senior agent?\").\n            WithIntrospection(),\n    )\n\n    // Create a thought with initial context\n    thought, _ := cogito.New(ctx, memory, \"triage support ticket\")\n    thought.SetContent(ctx, \"ticket\", incomingTicket, \"input\")\n\n    // Execute the pipeline\n    result, err := pipeline.Process(ctx, thought)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    // Results are Notes\n    category, _ := result.GetContent(\"category\")\n    escalate, _ := result.GetContent(\"escalate\")\n    fmt.Printf(\"Category: %s, Escalate: %s\\n\", category, escalate)\n}\n",[105,537,538,547,551,560,565,570,575,579,584,588,592,605,617,628,642,646,650,662,680,684,689,705,731,736,742,755,760,766,787,808,816,836,850,872,904,921,929,945,953,961,967,972,978,1011,1040,1045,1051,1080,1096,1114,1120,1125,1131,1156,1180,1217],{"__ignoreMap":103},[108,539,540,544],{"class":110,"line":111},[108,541,543],{"class":542},"sUt3r","package",[108,545,546],{"class":240}," main\n",[108,548,549],{"class":110,"line":158},[108,550,193],{"emptyLinePlaceholder":192},[108,552,553,556],{"class":110,"line":189},[108,554,555],{"class":542},"import",[108,557,559],{"class":558},"soy-K"," (\n",[108,561,562],{"class":110,"line":196},[108,563,564],{"class":151},"    \"context\"\n",[108,566,567],{"class":110,"line":203},[108,568,569],{"class":151},"    \"fmt\"\n",[108,571,572],{"class":110,"line":226},[108,573,574],{"class":151},"    \"log\"\n",[108,576,577],{"class":110,"line":258},[108,578,193],{"emptyLinePlaceholder":192},[108,580,581],{"class":110,"line":280},[108,582,583],{"class":151},"    \"github.com/zoobz-io/cogito\"\n",[108,585,586],{"class":110,"line":303},[108,587,155],{"class":558},[108,589,590],{"class":110,"line":312},[108,591,193],{"emptyLinePlaceholder":192},[108,593,594,597,600,603],{"class":110,"line":317},[108,595,596],{"class":542},"type",[108,598,599],{"class":240}," TicketData",[108,601,602],{"class":542}," struct",[108,604,394],{"class":118},[108,606,607,611,614],{"class":110,"line":322},[108,608,610],{"class":609},"sBGCq","    CustomerName",[108,612,613],{"class":240}," string",[108,615,616],{"class":151},"   `json:\"customer_name\"`\n",[108,618,619,622,625],{"class":110,"line":353},[108,620,621],{"class":609},"    Issue",[108,623,624],{"class":240},"        string",[108,626,627],{"class":151},"   `json:\"issue\"`\n",[108,629,630,633,636,639],{"class":110,"line":358},[108,631,632],{"class":609},"    Urgency",[108,634,635],{"class":118},"      []",[108,637,638],{"class":240},"string",[108,640,641],{"class":151}," `json:\"urgency_indicators\"`\n",[108,643,644],{"class":110,"line":364},[108,645,466],{"class":118},[108,647,648],{"class":110,"line":397},[108,649,193],{"emptyLinePlaceholder":192},[108,651,652,655,658,660],{"class":110,"line":463},[108,653,654],{"class":542},"func",[108,656,657],{"class":134}," main",[108,659,391],{"class":118},[108,661,394],{"class":118},[108,663,664,667,669,672,674,677],{"class":110,"line":469},[108,665,666],{"class":114},"    ctx",[108,668,125],{"class":114},[108,670,671],{"class":114}," context",[108,673,131],{"class":118},[108,675,676],{"class":134},"Background",[108,678,679],{"class":118},"()\n",[108,681,682],{"class":110,"line":475},[108,683,193],{"emptyLinePlaceholder":192},[108,685,686],{"class":110,"line":481},[108,687,688],{"class":199},"    // Configure providers\n",[108,690,691,693,695,698,700,703],{"class":110,"line":487},[108,692,229],{"class":114},[108,694,131],{"class":118},[108,696,697],{"class":134},"SetProvider",[108,699,138],{"class":118},[108,701,702],{"class":114},"myLLMProvider",[108,704,155],{"class":118},[108,706,707,709,711,714,716,718,720,723,725,728],{"class":110,"line":493},[108,708,229],{"class":114},[108,710,131],{"class":118},[108,712,713],{"class":134},"SetEmbedder",[108,715,138],{"class":118},[108,717,14],{"class":114},[108,719,131],{"class":118},[108,721,722],{"class":134},"NewOpenAIEmbedder",[108,724,138],{"class":118},[108,726,727],{"class":114},"apiKey",[108,729,730],{"class":118},"))\n",[108,732,734],{"class":110,"line":733},23,[108,735,193],{"emptyLinePlaceholder":192},[108,737,739],{"class":110,"line":738},24,[108,740,741],{"class":199},"    // Connect to memory (implement cogito.Memory interface)\n",[108,743,745,748,750,753],{"class":110,"line":744},25,[108,746,747],{"class":114},"    memory",[108,749,125],{"class":114},[108,751,752],{"class":134}," NewMyMemory",[108,754,679],{"class":118},[108,756,758],{"class":110,"line":757},26,[108,759,193],{"emptyLinePlaceholder":192},[108,761,763],{"class":110,"line":762},27,[108,764,765],{"class":199},"    // Build a reasoning pipeline\n",[108,767,769,772,774,776,778,780,782,785],{"class":110,"line":768},28,[108,770,771],{"class":114},"    pipeline",[108,773,125],{"class":114},[108,775,128],{"class":114},[108,777,131],{"class":118},[108,779,215],{"class":134},[108,781,138],{"class":118},[108,783,784],{"class":151},"\"ticket-triage\"",[108,786,223],{"class":118},[108,788,790,793,795,797,799,802,804,806],{"class":110,"line":789},29,[108,791,792],{"class":114},"        cogito",[108,794,131],{"class":118},[108,796,234],{"class":134},[108,798,237],{"class":118},[108,800,801],{"class":240},"TicketData",[108,803,244],{"class":118},[108,805,247],{"class":151},[108,807,223],{"class":118},[108,809,811,814],{"class":110,"line":810},30,[108,812,813],{"class":151},"            \"extract customer name, issue description, and urgency indicators\"",[108,815,255],{"class":118},[108,817,819,821,823,825,827,829,831,834],{"class":110,"line":818},31,[108,820,792],{"class":114},[108,822,131],{"class":118},[108,824,265],{"class":134},[108,826,138],{"class":118},[108,828,270],{"class":151},[108,830,119],{"class":118},[108,832,833],{"class":151}," \"similar support issues and resolutions\"",[108,835,300],{"class":118},[108,837,839,842,844,848],{"class":110,"line":838},32,[108,840,841],{"class":134},"            WithLimit",[108,843,138],{"class":118},[108,845,847],{"class":846},"sMAmT","5",[108,849,255],{"class":118},[108,851,853,855,857,860,862,865,867,870],{"class":110,"line":852},33,[108,854,792],{"class":114},[108,856,131],{"class":118},[108,858,859],{"class":134},"NewCategorize",[108,861,138],{"class":118},[108,863,864],{"class":151},"\"category\"",[108,866,119],{"class":118},[108,868,869],{"class":151}," \"what type of support issue is this?\"",[108,871,223],{"class":118},[108,873,875,878,880,883,886,888,891,893,896,898,901],{"class":110,"line":874},34,[108,876,877],{"class":118},"            []",[108,879,638],{"class":240},[108,881,882],{"class":118},"{",[108,884,885],{"class":151},"\"billing\"",[108,887,119],{"class":118},[108,889,890],{"class":151}," \"technical\"",[108,892,119],{"class":118},[108,894,895],{"class":151}," \"account\"",[108,897,119],{"class":118},[108,899,900],{"class":151}," \"feature_request\"",[108,902,903],{"class":118},"}),\n",[108,905,907,909,911,914,916,919],{"class":110,"line":906},35,[108,908,792],{"class":114},[108,910,131],{"class":118},[108,912,913],{"class":134},"NewAssess",[108,915,138],{"class":118},[108,917,918],{"class":151},"\"urgency\"",[108,920,223],{"class":118},[108,922,924,927],{"class":110,"line":923},36,[108,925,926],{"class":151},"            \"how urgent is this ticket based on tone and content?\"",[108,928,255],{"class":118},[108,930,932,934,936,938,940,943],{"class":110,"line":931},37,[108,933,792],{"class":114},[108,935,131],{"class":118},[108,937,287],{"class":134},[108,939,138],{"class":118},[108,941,942],{"class":151},"\"escalate\"",[108,944,223],{"class":118},[108,946,948,951],{"class":110,"line":947},38,[108,949,950],{"class":151},"            \"should this ticket be escalated to a senior agent?\"",[108,952,300],{"class":118},[108,954,956,959],{"class":110,"line":955},39,[108,957,958],{"class":134},"            WithIntrospection",[108,960,309],{"class":118},[108,962,964],{"class":110,"line":963},40,[108,965,966],{"class":118},"    )\n",[108,968,970],{"class":110,"line":969},41,[108,971,193],{"emptyLinePlaceholder":192},[108,973,975],{"class":110,"line":974},42,[108,976,977],{"class":199},"    // Create a thought with initial context\n",[108,979,981,984,986,988,990,992,994,996,998,1000,1002,1004,1006,1009],{"class":110,"line":980},43,[108,982,983],{"class":114},"    thought",[108,985,119],{"class":118},[108,987,122],{"class":114},[108,989,125],{"class":114},[108,991,128],{"class":114},[108,993,131],{"class":118},[108,995,135],{"class":134},[108,997,138],{"class":118},[108,999,141],{"class":114},[108,1001,119],{"class":118},[108,1003,146],{"class":114},[108,1005,119],{"class":118},[108,1007,1008],{"class":151}," \"triage support ticket\"",[108,1010,155],{"class":118},[108,1012,1014,1016,1018,1020,1022,1024,1026,1029,1031,1034,1036,1038],{"class":110,"line":1013},44,[108,1015,983],{"class":114},[108,1017,131],{"class":118},[108,1019,165],{"class":134},[108,1021,138],{"class":118},[108,1023,141],{"class":114},[108,1025,119],{"class":118},[108,1027,1028],{"class":151}," \"ticket\"",[108,1030,119],{"class":118},[108,1032,1033],{"class":114}," incomingTicket",[108,1035,119],{"class":118},[108,1037,184],{"class":151},[108,1039,155],{"class":118},[108,1041,1043],{"class":110,"line":1042},45,[108,1044,193],{"emptyLinePlaceholder":192},[108,1046,1048],{"class":110,"line":1047},46,[108,1049,1050],{"class":199},"    // Execute the pipeline\n",[108,1052,1054,1057,1059,1062,1064,1066,1068,1070,1072,1074,1076,1078],{"class":110,"line":1053},47,[108,1055,1056],{"class":114},"    result",[108,1058,119],{"class":118},[108,1060,1061],{"class":114}," err",[108,1063,125],{"class":114},[108,1065,334],{"class":114},[108,1067,131],{"class":118},[108,1069,339],{"class":134},[108,1071,138],{"class":118},[108,1073,141],{"class":114},[108,1075,119],{"class":118},[108,1077,348],{"class":114},[108,1079,155],{"class":118},[108,1081,1083,1086,1088,1091,1094],{"class":110,"line":1082},48,[108,1084,1085],{"class":367},"    if",[108,1087,1061],{"class":114},[108,1089,1090],{"class":367}," !=",[108,1092,1093],{"class":542}," nil",[108,1095,394],{"class":118},[108,1097,1099,1102,1104,1107,1109,1112],{"class":110,"line":1098},49,[108,1100,1101],{"class":114},"        log",[108,1103,131],{"class":118},[108,1105,1106],{"class":134},"Fatal",[108,1108,138],{"class":118},[108,1110,1111],{"class":114},"err",[108,1113,155],{"class":118},[108,1115,1117],{"class":110,"line":1116},50,[108,1118,1119],{"class":118},"    }\n",[108,1121,1123],{"class":110,"line":1122},51,[108,1124,193],{"emptyLinePlaceholder":192},[108,1126,1128],{"class":110,"line":1127},52,[108,1129,1130],{"class":199},"    // Results are Notes\n",[108,1132,1134,1137,1139,1141,1143,1145,1147,1150,1152,1154],{"class":110,"line":1133},53,[108,1135,1136],{"class":114},"    category",[108,1138,119],{"class":118},[108,1140,122],{"class":114},[108,1142,125],{"class":114},[108,1144,383],{"class":114},[108,1146,131],{"class":118},[108,1148,1149],{"class":134},"GetContent",[108,1151,138],{"class":118},[108,1153,864],{"class":151},[108,1155,155],{"class":118},[108,1157,1159,1162,1164,1166,1168,1170,1172,1174,1176,1178],{"class":110,"line":1158},54,[108,1160,1161],{"class":114},"    escalate",[108,1163,119],{"class":118},[108,1165,122],{"class":114},[108,1167,125],{"class":114},[108,1169,383],{"class":114},[108,1171,131],{"class":118},[108,1173,1149],{"class":134},[108,1175,138],{"class":118},[108,1177,942],{"class":151},[108,1179,155],{"class":118},[108,1181,1183,1185,1187,1189,1191,1194,1196,1199,1201,1203,1205,1207,1210,1212,1215],{"class":110,"line":1182},55,[108,1184,400],{"class":114},[108,1186,131],{"class":118},[108,1188,405],{"class":134},[108,1190,138],{"class":118},[108,1192,1193],{"class":151},"\"Category: ",[108,1195,414],{"class":413},[108,1197,1198],{"class":151},", Escalate: ",[108,1200,414],{"class":413},[108,1202,428],{"class":427},[108,1204,431],{"class":151},[108,1206,119],{"class":118},[108,1208,1209],{"class":114}," category",[108,1211,119],{"class":118},[108,1213,1214],{"class":114}," escalate",[108,1216,155],{"class":118},[108,1218,1220],{"class":110,"line":1219},56,[108,1221,466],{"class":118},[90,1223,1225],{"id":1224},"capabilities","Capabilities",[1227,1228,1229,1245],"table",{},[1230,1231,1232],"thead",{},[1233,1234,1235,1239,1242],"tr",{},[1236,1237,1238],"th",{},"Feature",[1236,1240,1241],{},"Description",[1236,1243,1244],{},"Docs",[1246,1247,1248,1263,1277,1291,1305,1318],"tbody",{},[1233,1249,1250,1254,1257],{},[1251,1252,1253],"td",{},"Reasoning Primitives",[1251,1255,1256],{},"Decide, Analyze, Categorize, Assess, Prioritize",[1251,1258,1259],{},[19,1260,1262],{"href":1261},"docs/learn/primitives","Primitives",[1233,1264,1265,1268,1271],{},[1251,1266,1267],{},"Semantic Control Flow",[1251,1269,1270],{},"Sift (LLM gate) and Discern (LLM router)",[1251,1272,1273],{},[19,1274,1276],{"href":1275},"docs/guides/control-flow","Control Flow",[1233,1278,1279,1282,1285],{},[1251,1280,1281],{},"Memory & Reflection",[1251,1283,1284],{},"Recall, Reflect, Checkpoint, Seek, Survey",[1251,1286,1287],{},[19,1288,1290],{"href":1289},"docs/guides/memory","Memory",[1233,1292,1293,1296,1299],{},[1251,1294,1295],{},"Session Management",[1251,1297,1298],{},"Compress and Truncate for token control",[1251,1300,1301],{},[19,1302,1304],{"href":1303},"docs/guides/sessions","Sessions",[1233,1306,1307,1310,1313],{},[1251,1308,1309],{},"Synthesis",[1251,1311,1312],{},"Amplify (iterative refinement), Converge (parallel synthesis)",[1251,1314,1315],{},[19,1316,1309],{"href":1317},"docs/guides/synthesis",[1233,1319,1320,1323,1326],{},[1251,1321,1322],{},"Two-Phase Reasoning",[1251,1324,1325],{},"Deterministic decisions with optional creative introspection",[1251,1327,1328],{},[19,1329,1331],{"href":1330},"docs/learn/introspection","Introspection",[90,1333,1335],{"id":1334},"why-cogito","Why cogito?",[1337,1338,1339,1352,1358,1364,1370,1382],"ul",{},[1340,1341,1342,1346,1347],"li",{},[1343,1344,1345],"strong",{},"Composable reasoning"," — Chain primitives into pipelines via ",[19,1348,1351],{"href":1349,"rel":1350},"https://github.com/zoobz-io/pipz",[23],"pipz",[1340,1353,1354,1357],{},[1343,1355,1356],{},"Semantic memory"," — Notes persist with vector embeddings for similarity search",[1340,1359,1360,1363],{},[1343,1361,1362],{},"Context accumulation"," — Each step builds on previous reasoning",[1340,1365,1366,1369],{},[1343,1367,1368],{},"Two-phase reasoning"," — Deterministic decisions with optional creative introspection",[1340,1371,1372,1375,1376,1381],{},[1343,1373,1374],{},"Observable"," — Emits ",[19,1377,1380],{"href":1378,"rel":1379},"https://github.com/zoobz-io/capitan",[23],"capitan"," signals throughout execution",[1340,1383,1384,1387,1388,1391],{},[1343,1385,1386],{},"Extensible"," — Implement ",[105,1389,1390],{},"pipz.Chainable[*Thought]"," for custom primitives",[90,1393,1267],{"id":1394},"semantic-control-flow",[16,1396,1397],{},"Traditional pipelines route on data. Cogito routes on meaning.",[98,1399,1401],{"className":100,"code":1400,"language":102,"meta":103,"style":103},"// Sift: LLM decides whether to execute\nurgent := cogito.NewSift(\"urgent-only\",\n    \"is this request time-sensitive?\",\n    expeditedHandler,\n)\n\n// Discern: LLM classifies and routes\nrouter := cogito.NewDiscern(\"route\", \"how should we handle this?\",\n    map[string]pipz.Chainable[*cogito.Thought]{\n        \"approve\": approvalFlow,\n        \"review\":  manualReviewFlow,\n        \"decline\": declineFlow,\n    },\n)\n",[105,1402,1403,1408,1429,1436,1443,1447,1451,1456,1482,1516,1529,1541,1553,1558],{"__ignoreMap":103},[108,1404,1405],{"class":110,"line":111},[108,1406,1407],{"class":199},"// Sift: LLM decides whether to execute\n",[108,1409,1410,1413,1415,1417,1419,1422,1424,1427],{"class":110,"line":158},[108,1411,1412],{"class":114},"urgent",[108,1414,125],{"class":114},[108,1416,128],{"class":114},[108,1418,131],{"class":118},[108,1420,1421],{"class":134},"NewSift",[108,1423,138],{"class":118},[108,1425,1426],{"class":151},"\"urgent-only\"",[108,1428,223],{"class":118},[108,1430,1431,1434],{"class":110,"line":189},[108,1432,1433],{"class":151},"    \"is this request time-sensitive?\"",[108,1435,223],{"class":118},[108,1437,1438,1441],{"class":110,"line":196},[108,1439,1440],{"class":114},"    expeditedHandler",[108,1442,223],{"class":118},[108,1444,1445],{"class":110,"line":203},[108,1446,155],{"class":118},[108,1448,1449],{"class":110,"line":226},[108,1450,193],{"emptyLinePlaceholder":192},[108,1452,1453],{"class":110,"line":258},[108,1454,1455],{"class":199},"// Discern: LLM classifies and routes\n",[108,1457,1458,1461,1463,1465,1467,1470,1472,1475,1477,1480],{"class":110,"line":280},[108,1459,1460],{"class":114},"router",[108,1462,125],{"class":114},[108,1464,128],{"class":114},[108,1466,131],{"class":118},[108,1468,1469],{"class":134},"NewDiscern",[108,1471,138],{"class":118},[108,1473,1474],{"class":151},"\"route\"",[108,1476,119],{"class":118},[108,1478,1479],{"class":151}," \"how should we handle this?\"",[108,1481,223],{"class":118},[108,1483,1484,1487,1489,1491,1494,1496,1498,1501,1503,1506,1508,1510,1513],{"class":110,"line":303},[108,1485,1486],{"class":542},"    map",[108,1488,237],{"class":118},[108,1490,638],{"class":240},[108,1492,1493],{"class":118},"]",[108,1495,1351],{"class":240},[108,1497,131],{"class":118},[108,1499,1500],{"class":240},"Chainable",[108,1502,237],{"class":118},[108,1504,1505],{"class":367},"*",[108,1507,14],{"class":240},[108,1509,131],{"class":118},[108,1511,1512],{"class":240},"Thought",[108,1514,1515],{"class":118},"]{\n",[108,1517,1518,1521,1524,1527],{"class":110,"line":312},[108,1519,1520],{"class":151},"        \"approve\"",[108,1522,1523],{"class":118},":",[108,1525,1526],{"class":114}," approvalFlow",[108,1528,223],{"class":118},[108,1530,1531,1534,1536,1539],{"class":110,"line":317},[108,1532,1533],{"class":151},"        \"review\"",[108,1535,1523],{"class":118},[108,1537,1538],{"class":114},"  manualReviewFlow",[108,1540,223],{"class":118},[108,1542,1543,1546,1548,1551],{"class":110,"line":322},[108,1544,1545],{"class":151},"        \"decline\"",[108,1547,1523],{"class":118},[108,1549,1550],{"class":114}," declineFlow",[108,1552,223],{"class":118},[108,1554,1555],{"class":110,"line":353},[108,1556,1557],{"class":118},"    },\n",[108,1559,1560],{"class":110,"line":358},[108,1561,155],{"class":118},[16,1563,1564],{},"Control flow adapts to domain changes without code changes — the LLM interprets intent.",[16,1566,1567,1568,1573],{},"Integrate with ",[19,1569,1572],{"href":1570,"rel":1571},"https://github.com/zoobz-io/flume",[23],"flume"," for declarative, hot-reloadable pipeline definitions.",[90,1575,1577],{"id":1576},"documentation","Documentation",[1337,1579,1580],{},[1340,1581,1582,1586],{},[19,1583,1585],{"href":1584},"docs/overview","Overview"," — Design philosophy and architecture",[1588,1589,1591],"h3",{"id":1590},"learn","Learn",[1337,1593,1594,1601,1606,1611],{},[1340,1595,1596,1600],{},[19,1597,1599],{"href":1598},"docs/learn/quickstart","Quickstart"," — Build your first reasoning pipeline",[1340,1602,1603,1605],{},[19,1604,1262],{"href":1261}," — Decide, Analyze, Categorize, and more",[1340,1607,1608,1610],{},[19,1609,1331],{"href":1330}," — Two-phase reasoning",[1340,1612,1613,1617],{},[19,1614,1616],{"href":1615},"docs/learn/architecture","Architecture"," — Thought-Note-Memory model",[1588,1619,1621],{"id":1620},"guides","Guides",[1337,1623,1624,1629,1634,1639,1644,1654],{},[1340,1625,1626,1628],{},[19,1627,1276],{"href":1275}," — Sift and Discern for semantic routing",[1340,1630,1631,1633],{},[19,1632,1290],{"href":1289}," — Persistence and semantic search",[1340,1635,1636,1638],{},[19,1637,1304],{"href":1303}," — Token management with Compress and Truncate",[1340,1640,1641,1643],{},[19,1642,1309],{"href":1317}," — Amplify and Converge patterns",[1340,1645,1646,1650,1651],{},[19,1647,1649],{"href":1648},"docs/guides/custom-primitives","Custom Primitives"," — Implementing Chainable",[108,1652,1653],{},"*Thought",[1340,1655,1656,1660],{},[19,1657,1659],{"href":1658},"docs/guides/testing","Testing"," — Testing reasoning pipelines",[1588,1662,1664],{"id":1663},"cookbook","Cookbook",[1337,1666,1667,1674,1681],{},[1340,1668,1669,1673],{},[19,1670,1672],{"href":1671},"docs/cookbook/support-triage","Support Triage"," — Ticket classification and routing",[1340,1675,1676,1680],{},[19,1677,1679],{"href":1678},"docs/cookbook/document-analysis","Document Analysis"," — Extract and reason over documents",[1340,1682,1683,1687],{},[19,1684,1686],{"href":1685},"docs/cookbook/decision-workflows","Decision Workflows"," — Multi-step approval flows",[1588,1689,1691],{"id":1690},"reference","Reference",[1337,1693,1694,1701,1707],{},[1340,1695,1696,1700],{},[19,1697,1699],{"href":1698},"docs/reference/api","API"," — Complete function documentation",[1340,1702,1703,1706],{},[19,1704,1262],{"href":1705},"docs/reference/primitives"," — All primitives with signatures",[1340,1708,1709,1713],{},[19,1710,1712],{"href":1711},"docs/reference/types","Types"," — Thought, Note, Memory, Provider",[90,1715,1717],{"id":1716},"contributing","Contributing",[16,1719,1720,1721,1725],{},"See ",[19,1722,1724],{"href":1723},"CONTRIBUTING","CONTRIBUTING.md"," for guidelines.",[90,1727,66],{"id":1728},"license",[16,1730,1731,1732,1734],{},"MIT License — see ",[19,1733,63],{"href":63}," for details.",[1736,1737,1738],"style",{},"html pre.shiki code .sh8_p, html code.shiki .sh8_p{--shiki-default:var(--shiki-text)}html pre.shiki code .sq5bi, html code.shiki .sq5bi{--shiki-default:var(--shiki-punctuation)}html pre.shiki code .s5klm, html code.shiki .s5klm{--shiki-default:var(--shiki-function)}html pre.shiki code .sxAnc, html code.shiki .sxAnc{--shiki-default:var(--shiki-string)}html pre.shiki code .sLkEo, html code.shiki .sLkEo{--shiki-default:var(--shiki-comment)}html pre.shiki code .sYBwO, html code.shiki .sYBwO{--shiki-default:var(--shiki-type)}html pre.shiki code .sW3Qg, html code.shiki .sW3Qg{--shiki-default:var(--shiki-operator)}html pre.shiki code .scyPU, html code.shiki .scyPU{--shiki-default:var(--shiki-placeholder)}html pre.shiki code .suWN2, html code.shiki .suWN2{--shiki-default:var(--shiki-tag)}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 pre.shiki code .sUt3r, html code.shiki .sUt3r{--shiki-default:var(--shiki-keyword)}html pre.shiki code .soy-K, html code.shiki .soy-K{--shiki-default:#BBBBBB}html pre.shiki code .sBGCq, html code.shiki .sBGCq{--shiki-default:var(--shiki-property)}html pre.shiki code .sMAmT, html code.shiki .sMAmT{--shiki-default:var(--shiki-number)}",{"title":103,"searchDepth":158,"depth":158,"links":1740},[1741,1742,1743,1744,1745,1746,1747,1753,1754],{"id":92,"depth":158,"text":93},{"id":507,"depth":158,"text":508},{"id":531,"depth":158,"text":532},{"id":1224,"depth":158,"text":1225},{"id":1334,"depth":158,"text":1335},{"id":1394,"depth":158,"text":1267},{"id":1576,"depth":158,"text":1577,"children":1748},[1749,1750,1751,1752],{"id":1590,"depth":189,"text":1591},{"id":1620,"depth":189,"text":1621},{"id":1663,"depth":189,"text":1664},{"id":1690,"depth":189,"text":1691},{"id":1716,"depth":158,"text":1717},{"id":1728,"depth":158,"text":66},"md","book-open",{},"/readme",{"title":7,"description":103},"readme","_gzEMeeO91REDqbm1oABQZ78v3ctfqSuyHaxVoS0s78",{"id":1763,"title":1764,"body":1765,"description":103,"extension":1755,"icon":2243,"meta":2244,"navigation":192,"path":2245,"seo":2246,"stem":2247,"__hash__":2248},"resources/security.md","Security",{"type":9,"value":1766,"toc":2228},[1767,1771,1775,1778,1817,1821,1824,1828,1833,1836,1875,1879,1882,1931,1935,1961,1965,1968,1972,1975,2082,2086,2089,2121,2125,2128,2154,2158,2161,2186,2190,2204,2208,2211,2216,2219,2225],[12,1768,1770],{"id":1769},"security-policy","Security Policy",[90,1772,1774],{"id":1773},"supported-versions","Supported Versions",[16,1776,1777],{},"We release patches for security vulnerabilities. Which versions are eligible for receiving such patches depends on the CVSS v3.0 Rating:",[1227,1779,1780,1793],{},[1230,1781,1782],{},[1233,1783,1784,1787,1790],{},[1236,1785,1786],{},"Version",[1236,1788,1789],{},"Supported",[1236,1791,1792],{},"Status",[1246,1794,1795,1806],{},[1233,1796,1797,1800,1803],{},[1251,1798,1799],{},"latest",[1251,1801,1802],{},"✅",[1251,1804,1805],{},"Active development",[1233,1807,1808,1811,1814],{},[1251,1809,1810],{},"\u003C latest",[1251,1812,1813],{},"❌",[1251,1815,1816],{},"Security fixes only for critical issues",[90,1818,1820],{"id":1819},"reporting-a-vulnerability","Reporting a Vulnerability",[16,1822,1823],{},"We take the security of cogito seriously. If you have discovered a security vulnerability in this project, please report it responsibly.",[1588,1825,1827],{"id":1826},"how-to-report","How to Report",[16,1829,1830],{},[1343,1831,1832],{},"Please DO NOT report security vulnerabilities through public GitHub issues.",[16,1834,1835],{},"Instead, please report them via one of the following methods:",[1837,1838,1839,1862],"ol",{},[1340,1840,1841,1844,1845],{},[1343,1842,1843],{},"GitHub Security Advisories"," (Preferred)",[1337,1846,1847,1856,1859],{},[1340,1848,1849,1850,1855],{},"Go to the ",[19,1851,1854],{"href":1852,"rel":1853},"https://github.com/zoobz-io/cogito/security",[23],"Security tab"," of this repository",[1340,1857,1858],{},"Click \"Report a vulnerability\"",[1340,1860,1861],{},"Fill out the form with details about the vulnerability",[1340,1863,1864,1867],{},[1343,1865,1866],{},"Email",[1337,1868,1869,1872],{},[1340,1870,1871],{},"Send details to the repository maintainer through GitHub profile contact information",[1340,1873,1874],{},"Use PGP encryption if possible for sensitive details",[1588,1876,1878],{"id":1877},"what-to-include","What to Include",[16,1880,1881],{},"Please include the following information (as much as you can provide) to help us better understand the nature and scope of the possible issue:",[1337,1883,1884,1890,1896,1902,1908,1913,1919,1925],{},[1340,1885,1886,1889],{},[1343,1887,1888],{},"Type of issue"," (e.g., prompt injection, data leakage, memory exposure, etc.)",[1340,1891,1892,1895],{},[1343,1893,1894],{},"Full paths of source file(s)"," related to the manifestation of the issue",[1340,1897,1898,1901],{},[1343,1899,1900],{},"The location of the affected source code"," (tag/branch/commit or direct URL)",[1340,1903,1904,1907],{},[1343,1905,1906],{},"Any special configuration required"," to reproduce the issue",[1340,1909,1910,1907],{},[1343,1911,1912],{},"Step-by-step instructions",[1340,1914,1915,1918],{},[1343,1916,1917],{},"Proof-of-concept or exploit code"," (if possible)",[1340,1920,1921,1924],{},[1343,1922,1923],{},"Impact of the issue",", including how an attacker might exploit the issue",[1340,1926,1927,1930],{},[1343,1928,1929],{},"Your name and affiliation"," (optional)",[1588,1932,1934],{"id":1933},"what-to-expect","What to Expect",[1337,1936,1937,1943,1949,1955],{},[1340,1938,1939,1942],{},[1343,1940,1941],{},"Acknowledgment",": We will acknowledge receipt of your vulnerability report within 48 hours",[1340,1944,1945,1948],{},[1343,1946,1947],{},"Initial Assessment",": Within 7 days, we will provide an initial assessment of the report",[1340,1950,1951,1954],{},[1343,1952,1953],{},"Resolution Timeline",": We aim to resolve critical issues within 30 days",[1340,1956,1957,1960],{},[1343,1958,1959],{},"Disclosure",": We will coordinate with you on the disclosure timeline",[1588,1962,1964],{"id":1963},"preferred-languages","Preferred Languages",[16,1966,1967],{},"We prefer all communications to be in English.",[90,1969,1971],{"id":1970},"security-best-practices","Security Best Practices",[16,1973,1974],{},"When using cogito in your applications, we recommend:",[1837,1976,1977,1998,2014,2034,2050,2066],{},[1340,1978,1979,1982],{},[1343,1980,1981],{},"Keep Dependencies Updated",[98,1983,1985],{"className":511,"code":1984,"language":513,"meta":103,"style":103},"go get -u github.com/zoobz-io/cogito\n",[105,1986,1987],{"__ignoreMap":103},[108,1988,1989,1991,1993,1996],{"class":110,"line":111},[108,1990,102],{"class":134},[108,1992,522],{"class":151},[108,1994,1995],{"class":542}," -u",[108,1997,525],{"class":151},[1340,1999,2000,2003],{},[1343,2001,2002],{},"Protect LLM Credentials",[1337,2004,2005,2008,2011],{},[1340,2006,2007],{},"Never hardcode API keys in source code",[1340,2009,2010],{},"Use environment variables or secret managers",[1340,2012,2013],{},"Rotate keys regularly",[1340,2015,2016,2019],{},[1343,2017,2018],{},"Validate LLM Outputs",[1337,2020,2021,2024,2027],{},[1340,2022,2023],{},"Treat LLM responses as untrusted input",[1340,2025,2026],{},"Validate extracted data before using in critical paths",[1340,2028,2029,2030,2033],{},"Use typed extraction (Analyze",[108,2031,2032],{},"T",") for structured data",[1340,2035,2036,2039],{},[1343,2037,2038],{},"Memory Security",[1337,2040,2041,2044,2047],{},[1340,2042,2043],{},"Be mindful of what data is persisted to Memory",[1340,2045,2046],{},"Implement access controls at the application layer",[1340,2048,2049],{},"Consider data retention policies for Notes",[1340,2051,2052,2055],{},[1343,2053,2054],{},"Context Management",[1337,2056,2057,2060,2063],{},[1340,2058,2059],{},"Use Compress/Truncate to limit context exposure",[1340,2061,2062],{},"Be aware that Notes accumulate across pipeline steps",[1340,2064,2065],{},"Review what information flows between primitives",[1340,2067,2068,2071],{},[1343,2069,2070],{},"Resource Management",[1337,2072,2073,2076,2079],{},[1340,2074,2075],{},"Use timeouts for all LLM operations",[1340,2077,2078],{},"Implement rate limiting for LLM calls",[1340,2080,2081],{},"Monitor token usage and costs",[90,2083,2085],{"id":2084},"security-features","Security Features",[16,2087,2088],{},"cogito includes several built-in security features:",[1337,2090,2091,2097,2103,2109,2115],{},[1340,2092,2093,2096],{},[1343,2094,2095],{},"Type Safety",": Generic types prevent type confusion in extracted data",[1340,2098,2099,2102],{},[1343,2100,2101],{},"Context Support",": Built-in cancellation and timeout support",[1340,2104,2105,2108],{},[1343,2106,2107],{},"Error Isolation",": Errors are properly wrapped and traced",[1340,2110,2111,2114],{},[1343,2112,2113],{},"Observability",": Full signal emission for audit trails via capitan",[1340,2116,2117,2120],{},[1343,2118,2119],{},"Session Isolation",": Separate LLM sessions prevent context leakage",[90,2122,2124],{"id":2123},"llm-specific-considerations","LLM-Specific Considerations",[16,2126,2127],{},"When building LLM-powered systems:",[1337,2129,2130,2136,2142,2148],{},[1340,2131,2132,2135],{},[1343,2133,2134],{},"Prompt Injection",": Validate and sanitize user inputs before including in prompts",[1340,2137,2138,2141],{},[1343,2139,2140],{},"Data Exfiltration",": Be cautious about what context is sent to external LLM providers",[1340,2143,2144,2147],{},[1343,2145,2146],{},"Hallucination",": Don't trust LLM outputs for security-critical decisions without validation",[1340,2149,2150,2153],{},[1343,2151,2152],{},"Cost Attacks",": Implement safeguards against requests designed to consume excessive tokens",[90,2155,2157],{"id":2156},"automated-security-scanning","Automated Security Scanning",[16,2159,2160],{},"This project uses:",[1337,2162,2163,2168,2174,2180],{},[1340,2164,2165,2167],{},[1343,2166,51],{},": GitHub's semantic code analysis for security vulnerabilities",[1340,2169,2170,2173],{},[1343,2171,2172],{},"Dependabot",": Automated dependency updates",[1340,2175,2176,2179],{},[1343,2177,2178],{},"golangci-lint",": Static analysis including security linters (gosec)",[1340,2181,2182,2185],{},[1343,2183,2184],{},"Codecov",": Coverage tracking to ensure security-critical code is tested",[90,2187,2189],{"id":2188},"vulnerability-disclosure-policy","Vulnerability Disclosure Policy",[1337,2191,2192,2195,2198,2201],{},[1340,2193,2194],{},"Security vulnerabilities will be disclosed via GitHub Security Advisories",[1340,2196,2197],{},"We follow a 90-day disclosure timeline for non-critical issues",[1340,2199,2200],{},"Critical vulnerabilities may be disclosed sooner after patches are available",[1340,2202,2203],{},"We will credit reporters who follow responsible disclosure practices",[90,2205,2207],{"id":2206},"credits","Credits",[16,2209,2210],{},"We thank the following individuals for responsibly disclosing security issues:",[16,2212,2213],{},[501,2214,2215],{},"This list is currently empty. Be the first to help improve our security!",[2217,2218],"hr",{},[16,2220,2221,2224],{},[1343,2222,2223],{},"Last Updated",": 2025-12-05",[1736,2226,2227],{},"html pre.shiki code .s5klm, html code.shiki .s5klm{--shiki-default:var(--shiki-function)}html pre.shiki code .sxAnc, html code.shiki .sxAnc{--shiki-default:var(--shiki-string)}html pre.shiki code .sUt3r, html code.shiki .sUt3r{--shiki-default:var(--shiki-keyword)}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);}",{"title":103,"searchDepth":158,"depth":158,"links":2229},[2230,2231,2237,2238,2239,2240,2241,2242],{"id":1773,"depth":158,"text":1774},{"id":1819,"depth":158,"text":1820,"children":2232},[2233,2234,2235,2236],{"id":1826,"depth":189,"text":1827},{"id":1877,"depth":189,"text":1878},{"id":1933,"depth":189,"text":1934},{"id":1963,"depth":189,"text":1964},{"id":1970,"depth":158,"text":1971},{"id":2084,"depth":158,"text":2085},{"id":2123,"depth":158,"text":2124},{"id":2156,"depth":158,"text":2157},{"id":2188,"depth":158,"text":2189},{"id":2206,"depth":158,"text":2207},"shield",{},"/security",{"title":1764,"description":103},"security","6zBwm9Fdo0qcO3hA3nfDtG2AFdMmkzIR5NE4GGSzxX8",{"id":2250,"title":1717,"body":2251,"description":2259,"extension":1755,"icon":105,"meta":2840,"navigation":192,"path":2841,"seo":2842,"stem":1716,"__hash__":2843},"resources/contributing.md",{"type":9,"value":2252,"toc":2814},[2253,2257,2260,2264,2267,2271,2309,2313,2317,2335,2338,2354,2356,2367,2371,2375,2389,2393,2404,2408,2413,2416,2435,2439,2442,2459,2463,2466,2480,2484,2512,2515,2518,2533,2536,2552,2555,2571,2575,2583,2587,2590,2634,2638,2642,2645,2656,2659,2673,2677,2680,2708,2712,2738,2742,2769,2775,2779,2782,2793,2797,2808,2811],[12,2254,2256],{"id":2255},"contributing-to-cogito","Contributing to cogito",[16,2258,2259],{},"Thank you for your interest in contributing to cogito! This guide will help you get started.",[90,2261,2263],{"id":2262},"code-of-conduct","Code of Conduct",[16,2265,2266],{},"By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors.",[90,2268,2270],{"id":2269},"getting-started","Getting Started",[1837,2272,2273,2276,2282,2288,2291,2297,2300,2306],{},[1340,2274,2275],{},"Fork the repository",[1340,2277,2278,2279],{},"Clone your fork: ",[105,2280,2281],{},"git clone https://github.com/yourusername/cogito.git",[1340,2283,2284,2285],{},"Create a feature branch: ",[105,2286,2287],{},"git checkout -b feature/your-feature-name",[1340,2289,2290],{},"Make your changes",[1340,2292,2293,2294],{},"Run tests: ",[105,2295,2296],{},"go test ./...",[1340,2298,2299],{},"Commit your changes with a descriptive message",[1340,2301,2302,2303],{},"Push to your fork: ",[105,2304,2305],{},"git push origin feature/your-feature-name",[1340,2307,2308],{},"Create a Pull Request",[90,2310,2312],{"id":2311},"development-guidelines","Development Guidelines",[1588,2314,2316],{"id":2315},"code-style","Code Style",[1337,2318,2319,2322,2329,2332],{},[1340,2320,2321],{},"Follow standard Go conventions",[1340,2323,2324,2325,2328],{},"Run ",[105,2326,2327],{},"go fmt"," before committing",[1340,2330,2331],{},"Add comments for exported functions and types",[1340,2333,2334],{},"Keep functions small and focused",[1588,2336,1659],{"id":2337},"testing",[1337,2339,2340,2343,2348,2351],{},[1340,2341,2342],{},"Write tests for new functionality",[1340,2344,2345,2346],{},"Ensure all tests pass: ",[105,2347,2296],{},[1340,2349,2350],{},"Include benchmarks for performance-critical code",[1340,2352,2353],{},"Aim for good test coverage",[1588,2355,1577],{"id":1576},[1337,2357,2358,2361,2364],{},[1340,2359,2360],{},"Update documentation for API changes",[1340,2362,2363],{},"Add examples for new features",[1340,2365,2366],{},"Keep doc comments clear and concise",[90,2368,2370],{"id":2369},"types-of-contributions","Types of Contributions",[1588,2372,2374],{"id":2373},"bug-reports","Bug Reports",[1337,2376,2377,2380,2383,2386],{},[1340,2378,2379],{},"Use GitHub Issues",[1340,2381,2382],{},"Include minimal reproduction code",[1340,2384,2385],{},"Describe expected vs actual behavior",[1340,2387,2388],{},"Include Go version and OS",[1588,2390,2392],{"id":2391},"feature-requests","Feature Requests",[1337,2394,2395,2398,2401],{},[1340,2396,2397],{},"Open an issue for discussion first",[1340,2399,2400],{},"Explain the use case",[1340,2402,2403],{},"Consider backwards compatibility",[1588,2405,2407],{"id":2406},"code-contributions","Code Contributions",[2409,2410,2412],"h4",{"id":2411},"adding-primitives","Adding Primitives",[16,2414,2415],{},"New reasoning primitives should:",[1337,2417,2418,2423,2426,2429,2432],{},[1340,2419,2420,2421],{},"Implement ",[105,2422,1390],{},[1340,2424,2425],{},"Follow the existing pattern (two-phase reasoning with optional introspection)",[1340,2427,2428],{},"Emit appropriate capitan signals",[1340,2430,2431],{},"Include comprehensive tests",[1340,2433,2434],{},"Add documentation with examples",[2409,2436,2438],{"id":2437},"adding-memory-implementations","Adding Memory Implementations",[16,2440,2441],{},"New Memory implementations should:",[1337,2443,2444,2450,2453,2456],{},[1340,2445,2446,2447,2449],{},"Implement the ",[105,2448,1290],{}," interface fully",[1340,2451,2452],{},"Handle semantic search via vector embeddings",[1340,2454,2455],{},"Include tests for all operations",[1340,2457,2458],{},"Document any infrastructure requirements",[2409,2460,2462],{"id":2461},"examples","Examples",[16,2464,2465],{},"New examples should:",[1337,2467,2468,2471,2474,2477],{},[1340,2469,2470],{},"Solve a real-world reasoning problem",[1340,2472,2473],{},"Include tests",[1340,2475,2476],{},"Have a descriptive README",[1340,2478,2479],{},"Follow the existing structure",[90,2481,2483],{"id":2482},"pull-request-process","Pull Request Process",[1837,2485,2486,2492,2497,2502,2507],{},[1340,2487,2488,2491],{},[1343,2489,2490],{},"Keep PRs focused"," - One feature/fix per PR",[1340,2493,2494],{},[1343,2495,2496],{},"Write descriptive commit messages",[1340,2498,2499],{},[1343,2500,2501],{},"Update tests and documentation",[1340,2503,2504],{},[1343,2505,2506],{},"Ensure CI passes",[1340,2508,2509],{},[1343,2510,2511],{},"Respond to review feedback",[90,2513,1659],{"id":2514},"testing-1",[16,2516,2517],{},"Run the full test suite:",[98,2519,2521],{"className":511,"code":2520,"language":513,"meta":103,"style":103},"go test ./...\n",[105,2522,2523],{"__ignoreMap":103},[108,2524,2525,2527,2530],{"class":110,"line":111},[108,2526,102],{"class":134},[108,2528,2529],{"class":151}," test",[108,2531,2532],{"class":151}," ./...\n",[16,2534,2535],{},"Run with race detection:",[98,2537,2539],{"className":511,"code":2538,"language":513,"meta":103,"style":103},"go test -race ./...\n",[105,2540,2541],{"__ignoreMap":103},[108,2542,2543,2545,2547,2550],{"class":110,"line":111},[108,2544,102],{"class":134},[108,2546,2529],{"class":151},[108,2548,2549],{"class":542}," -race",[108,2551,2532],{"class":151},[16,2553,2554],{},"Run benchmarks:",[98,2556,2558],{"className":511,"code":2557,"language":513,"meta":103,"style":103},"go test -bench=. ./...\n",[105,2559,2560],{"__ignoreMap":103},[108,2561,2562,2564,2566,2569],{"class":110,"line":111},[108,2563,102],{"class":134},[108,2565,2529],{"class":151},[108,2567,2568],{"class":542}," -bench=.",[108,2570,2532],{"class":151},[90,2572,2574],{"id":2573},"project-structure","Project Structure",[98,2576,2581],{"className":2577,"code":2579,"language":2580},[2578],"language-text","cogito/\n├── *.go              # Core library files (primitives, thought, memory)\n├── *_test.go         # Tests\n├── *_bench_test.go   # Benchmarks\n└── docs/             # Documentation\n","text",[105,2582,2579],{"__ignoreMap":103},[90,2584,2586],{"id":2585},"commit-messages","Commit Messages",[16,2588,2589],{},"Follow conventional commits:",[1337,2591,2592,2598,2604,2610,2616,2622,2628],{},[1340,2593,2594,2597],{},[105,2595,2596],{},"feat:"," New feature",[1340,2599,2600,2603],{},[105,2601,2602],{},"fix:"," Bug fix",[1340,2605,2606,2609],{},[105,2607,2608],{},"docs:"," Documentation changes",[1340,2611,2612,2615],{},[105,2613,2614],{},"test:"," Test additions/changes",[1340,2617,2618,2621],{},[105,2619,2620],{},"refactor:"," Code refactoring",[1340,2623,2624,2627],{},[105,2625,2626],{},"perf:"," Performance improvements",[1340,2629,2630,2633],{},[105,2631,2632],{},"chore:"," Maintenance tasks",[90,2635,2637],{"id":2636},"release-process","Release Process",[1588,2639,2641],{"id":2640},"automated-releases","Automated Releases",[16,2643,2644],{},"This project uses automated release versioning. To create a release:",[1837,2646,2647,2650,2653],{},[1340,2648,2649],{},"Go to Actions → Release → Run workflow",[1340,2651,2652],{},"Leave \"Version override\" empty for automatic version inference",[1340,2654,2655],{},"Click \"Run workflow\"",[16,2657,2658],{},"The system will:",[1337,2660,2661,2664,2667,2670],{},[1340,2662,2663],{},"Automatically determine the next version from conventional commits",[1340,2665,2666],{},"Create a git tag",[1340,2668,2669],{},"Generate release notes via GoReleaser",[1340,2671,2672],{},"Publish the release to GitHub",[1588,2674,2676],{"id":2675},"manual-release-legacy","Manual Release (Legacy)",[16,2678,2679],{},"You can still create releases manually:",[98,2681,2683],{"className":511,"code":2682,"language":513,"meta":103,"style":103},"git tag v1.2.3\ngit push origin v1.2.3\n",[105,2684,2685,2696],{"__ignoreMap":103},[108,2686,2687,2690,2693],{"class":110,"line":111},[108,2688,2689],{"class":134},"git",[108,2691,2692],{"class":151}," tag",[108,2694,2695],{"class":151}," v1.2.3\n",[108,2697,2698,2700,2703,2706],{"class":110,"line":158},[108,2699,2689],{"class":134},[108,2701,2702],{"class":151}," push",[108,2704,2705],{"class":151}," origin",[108,2707,2695],{"class":151},[1588,2709,2711],{"id":2710},"known-limitations","Known Limitations",[1337,2713,2714,2720,2726],{},[1340,2715,2716,2719],{},[1343,2717,2718],{},"Protected branches",": The automated release cannot bypass branch protection rules. This is by design for security.",[1340,2721,2722,2725],{},[1343,2723,2724],{},"Concurrent releases",": Rapid successive releases may fail. Simply retry after a moment.",[1340,2727,2728,2731,2732,2734,2735,2737],{},[1343,2729,2730],{},"Conventional commits required",": Version inference requires conventional commit format (",[105,2733,2596],{},", ",[105,2736,2602],{},", etc.)",[1588,2739,2741],{"id":2740},"commit-conventions-for-versioning","Commit Conventions for Versioning",[1337,2743,2744,2749,2754,2760],{},[1340,2745,2746,2748],{},[105,2747,2596],{}," new features (minor version: 1.2.0 → 1.3.0)",[1340,2750,2751,2753],{},[105,2752,2602],{}," bug fixes (patch version: 1.2.0 → 1.2.1)",[1340,2755,2756,2759],{},[105,2757,2758],{},"feat!:"," breaking changes (major version: 1.2.0 → 2.0.0)",[1340,2761,2762,2734,2764,2734,2766,2768],{},[105,2763,2608],{},[105,2765,2614],{},[105,2767,2632],{}," no version change",[16,2770,2771,2772],{},"Example: ",[105,2773,2774],{},"feat(primitive): add Summarize primitive for context condensation",[1588,2776,2778],{"id":2777},"version-preview-on-pull-requests","Version Preview on Pull Requests",[16,2780,2781],{},"Every PR automatically shows the next version that will be created:",[1337,2783,2784,2787,2790],{},[1340,2785,2786],{},"Check PR comments for \"Version Preview\"",[1340,2788,2789],{},"Updates automatically as you add commits",[1340,2791,2792],{},"Helps verify your commits have the intended effect",[90,2794,2796],{"id":2795},"questions","Questions?",[1337,2798,2799,2802,2805],{},[1340,2800,2801],{},"Open an issue for questions",[1340,2803,2804],{},"Check existing issues first",[1340,2806,2807],{},"Be patient and respectful",[16,2809,2810],{},"Thank you for contributing to cogito!",[1736,2812,2813],{},"html pre.shiki code .s5klm, html code.shiki .s5klm{--shiki-default:var(--shiki-function)}html pre.shiki code .sxAnc, html code.shiki .sxAnc{--shiki-default:var(--shiki-string)}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 pre.shiki code .sUt3r, html code.shiki .sUt3r{--shiki-default:var(--shiki-keyword)}",{"title":103,"searchDepth":158,"depth":158,"links":2815},[2816,2817,2818,2823,2828,2829,2830,2831,2832,2839],{"id":2262,"depth":158,"text":2263},{"id":2269,"depth":158,"text":2270},{"id":2311,"depth":158,"text":2312,"children":2819},[2820,2821,2822],{"id":2315,"depth":189,"text":2316},{"id":2337,"depth":189,"text":1659},{"id":1576,"depth":189,"text":1577},{"id":2369,"depth":158,"text":2370,"children":2824},[2825,2826,2827],{"id":2373,"depth":189,"text":2374},{"id":2391,"depth":189,"text":2392},{"id":2406,"depth":189,"text":2407},{"id":2482,"depth":158,"text":2483},{"id":2514,"depth":158,"text":1659},{"id":2573,"depth":158,"text":2574},{"id":2585,"depth":158,"text":2586},{"id":2636,"depth":158,"text":2637,"children":2833},[2834,2835,2836,2837,2838],{"id":2640,"depth":189,"text":2641},{"id":2675,"depth":189,"text":2676},{"id":2710,"depth":189,"text":2711},{"id":2740,"depth":189,"text":2741},{"id":2777,"depth":189,"text":2778},{"id":2795,"depth":158,"text":2796},{},"/contributing",{"title":1717,"description":2259},"X10dJScFliwaj37mqg0fRDjrKtaT5I_WsQfb2noWE00",[2845,2849,2853,2858,2863,2868,2872,2877,2881,2885,2890,2895,2899,2904,2909,2914,2918,2923,2927,2931,2936,2941,2946,2951,2956,2961,2966,2971,2975,2979,2983,2987,2992,2997,3002,3007,3012,3017,3022,3026,3030,3034,3039,3043,3048,3052,3056,3060,3065,3070,3074,3077,3081,3086,3091,3096,3101,3106,3109,3114,3119,3123,3128,3131,3136,3141,3146,3149,3154,3159,3164,3169,3174],{"id":2846,"title":1585,"titles":2847,"content":2848,"level":111},"/v0.0.6/overview",[],"Introduction to cogito - LLM-powered reasoning chains for Go",{"id":2850,"title":14,"titles":2851,"content":2852,"level":111},"/v0.0.6/overview#cogito",[],"LLM-powered reasoning chains for Go.",{"id":2854,"title":2855,"titles":2856,"content":2857,"level":158},"/v0.0.6/overview#what-is-cogito","What is cogito?",[14],"cogito provides a framework for building autonomous systems that reason and adapt. It implements a Thought-Note architecture where: Thought represents a reasoning context that accumulates information across pipeline stepsNote captures atomic units of information as key-value pairs with metadata",{"id":2859,"title":2860,"titles":2861,"content":2862,"level":158},"/v0.0.6/overview#key-features","Key Features",[14],"Composable reasoning - Chain primitives like Decide, Analyze, Categorize into pipelinesContext accumulation - Each step builds on previous reasoningTwo-phase reasoning - Deterministic decisions with optional creative introspectionPipeline integration - Built on pipz for orchestrationObservable - Emits capitan signals throughout executionExtensible - Implement custom primitives for domain-specific reasoning",{"id":2864,"title":2865,"titles":2866,"content":2867,"level":158},"/v0.0.6/overview#when-to-use-cogito","When to Use cogito",[14],"cogito is ideal for: Customer support automation with context-aware routingDocument analysis with semantic categorizationDecision systems requiring audit trailsMulti-step reasoning pipelines",{"id":2869,"title":1616,"titles":2870,"content":2871,"level":158},"/v0.0.6/overview#architecture",[14],"┌─────────────────────────────────────────────────────────┐\n│                        Pipeline                          │\n│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐ │\n│  │ Analyze  │──│ Decide   │──│Categorize│──│  Assess  │ │\n│  └──────────┘  └──────────┘  └──────────┘  └──────────┘ │\n└─────────────────────────────────────────────────────────┘\n                           │\n                           ▼\n┌─────────────────────────────────────────────────────────┐\n│                       Thought                            │\n│  ┌────────────────────────────────────────────────────┐ │\n│  │ Notes: [input, analysis, decision, category, ...]  │ │\n│  │ Session: LLM conversation state                    │ │\n│  └────────────────────────────────────────────────────┘ │\n└─────────────────────────────────────────────────────────┘",{"id":2873,"title":2874,"titles":2875,"content":2876,"level":158},"/v0.0.6/overview#next-steps","Next Steps",[14],"Quickstart - Get started in 5 minutesCore Concepts - Understand Thought and NoteArchitecture - Deep dive into system design",{"id":2878,"title":1599,"titles":2879,"content":2880,"level":111},"/v0.0.6/learn/quickstart",[],"Get started with cogito in 5 minutes",{"id":2882,"title":1599,"titles":2883,"content":2884,"level":111},"/v0.0.6/learn/quickstart#quickstart",[],"Get cogito running in your project in 5 minutes.",{"id":2886,"title":2887,"titles":2888,"content":2889,"level":158},"/v0.0.6/learn/quickstart#prerequisites","Prerequisites",[1599],"Go 1.24 or laterAn LLM provider (OpenAI, Anthropic, or compatible)",{"id":2891,"title":2892,"titles":2893,"content":2894,"level":158},"/v0.0.6/learn/quickstart#installation","Installation",[1599],"go get github.com/zoobz-io/cogito",{"id":2896,"title":2897,"titles":2898,"content":103,"level":158},"/v0.0.6/learn/quickstart#basic-usage","Basic Usage",[1599],{"id":2900,"title":2901,"titles":2902,"content":2903,"level":189},"/v0.0.6/learn/quickstart#_1-configure-provider","1. Configure Provider",[1599,2897],"package main\n\nimport (\n    \"context\"\n    \"github.com/zoobz-io/cogito\"\n    \"github.com/zoobz-io/zyn/provider/openai\"\n)\n\nfunc main() {\n    // Set up LLM provider\n    provider := openai.New(os.Getenv(\"OPENAI_API_KEY\"))\n    cogito.SetProvider(provider)\n}",{"id":2905,"title":2906,"titles":2907,"content":2908,"level":189},"/v0.0.6/learn/quickstart#_2-create-and-process-a-thought","2. Create and Process a Thought",[1599,2897],"func processTicket(ctx context.Context, ticketText string) error {\n    // Create a thought\n    thought := cogito.New(ctx, \"triage support ticket\")\n\n    // Add initial context\n    thought.SetContent(ctx, \"ticket\", ticketText, \"input\")\n\n    // Build a pipeline\n    pipeline := cogito.Sequence(pipz.NewIdentity(\"ticket-triage\", \"Triage support tickets\"),\n        cogito.NewAnalyze[TicketData](\"parse\", \"extract customer info and issue\"),\n        cogito.NewCategorize(\"category\", \"what type of issue?\",\n            []string{\"billing\", \"technical\", \"account\"}),\n        cogito.NewDecide(\"escalate\", \"should this be escalated?\").\n            WithIntrospection(),\n    )\n\n    // Process\n    result, err := pipeline.Process(ctx, thought)\n    if err != nil {\n        return err\n    }\n\n    // Read results\n    category, _ := result.GetContent(\"category\")\n    escalate, _ := result.GetContent(\"escalate\")\n\n    fmt.Printf(\"Category: %s, Escalate: %s\\n\", category, escalate)\n    return nil\n}",{"id":2910,"title":2911,"titles":2912,"content":2913,"level":158},"/v0.0.6/learn/quickstart#complete-example","Complete Example",[1599],"package main\n\nimport (\n    \"context\"\n    \"fmt\"\n    \"log\"\n    \"os\"\n\n    \"github.com/zoobz-io/cogito\"\n    \"github.com/zoobz-io/zyn/provider/openai\"\n)\n\ntype TicketData struct {\n    CustomerName string `json:\"customer_name\"`\n    Issue        string `json:\"issue\"`\n    Urgency      string `json:\"urgency\"`\n}\n\nfunc main() {\n    ctx := context.Background()\n\n    // Configure provider\n    provider := openai.New(os.Getenv(\"OPENAI_API_KEY\"))\n    cogito.SetProvider(provider)\n\n    // Create thought\n    thought := cogito.New(ctx, \"analyse feedback\")\n\n    // Add input\n    thought.SetContent(ctx, \"feedback\", \"Your product is amazing!\", \"input\")\n\n    // Simple decision\n    decide := cogito.NewDecide(\"positive\", \"is this positive feedback?\")\n    result, err := decide.Process(ctx, thought)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    positive, _ := result.GetContent(\"positive\")\n    fmt.Printf(\"Positive feedback: %s\\n\", positive)\n}",{"id":2915,"title":2874,"titles":2916,"content":2917,"level":158},"/v0.0.6/learn/quickstart#next-steps",[1599],"Core Concepts - Understand Thought and NoteArchitecture - System design deep diveAPI Reference - Complete API documentation html pre.shiki code .sUt3r, html code.shiki .sUt3r{--shiki-default:var(--shiki-keyword)}html pre.shiki code .sYBwO, html code.shiki .sYBwO{--shiki-default:var(--shiki-type)}html pre.shiki code .soy-K, html code.shiki .soy-K{--shiki-default:#BBBBBB}html pre.shiki code .sxAnc, html code.shiki .sxAnc{--shiki-default:var(--shiki-string)}html pre.shiki code .s5klm, html code.shiki .s5klm{--shiki-default:var(--shiki-function)}html pre.shiki code .sq5bi, html code.shiki .sq5bi{--shiki-default:var(--shiki-punctuation)}html pre.shiki code .sLkEo, html code.shiki .sLkEo{--shiki-default:var(--shiki-comment)}html pre.shiki code .sh8_p, html code.shiki .sh8_p{--shiki-default:var(--shiki-text)}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 pre.shiki code .sSYET, html code.shiki .sSYET{--shiki-default:var(--shiki-parameter)}html pre.shiki code .sW3Qg, html code.shiki .sW3Qg{--shiki-default:var(--shiki-operator)}html pre.shiki code .scyPU, html code.shiki .scyPU{--shiki-default:var(--shiki-placeholder)}html pre.shiki code .suWN2, html code.shiki .suWN2{--shiki-default:var(--shiki-tag)}html pre.shiki code .sBGCq, html code.shiki .sBGCq{--shiki-default:var(--shiki-property)}",{"id":2919,"title":2920,"titles":2921,"content":2922,"level":111},"/v0.0.6/learn/concepts","Core Concepts",[],"Understanding Thought and Note in cogito",{"id":2924,"title":2920,"titles":2925,"content":2926,"level":111},"/v0.0.6/learn/concepts#core-concepts",[],"cogito is built around two core concepts: Thought and Note.",{"id":2928,"title":1512,"titles":2929,"content":2930,"level":158},"/v0.0.6/learn/concepts#thought",[2920],"A Thought represents the rolling context of a reasoning chain. It maintains: An append-only log of NotesA tracking cursor for published vs unpublished NotesAn LLM session for conversation continuity // Create a thought\nthought := cogito.New(ctx, \"analyse document\")\n\n// Thoughts have identity\nfmt.Println(thought.ID)       // Auto-generated UUID\nfmt.Println(thought.TraceID)  // Auto-generated trace ID\nfmt.Println(thought.Intent)   // \"analyse document\"",{"id":2932,"title":2933,"titles":2934,"content":2935,"level":189},"/v0.0.6/learn/concepts#thought-lifecycle","Thought Lifecycle",[2920,1512],"Creation - New() creates a thought with auto-generated IDNote Accumulation - Primitives add notes via SetContent()Processing - Primitives read context from notes, call LLM, write resultsPublication - Notes are marked as \"published\" after being sent to LLM",{"id":2937,"title":2938,"titles":2939,"content":2940,"level":189},"/v0.0.6/learn/concepts#cloning-for-parallel-processing","Cloning for Parallel Processing",[2920,1512],"Thoughts can be cloned for parallel execution: clone := thought.Clone()\n// Clone has independent notes and session\n// Modifications don't affect the original",{"id":2942,"title":2943,"titles":2944,"content":2945,"level":158},"/v0.0.6/learn/concepts#note","Note",[2920],"Notes are atomic units of information in the reasoning chain: type Note struct {\n    ID        string            // Auto-generated UUID\n    ThoughtID string            // Parent thought\n    Key       string            // Lookup key\n    Content   string            // String content (everything is text in LLM space)\n    Metadata  map[string]string // Structured extension\n    Source    string            // Origin primitive\n    Created   time.Time         // Timestamp\n}",{"id":2947,"title":2948,"titles":2949,"content":2950,"level":189},"/v0.0.6/learn/concepts#adding-notes","Adding Notes",[2920,2943],"// Simple content\nthought.SetContent(ctx, \"summary\", \"Customer requests refund\", \"analyze\")\n\n// With metadata\nthought.SetNote(ctx, \"decision\", \"approved\", \"decide\", map[string]string{\n    \"confidence\": \"0.95\",\n    \"reasoning\":  \"Clear policy violation\",\n})",{"id":2952,"title":2953,"titles":2954,"content":2955,"level":189},"/v0.0.6/learn/concepts#reading-notes","Reading Notes",[2920,2943],"// Get content by key\ncontent, err := thought.GetContent(\"summary\")\n\n// Get full note\nnote, ok := thought.GetNote(\"decision\")\nif ok {\n    fmt.Println(note.Metadata[\"confidence\"])\n}\n\n// Get all notes\nnotes := thought.AllNotes()",{"id":2957,"title":2958,"titles":2959,"content":2960,"level":189},"/v0.0.6/learn/concepts#published-vs-unpublished","Published vs Unpublished",[2920,2943],"Notes track whether they've been sent to the LLM: // Get notes not yet sent to LLM\nunpublished := thought.GetUnpublishedNotes()\n\n// After processing, mark as published\nthought.MarkNotesPublished(ctx) This prevents redundant context in multi-step pipelines.",{"id":2962,"title":2963,"titles":2964,"content":2965,"level":158},"/v0.0.6/learn/concepts#provider","Provider",[2920],"Providers handle LLM communication: type Provider interface {\n    Call(ctx context.Context, messages []zyn.Message, temperature float32) (*zyn.ProviderResponse, error)\n    Name() string\n}",{"id":2967,"title":2968,"titles":2969,"content":2970,"level":189},"/v0.0.6/learn/concepts#resolution-hierarchy","Resolution Hierarchy",[2920,2963],"Step-level: .WithProvider(p)Context: cogito.WithProvider(ctx, p)Global: cogito.SetProvider(p) // Global default\ncogito.SetProvider(defaultProvider)\n\n// Context override\nctx = cogito.WithProvider(ctx, specialProvider)\n\n// Step override\ndecide := cogito.NewDecide(\"key\", \"question\").WithProvider(customProvider)",{"id":2972,"title":2874,"titles":2973,"content":2974,"level":158},"/v0.0.6/learn/concepts#next-steps",[2920],"Architecture - System design deep diveAPI Reference - Complete API documentation html pre.shiki code .sLkEo, html code.shiki .sLkEo{--shiki-default:var(--shiki-comment)}html pre.shiki code .sh8_p, html code.shiki .sh8_p{--shiki-default:var(--shiki-text)}html pre.shiki code .sq5bi, html code.shiki .sq5bi{--shiki-default:var(--shiki-punctuation)}html pre.shiki code .s5klm, html code.shiki .s5klm{--shiki-default:var(--shiki-function)}html pre.shiki code .sxAnc, html code.shiki .sxAnc{--shiki-default:var(--shiki-string)}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 pre.shiki code .sUt3r, html code.shiki .sUt3r{--shiki-default:var(--shiki-keyword)}html pre.shiki code .sYBwO, html code.shiki .sYBwO{--shiki-default:var(--shiki-type)}html pre.shiki code .sBGCq, html code.shiki .sBGCq{--shiki-default:var(--shiki-property)}html pre.shiki code .sW3Qg, html code.shiki .sW3Qg{--shiki-default:var(--shiki-operator)}html pre.shiki code .sSYET, html code.shiki .sSYET{--shiki-default:var(--shiki-parameter)}",{"id":2976,"title":1616,"titles":2977,"content":2978,"level":111},"/v0.0.6/learn/architecture",[],"System design and architecture of cogito",{"id":2980,"title":1616,"titles":2981,"content":2982,"level":111},"/v0.0.6/learn/architecture#architecture",[],"This document describes the system design and architectural decisions in cogito.",{"id":2984,"title":2985,"titles":2986,"content":103,"level":158},"/v0.0.6/learn/architecture#design-principles","Design Principles",[1616],{"id":2988,"title":2989,"titles":2990,"content":2991,"level":189},"/v0.0.6/learn/architecture#_1-everything-is-text","1. Everything is Text",[1616,2985],"In LLM space, all information is fundamentally text-based. Notes store content as strings, and structured data is extracted through typed primitives like Analyze[T].",{"id":2993,"title":2994,"titles":2995,"content":2996,"level":189},"/v0.0.6/learn/architecture#_2-append-only-notes","2. Append-Only Notes",[1616,2985],"Thoughts maintain an append-only log of Notes. If a key is reused, the new note becomes the current value, but history is preserved. This enables: Audit trails of reasoningRollback to previous states",{"id":2998,"title":2999,"titles":3000,"content":3001,"level":189},"/v0.0.6/learn/architecture#_3-context-accumulation","3. Context Accumulation",[1616,2985],"Each primitive in a pipeline reads unpublished notes, sends them to the LLM, and marks them as published. This prevents redundant context while maintaining conversation flow.",{"id":3003,"title":3004,"titles":3005,"content":3006,"level":189},"/v0.0.6/learn/architecture#_4-two-phase-reasoning","4. Two-Phase Reasoning",[1616,2985],"Primitives support optional introspection: Reasoning Phase - Deterministic (temperature 0) for consistent outputsIntrospection Phase - Creative (temperature 0.7) for semantic summaries",{"id":3008,"title":3009,"titles":3010,"content":3011,"level":158},"/v0.0.6/learn/architecture#component-architecture","Component Architecture",[1616],"┌─────────────────────────────────────────────────────────────────┐\n│                         Application                              │\n└─────────────────────────────────────────────────────────────────┘\n                                │\n                                ▼\n┌─────────────────────────────────────────────────────────────────┐\n│                          Pipeline                                │\n│  ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐   │\n│  │Sequence │ │ Filter  │ │ Switch  │ │Fallback │ │Concurrent│   │\n│  └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘   │\n└─────────────────────────────────────────────────────────────────┘\n                                │\n                                ▼\n┌─────────────────────────────────────────────────────────────────┐\n│                         Primitives                               │\n│  ┌────────┐ ┌────────┐ ┌──────────┐ ┌──────┐ ┌──────────┐      │\n│  │ Decide │ │Analyze │ │Categorize│ │Assess│ │Prioritize│      │\n│  └────────┘ └────────┘ └──────────┘ └──────┘ └──────────┘      │\n│  ┌──────┐ ┌────────┐ ┌────────┐                                 │\n│  │ Sift │ │Discern │ │Reflect │                                 │\n│  └──────┘ └────────┘ └────────┘                                 │\n└─────────────────────────────────────────────────────────────────┘\n                                │\n                                ▼\n┌─────────────────────────────────────────────────────────────────┐\n│                          Thought                                 │\n│  ┌───────────────────────────────────────────────────────────┐  │\n│  │ Notes[] │ Session │ PublishedCount │ Intent                │  │\n│  └───────────────────────────────────────────────────────────┘  │\n└─────────────────────────────────────────────────────────────────┘\n                                │\n                                ▼\n┌─────────────────────────────────────────────────────────────────┐\n│                       Infrastructure                             │\n│  ┌──────────┐  ┌──────────┐                                      │\n│  │ Provider │  │ Signals  │                                      │\n│  │ (LLM)    │  │(Capitan) │                                      │\n│  └──────────┘  └──────────┘                                      │\n└─────────────────────────────────────────────────────────────────┘",{"id":3013,"title":3014,"titles":3015,"content":3016,"level":158},"/v0.0.6/learn/architecture#primitive-processing-flow","Primitive Processing Flow",[1616],"Each primitive follows the same pattern: ┌─────────────────────────────────────────────────────────────┐\n│                    Primitive.Process()                       │\n├─────────────────────────────────────────────────────────────┤\n│ 1. Get unpublished notes from Thought                        │\n│ 2. Render notes to context string                            │\n│ 3. Resolve provider (step → context → global)               │\n│ 4. Build prompt with context                                 │\n│ 5. Call provider (reasoning phase, temp=0)                   │\n│ 6. Parse structured response                                 │\n│ 7. Store result as Note                                      │\n│ 8. [Optional] Run introspection (temp=0.7)                   │\n│ 9. Mark notes as published                                   │\n│ 10. Emit signals                                             │\n│ 11. Return modified Thought                                  │\n└─────────────────────────────────────────────────────────────┘",{"id":3018,"title":3019,"titles":3020,"content":3021,"level":158},"/v0.0.6/learn/architecture#concurrency-model","Concurrency Model",[1616],"Thoughts are safe for concurrent reads but not concurrent writes: // Safe: Concurrent reads\ngo func() { thought.GetContent(\"key1\") }()\ngo func() { thought.GetContent(\"key2\") }()\n\n// Unsafe: Concurrent writes\ngo func() { thought.SetContent(ctx, \"key1\", \"v1\", \"src\") }() // Don't do this\ngo func() { thought.SetContent(ctx, \"key2\", \"v2\", \"src\") }() // Don't do this\n\n// Safe: Clone for parallel processing\nclone1 := thought.Clone()\nclone2 := thought.Clone()\ngo func() { process(clone1) }()\ngo func() { process(clone2) }()",{"id":3023,"title":2113,"titles":3024,"content":3025,"level":158},"/v0.0.6/learn/architecture#observability",[1616],"cogito emits capitan signals throughout execution: SignalDescriptionThoughtCreatedNew thought initialisedStepStartedPrimitive processing beganStepCompletedPrimitive processing succeededStepFailedPrimitive processing failedNoteAddedNote added to thoughtNotesPublishedNotes sent to LLM context",{"id":3027,"title":3028,"titles":3029,"content":103,"level":158},"/v0.0.6/learn/architecture#extension-points","Extension Points",[1616],{"id":3031,"title":1649,"titles":3032,"content":3033,"level":189},"/v0.0.6/learn/architecture#custom-primitives",[1616,3028],"Implement pipz.Chainable[*Thought]: type MyPrimitive struct {\n    key string\n}\n\nfunc (p *MyPrimitive) Process(ctx context.Context, t *cogito.Thought) (*cogito.Thought, error) {\n    // Read context\n    notes := t.GetUnpublishedNotes()\n\n    // Process with LLM\n    provider, _ := cogito.ResolveProvider(ctx, nil)\n    // ...\n\n    // Store result\n    t.SetContent(ctx, p.key, result, \"my_primitive\")\n    t.MarkNotesPublished(ctx)\n\n    return t, nil\n}\n\nfunc (p *MyPrimitive) Name() pipz.Name { return pipz.Name(p.key) }\nfunc (p *MyPrimitive) Close() error    { return nil }",{"id":3035,"title":3036,"titles":3037,"content":3038,"level":158},"/v0.0.6/learn/architecture#performance-considerations","Performance Considerations",[1616],"Token Management - Use Compress/Truncate to limit context sizeParallel Execution - Use Converge for independent processing paths",{"id":3040,"title":2874,"titles":3041,"content":3042,"level":158},"/v0.0.6/learn/architecture#next-steps",[1616],"API Reference - Complete API documentation html pre.shiki code .sLkEo, html code.shiki .sLkEo{--shiki-default:var(--shiki-comment)}html pre.shiki code .sW3Qg, html code.shiki .sW3Qg{--shiki-default:var(--shiki-operator)}html pre.shiki code .sUt3r, html code.shiki .sUt3r{--shiki-default:var(--shiki-keyword)}html pre.shiki code .sq5bi, html code.shiki .sq5bi{--shiki-default:var(--shiki-punctuation)}html pre.shiki code .sh8_p, html code.shiki .sh8_p{--shiki-default:var(--shiki-text)}html pre.shiki code .s5klm, html code.shiki .s5klm{--shiki-default:var(--shiki-function)}html pre.shiki code .sxAnc, html code.shiki .sxAnc{--shiki-default:var(--shiki-string)}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 pre.shiki code .sYBwO, html code.shiki .sYBwO{--shiki-default:var(--shiki-type)}html pre.shiki code .sBGCq, html code.shiki .sBGCq{--shiki-default:var(--shiki-property)}html pre.shiki code .sSYET, html code.shiki .sSYET{--shiki-default:var(--shiki-parameter)}",{"id":3044,"title":3045,"titles":3046,"content":3047,"level":111},"/v0.0.6/reference/api","API Reference",[],"Complete API reference for cogito",{"id":3049,"title":3045,"titles":3050,"content":3051,"level":111},"/v0.0.6/reference/api#api-reference",[],"Complete API reference for cogito. For the most up-to-date documentation, see pkg.go.dev/github.com/zoobz-io/cogito.",{"id":3053,"title":3054,"titles":3055,"content":103,"level":158},"/v0.0.6/reference/api#core-types","Core Types",[3045],{"id":3057,"title":1512,"titles":3058,"content":3059,"level":189},"/v0.0.6/reference/api#thought",[3045,3054],"type Thought struct {\n    ID        string    // Auto-generated UUID\n    Intent    string    // Purpose of this thought\n    TraceID   string    // Unique trace identifier\n    ParentID  *string   // Parent thought (for branching)\n    Session   *Session  // LLM conversation state\n    CreatedAt time.Time\n    UpdatedAt time.Time\n}",{"id":3061,"title":3062,"titles":3063,"content":3064,"level":196},"/v0.0.6/reference/api#constructors","Constructors",[3045,3054,1512],"func New(ctx context.Context, intent string) *Thought\nfunc NewWithTrace(ctx context.Context, intent, traceID string) *Thought",{"id":3066,"title":3067,"titles":3068,"content":3069,"level":196},"/v0.0.6/reference/api#methods","Methods",[3045,3054,1512],"func (t *Thought) AddNote(ctx context.Context, note Note) error\nfunc (t *Thought) SetContent(ctx context.Context, key, content, source string) error\nfunc (t *Thought) SetNote(ctx context.Context, key, content, source string, metadata map[string]string) error\nfunc (t *Thought) GetNote(key string) (Note, bool)\nfunc (t *Thought) GetContent(key string) (string, error)\nfunc (t *Thought) GetMetadata(key, field string) (string, error)\nfunc (t *Thought) GetLatestNote() (Note, bool)\nfunc (t *Thought) AllNotes() []Note\nfunc (t *Thought) GetBool(key string) (bool, error)\nfunc (t *Thought) GetFloat(key string) (float64, error)\nfunc (t *Thought) GetInt(key string) (int, error)\nfunc (t *Thought) Clone() *Thought\nfunc (t *Thought) PublishedCount() int\nfunc (t *Thought) GetUnpublishedNotes() []Note\nfunc (t *Thought) MarkNotesPublished(ctx context.Context)",{"id":3071,"title":2943,"titles":3072,"content":3073,"level":189},"/v0.0.6/reference/api#note",[3045,3054],"type Note struct {\n    ID        string\n    ThoughtID string\n    Key       string\n    Content   string\n    Metadata  map[string]string\n    Source    string\n    Created   time.Time\n}",{"id":3075,"title":1262,"titles":3076,"content":103,"level":158},"/v0.0.6/reference/api#primitives",[3045],{"id":3078,"title":3079,"titles":3080,"content":103,"level":189},"/v0.0.6/reference/api#decision-analysis","Decision & Analysis",[3045,1262],{"id":3082,"title":3083,"titles":3084,"content":3085,"level":196},"/v0.0.6/reference/api#decide","Decide",[3045,1262,3079],"Binary yes/no decisions with confidence scores. func NewDecide(key, question string) *Decide\nfunc (d *Decide) WithProvider(p Provider) *Decide\nfunc (d *Decide) WithIntrospection() *Decide\nfunc (d *Decide) WithSummaryKey(key string) *Decide\nfunc (d *Decide) WithReasoningTemperature(t float32) *Decide\nfunc (d *Decide) WithIntrospectionTemperature(t float32) *Decide\nfunc (d *Decide) Scan(t *Thought) (*DecideResponse, error)",{"id":3087,"title":3088,"titles":3089,"content":3090,"level":196},"/v0.0.6/reference/api#analyze","Analyze",[3045,1262,3079],"Extract structured data into typed results. func NewAnalyze[T any](key, prompt string) *Analyze[T]\nfunc (a *Analyze[T]) WithProvider(p Provider) *Analyze[T]\nfunc (a *Analyze[T]) WithIntrospection() *Analyze[T]\nfunc (a *Analyze[T]) Scan(t *Thought) (*T, error)",{"id":3092,"title":3093,"titles":3094,"content":3095,"level":196},"/v0.0.6/reference/api#categorize","Categorize",[3045,1262,3079],"Classify into one of N categories. func NewCategorize(key, question string, categories []string) *Categorize\nfunc (c *Categorize) WithProvider(p Provider) *Categorize\nfunc (c *Categorize) WithIntrospection() *Categorize\nfunc (c *Categorize) Scan(t *Thought) (*CategorizeResponse, error)",{"id":3097,"title":3098,"titles":3099,"content":3100,"level":196},"/v0.0.6/reference/api#assess","Assess",[3045,1262,3079],"Sentiment analysis with emotional scoring. func NewAssess(key, question string) *Assess\nfunc (a *Assess) WithProvider(p Provider) *Assess\nfunc (a *Assess) WithIntrospection() *Assess\nfunc (a *Assess) Scan(t *Thought) (*AssessResponse, error)",{"id":3102,"title":3103,"titles":3104,"content":3105,"level":196},"/v0.0.6/reference/api#prioritize","Prioritize",[3045,1262,3079],"Rank items by specified criteria. func NewPrioritize(key, criteria string, items []string) *Prioritize\nfunc (p *Prioritize) WithProvider(provider Provider) *Prioritize\nfunc (p *Prioritize) WithIntrospection() *Prioritize\nfunc (p *Prioritize) Scan(t *Thought) (*PrioritizeResponse, error)",{"id":3107,"title":1276,"titles":3108,"content":103,"level":189},"/v0.0.6/reference/api#control-flow",[3045,1262],{"id":3110,"title":3111,"titles":3112,"content":3113,"level":196},"/v0.0.6/reference/api#sift","Sift",[3045,1262,1276],"Semantic gate - LLM decides whether to execute wrapped processor. func NewSift(name, criteria string, processor pipz.Chainable[*Thought]) *Sift\nfunc (s *Sift) WithProvider(p Provider) *Sift",{"id":3115,"title":3116,"titles":3117,"content":3118,"level":196},"/v0.0.6/reference/api#discern","Discern",[3045,1262,1276],"Semantic router - LLM classifies and routes to different processors. func NewDiscern(name, question string) *Discern\nfunc (d *Discern) AddRoute(category string, processor pipz.Chainable[*Thought]) *Discern\nfunc (d *Discern) WithProvider(p Provider) *Discern",{"id":3120,"title":3121,"titles":3122,"content":103,"level":189},"/v0.0.6/reference/api#reflection","Reflection",[3045,1262],{"id":3124,"title":3125,"titles":3126,"content":3127,"level":196},"/v0.0.6/reference/api#reflect","Reflect",[3045,1262,3121],"Consolidate current Thought's Notes into a summary. func NewReflect(key string) *Reflect\nfunc (r *Reflect) WithPrompt(prompt string) *Reflect\nfunc (r *Reflect) WithProvider(p Provider) *Reflect\nfunc (r *Reflect) WithUnpublishedOnly() *Reflect",{"id":3129,"title":1295,"titles":3130,"content":103,"level":189},"/v0.0.6/reference/api#session-management",[3045,1262],{"id":3132,"title":3133,"titles":3134,"content":3135,"level":196},"/v0.0.6/reference/api#reset","Reset",[3045,1262,1295],"Clear session state. func NewReset(key string) *Reset\nfunc (r *Reset) WithSystemMessage(msg string) *Reset\nfunc (r *Reset) WithPreserveNote(noteKey string) *Reset",{"id":3137,"title":3138,"titles":3139,"content":3140,"level":196},"/v0.0.6/reference/api#compress","Compress",[3045,1262,1295],"LLM-summarise session history to reduce tokens. func NewCompress(targetMessages int) *Compress\nfunc (c *Compress) WithProvider(p Provider) *Compress",{"id":3142,"title":3143,"titles":3144,"content":3145,"level":196},"/v0.0.6/reference/api#truncate","Truncate",[3045,1262,1295],"Sliding window session trimming (no LLM). func NewTruncate(keepMessages int) *Truncate",{"id":3147,"title":1309,"titles":3148,"content":103,"level":189},"/v0.0.6/reference/api#synthesis",[3045,1262],{"id":3150,"title":3151,"titles":3152,"content":3153,"level":196},"/v0.0.6/reference/api#amplify","Amplify",[3045,1262,1309],"Iterative refinement until criteria met. func NewAmplify(key, criteria string, processor pipz.Chainable[*Thought]) *Amplify\nfunc (a *Amplify) WithMaxIterations(n int) *Amplify\nfunc (a *Amplify) WithProvider(p Provider) *Amplify",{"id":3155,"title":3156,"titles":3157,"content":3158,"level":196},"/v0.0.6/reference/api#converge","Converge",[3045,1262,1309],"Parallel execution with semantic synthesis. func NewConverge(key, synthesisPrompt string, processors ...pipz.Chainable[*Thought]) *Converge\nfunc (c *Converge) WithProvider(p Provider) *Converge",{"id":3160,"title":3161,"titles":3162,"content":3163,"level":158},"/v0.0.6/reference/api#pipeline-helpers","Pipeline Helpers",[3045],"func Sequence(identity pipz.Identity, processors ...pipz.Chainable[*Thought]) *pipz.Sequence[*Thought]\nfunc Filter(identity pipz.Identity, predicate func(context.Context, *Thought) bool, processor pipz.Chainable[*Thought]) *pipz.Filter[*Thought]\nfunc Switch(identity pipz.Identity, condition func(context.Context, *Thought) string) *pipz.Switch[*Thought]\nfunc Gate(identity pipz.Identity, predicate func(context.Context, *Thought) bool) pipz.Processor[*Thought]\nfunc Fallback(identity pipz.Identity, processors ...pipz.Chainable[*Thought]) *pipz.Fallback[*Thought]\nfunc Retry(identity pipz.Identity, processor pipz.Chainable[*Thought], maxAttempts int) *pipz.Retry[*Thought]\nfunc Backoff(identity pipz.Identity, processor pipz.Chainable[*Thought], maxAttempts int, baseDelay time.Duration) *pipz.Backoff[*Thought]\nfunc Timeout(identity pipz.Identity, processor pipz.Chainable[*Thought], duration time.Duration) *pipz.Timeout[*Thought]\nfunc Concurrent(identity pipz.Identity, reducer func(*Thought, map[pipz.Identity]*Thought, map[pipz.Identity]error) *Thought, processors ...pipz.Chainable[*Thought]) *pipz.Concurrent[*Thought]\nfunc Race(identity pipz.Identity, processors ...pipz.Chainable[*Thought]) *pipz.Race[*Thought]",{"id":3165,"title":3166,"titles":3167,"content":3168,"level":158},"/v0.0.6/reference/api#provider-management","Provider Management",[3045],"func SetProvider(p Provider)\nfunc GetProvider() Provider\nfunc WithProvider(ctx context.Context, p Provider) context.Context\nfunc ProviderFromContext(ctx context.Context) (Provider, bool)\nfunc ResolveProvider(ctx context.Context, stepProvider Provider) (Provider, error)",{"id":3170,"title":3171,"titles":3172,"content":3173,"level":158},"/v0.0.6/reference/api#utilities","Utilities",[3045],"func RenderNotesToContext(notes []Note) string",{"id":3175,"title":3176,"titles":3177,"content":3178,"level":158},"/v0.0.6/reference/api#configuration","Configuration",[3045],"var DefaultIntrospection = false\nvar DefaultReasoningTemperature = 0.0\nvar DefaultIntrospectionTemperature = 0.7 html pre.shiki code .sUt3r, html code.shiki .sUt3r{--shiki-default:var(--shiki-keyword)}html pre.shiki code .sYBwO, html code.shiki .sYBwO{--shiki-default:var(--shiki-type)}html pre.shiki code .sq5bi, html code.shiki .sq5bi{--shiki-default:var(--shiki-punctuation)}html pre.shiki code .sBGCq, html code.shiki .sBGCq{--shiki-default:var(--shiki-property)}html pre.shiki code .sLkEo, html code.shiki .sLkEo{--shiki-default:var(--shiki-comment)}html pre.shiki code .sW3Qg, html code.shiki .sW3Qg{--shiki-default:var(--shiki-operator)}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 pre.shiki code .s5klm, html code.shiki .s5klm{--shiki-default:var(--shiki-function)}html pre.shiki code .sSYET, html code.shiki .sSYET{--shiki-default:var(--shiki-parameter)}html pre.shiki code .sh8_p, html code.shiki .sh8_p{--shiki-default:var(--shiki-text)}html pre.shiki code .sMAmT, html code.shiki .sMAmT{--shiki-default:var(--shiki-number)}",[3180],{"title":3181,"path":3182,"stem":3183,"children":3184,"page":3197},"V006","/v0.0.6","v0.0.6",[3185,3187,3198],{"title":1585,"path":2846,"stem":3186,"description":2848},"v0.0.6/1.overview",{"title":1591,"path":3188,"stem":3189,"children":3190,"page":3197},"/v0.0.6/learn","v0.0.6/2.learn",[3191,3193,3195],{"title":1599,"path":2878,"stem":3192,"description":2880},"v0.0.6/2.learn/1.quickstart",{"title":2920,"path":2919,"stem":3194,"description":2922},"v0.0.6/2.learn/2.concepts",{"title":1616,"path":2976,"stem":3196,"description":2978},"v0.0.6/2.learn/3.architecture",false,{"title":1691,"path":3199,"stem":3200,"children":3201,"page":3197},"/v0.0.6/reference","v0.0.6/5.reference",[3202],{"title":3045,"path":3044,"stem":3203,"description":3047},"v0.0.6/5.reference/1.api",[3205],{"title":3181,"path":3182,"stem":3183,"children":3206,"page":3197},[3207,3208,3213],{"title":1585,"path":2846,"stem":3186},{"title":1591,"path":3188,"stem":3189,"children":3209,"page":3197},[3210,3211,3212],{"title":1599,"path":2878,"stem":3192},{"title":2920,"path":2919,"stem":3194},{"title":1616,"path":2976,"stem":3196},{"title":1691,"path":3199,"stem":3200,"children":3214,"page":3197},[3215],{"title":3045,"path":3044,"stem":3203},[3217],{"title":3181,"path":3182,"stem":3183,"children":3218,"page":3197},[3219,3220,3225],{"title":1585,"path":2846,"stem":3186,"description":2848},{"title":1591,"path":3188,"stem":3189,"children":3221,"page":3197},[3222,3223,3224],{"title":1599,"path":2878,"stem":3192,"description":2880},{"title":2920,"path":2919,"stem":3194,"description":2922},{"title":1616,"path":2976,"stem":3196,"description":2978},{"title":1691,"path":3199,"stem":3200,"children":3226,"page":3197},[3227],{"title":3045,"path":3044,"stem":3203,"description":3047},1776192783933]