[{"data":1,"prerenderedAt":4126},["ShallowReactive",2],{"search-sections-cogito":3,"nav-cogito":354,"content-tree-cogito":381,"footer-resources":393,"content-/v0.0.6/learn/concepts":3215,"surround-/v0.0.6/learn/concepts":4123},[4,10,15,21,26,31,36,41,46,50,55,60,65,71,76,81,85,90,94,99,104,109,114,119,124,129,134,139,143,147,151,155,160,165,170,175,180,185,190,195,199,204,209,213,218,222,226,230,236,241,245,249,253,258,263,268,273,278,282,287,292,296,301,305,310,315,320,324,329,334,339,344,349],{"id":5,"title":6,"titles":7,"content":8,"level":9},"/v0.0.6/overview","Overview",[],"Introduction to cogito - LLM-powered reasoning chains for Go",1,{"id":11,"title":12,"titles":13,"content":14,"level":9},"/v0.0.6/overview#cogito","cogito",[],"LLM-powered reasoning chains for Go.",{"id":16,"title":17,"titles":18,"content":19,"level":20},"/v0.0.6/overview#what-is-cogito","What is cogito?",[12],"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",2,{"id":22,"title":23,"titles":24,"content":25,"level":20},"/v0.0.6/overview#key-features","Key Features",[12],"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":27,"title":28,"titles":29,"content":30,"level":20},"/v0.0.6/overview#when-to-use-cogito","When to Use cogito",[12],"cogito is ideal for: Customer support automation with context-aware routingDocument analysis with semantic categorizationDecision systems requiring audit trailsMulti-step reasoning pipelines",{"id":32,"title":33,"titles":34,"content":35,"level":20},"/v0.0.6/overview#architecture","Architecture",[12],"┌─────────────────────────────────────────────────────────┐\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":37,"title":38,"titles":39,"content":40,"level":20},"/v0.0.6/overview#next-steps","Next Steps",[12],"Quickstart - Get started in 5 minutesCore Concepts - Understand Thought and NoteArchitecture - Deep dive into system design",{"id":42,"title":43,"titles":44,"content":45,"level":9},"/v0.0.6/learn/quickstart","Quickstart",[],"Get started with cogito in 5 minutes",{"id":47,"title":43,"titles":48,"content":49,"level":9},"/v0.0.6/learn/quickstart#quickstart",[],"Get cogito running in your project in 5 minutes.",{"id":51,"title":52,"titles":53,"content":54,"level":20},"/v0.0.6/learn/quickstart#prerequisites","Prerequisites",[43],"Go 1.24 or laterAn LLM provider (OpenAI, Anthropic, or compatible)",{"id":56,"title":57,"titles":58,"content":59,"level":20},"/v0.0.6/learn/quickstart#installation","Installation",[43],"go get github.com/zoobz-io/cogito",{"id":61,"title":62,"titles":63,"content":64,"level":20},"/v0.0.6/learn/quickstart#basic-usage","Basic Usage",[43],"",{"id":66,"title":67,"titles":68,"content":69,"level":70},"/v0.0.6/learn/quickstart#_1-configure-provider","1. Configure Provider",[43,62],"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}",3,{"id":72,"title":73,"titles":74,"content":75,"level":70},"/v0.0.6/learn/quickstart#_2-create-and-process-a-thought","2. Create and Process a Thought",[43,62],"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":77,"title":78,"titles":79,"content":80,"level":20},"/v0.0.6/learn/quickstart#complete-example","Complete Example",[43],"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":82,"title":38,"titles":83,"content":84,"level":20},"/v0.0.6/learn/quickstart#next-steps",[43],"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":86,"title":87,"titles":88,"content":89,"level":9},"/v0.0.6/learn/concepts","Core Concepts",[],"Understanding Thought and Note in cogito",{"id":91,"title":87,"titles":92,"content":93,"level":9},"/v0.0.6/learn/concepts#core-concepts",[],"cogito is built around two core concepts: Thought and Note.",{"id":95,"title":96,"titles":97,"content":98,"level":20},"/v0.0.6/learn/concepts#thought","Thought",[87],"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":100,"title":101,"titles":102,"content":103,"level":70},"/v0.0.6/learn/concepts#thought-lifecycle","Thought Lifecycle",[87,96],"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":105,"title":106,"titles":107,"content":108,"level":70},"/v0.0.6/learn/concepts#cloning-for-parallel-processing","Cloning for Parallel Processing",[87,96],"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":110,"title":111,"titles":112,"content":113,"level":20},"/v0.0.6/learn/concepts#note","Note",[87],"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":115,"title":116,"titles":117,"content":118,"level":70},"/v0.0.6/learn/concepts#adding-notes","Adding Notes",[87,111],"// 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":120,"title":121,"titles":122,"content":123,"level":70},"/v0.0.6/learn/concepts#reading-notes","Reading Notes",[87,111],"// 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":125,"title":126,"titles":127,"content":128,"level":70},"/v0.0.6/learn/concepts#published-vs-unpublished","Published vs Unpublished",[87,111],"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":130,"title":131,"titles":132,"content":133,"level":20},"/v0.0.6/learn/concepts#provider","Provider",[87],"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":135,"title":136,"titles":137,"content":138,"level":70},"/v0.0.6/learn/concepts#resolution-hierarchy","Resolution Hierarchy",[87,131],"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":140,"title":38,"titles":141,"content":142,"level":20},"/v0.0.6/learn/concepts#next-steps",[87],"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":144,"title":33,"titles":145,"content":146,"level":9},"/v0.0.6/learn/architecture",[],"System design and architecture of cogito",{"id":148,"title":33,"titles":149,"content":150,"level":9},"/v0.0.6/learn/architecture#architecture",[],"This document describes the system design and architectural decisions in cogito.",{"id":152,"title":153,"titles":154,"content":64,"level":20},"/v0.0.6/learn/architecture#design-principles","Design Principles",[33],{"id":156,"title":157,"titles":158,"content":159,"level":70},"/v0.0.6/learn/architecture#_1-everything-is-text","1. Everything is Text",[33,153],"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":161,"title":162,"titles":163,"content":164,"level":70},"/v0.0.6/learn/architecture#_2-append-only-notes","2. Append-Only Notes",[33,153],"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":166,"title":167,"titles":168,"content":169,"level":70},"/v0.0.6/learn/architecture#_3-context-accumulation","3. Context Accumulation",[33,153],"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":171,"title":172,"titles":173,"content":174,"level":70},"/v0.0.6/learn/architecture#_4-two-phase-reasoning","4. Two-Phase Reasoning",[33,153],"Primitives support optional introspection: Reasoning Phase - Deterministic (temperature 0) for consistent outputsIntrospection Phase - Creative (temperature 0.7) for semantic summaries",{"id":176,"title":177,"titles":178,"content":179,"level":20},"/v0.0.6/learn/architecture#component-architecture","Component Architecture",[33],"┌─────────────────────────────────────────────────────────────────┐\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":181,"title":182,"titles":183,"content":184,"level":20},"/v0.0.6/learn/architecture#primitive-processing-flow","Primitive Processing Flow",[33],"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":186,"title":187,"titles":188,"content":189,"level":20},"/v0.0.6/learn/architecture#concurrency-model","Concurrency Model",[33],"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":191,"title":192,"titles":193,"content":194,"level":20},"/v0.0.6/learn/architecture#observability","Observability",[33],"cogito emits capitan signals throughout execution: SignalDescriptionThoughtCreatedNew thought initialisedStepStartedPrimitive processing beganStepCompletedPrimitive processing succeededStepFailedPrimitive processing failedNoteAddedNote added to thoughtNotesPublishedNotes sent to LLM context",{"id":196,"title":197,"titles":198,"content":64,"level":20},"/v0.0.6/learn/architecture#extension-points","Extension Points",[33],{"id":200,"title":201,"titles":202,"content":203,"level":70},"/v0.0.6/learn/architecture#custom-primitives","Custom Primitives",[33,197],"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":205,"title":206,"titles":207,"content":208,"level":20},"/v0.0.6/learn/architecture#performance-considerations","Performance Considerations",[33],"Token Management - Use Compress/Truncate to limit context sizeParallel Execution - Use Converge for independent processing paths",{"id":210,"title":38,"titles":211,"content":212,"level":20},"/v0.0.6/learn/architecture#next-steps",[33],"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":214,"title":215,"titles":216,"content":217,"level":9},"/v0.0.6/reference/api","API Reference",[],"Complete API reference for cogito",{"id":219,"title":215,"titles":220,"content":221,"level":9},"/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":223,"title":224,"titles":225,"content":64,"level":20},"/v0.0.6/reference/api#core-types","Core Types",[215],{"id":227,"title":96,"titles":228,"content":229,"level":70},"/v0.0.6/reference/api#thought",[215,224],"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":231,"title":232,"titles":233,"content":234,"level":235},"/v0.0.6/reference/api#constructors","Constructors",[215,224,96],"func New(ctx context.Context, intent string) *Thought\nfunc NewWithTrace(ctx context.Context, intent, traceID string) *Thought",4,{"id":237,"title":238,"titles":239,"content":240,"level":235},"/v0.0.6/reference/api#methods","Methods",[215,224,96],"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":242,"title":111,"titles":243,"content":244,"level":70},"/v0.0.6/reference/api#note",[215,224],"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":246,"title":247,"titles":248,"content":64,"level":20},"/v0.0.6/reference/api#primitives","Primitives",[215],{"id":250,"title":251,"titles":252,"content":64,"level":70},"/v0.0.6/reference/api#decision-analysis","Decision & Analysis",[215,247],{"id":254,"title":255,"titles":256,"content":257,"level":235},"/v0.0.6/reference/api#decide","Decide",[215,247,251],"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":259,"title":260,"titles":261,"content":262,"level":235},"/v0.0.6/reference/api#analyze","Analyze",[215,247,251],"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":264,"title":265,"titles":266,"content":267,"level":235},"/v0.0.6/reference/api#categorize","Categorize",[215,247,251],"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":269,"title":270,"titles":271,"content":272,"level":235},"/v0.0.6/reference/api#assess","Assess",[215,247,251],"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":274,"title":275,"titles":276,"content":277,"level":235},"/v0.0.6/reference/api#prioritize","Prioritize",[215,247,251],"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":279,"title":280,"titles":281,"content":64,"level":70},"/v0.0.6/reference/api#control-flow","Control Flow",[215,247],{"id":283,"title":284,"titles":285,"content":286,"level":235},"/v0.0.6/reference/api#sift","Sift",[215,247,280],"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":288,"title":289,"titles":290,"content":291,"level":235},"/v0.0.6/reference/api#discern","Discern",[215,247,280],"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":293,"title":294,"titles":295,"content":64,"level":70},"/v0.0.6/reference/api#reflection","Reflection",[215,247],{"id":297,"title":298,"titles":299,"content":300,"level":235},"/v0.0.6/reference/api#reflect","Reflect",[215,247,294],"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":302,"title":303,"titles":304,"content":64,"level":70},"/v0.0.6/reference/api#session-management","Session Management",[215,247],{"id":306,"title":307,"titles":308,"content":309,"level":235},"/v0.0.6/reference/api#reset","Reset",[215,247,303],"Clear session state. func NewReset(key string) *Reset\nfunc (r *Reset) WithSystemMessage(msg string) *Reset\nfunc (r *Reset) WithPreserveNote(noteKey string) *Reset",{"id":311,"title":312,"titles":313,"content":314,"level":235},"/v0.0.6/reference/api#compress","Compress",[215,247,303],"LLM-summarise session history to reduce tokens. func NewCompress(targetMessages int) *Compress\nfunc (c *Compress) WithProvider(p Provider) *Compress",{"id":316,"title":317,"titles":318,"content":319,"level":235},"/v0.0.6/reference/api#truncate","Truncate",[215,247,303],"Sliding window session trimming (no LLM). func NewTruncate(keepMessages int) *Truncate",{"id":321,"title":322,"titles":323,"content":64,"level":70},"/v0.0.6/reference/api#synthesis","Synthesis",[215,247],{"id":325,"title":326,"titles":327,"content":328,"level":235},"/v0.0.6/reference/api#amplify","Amplify",[215,247,322],"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":330,"title":331,"titles":332,"content":333,"level":235},"/v0.0.6/reference/api#converge","Converge",[215,247,322],"Parallel execution with semantic synthesis. func NewConverge(key, synthesisPrompt string, processors ...pipz.Chainable[*Thought]) *Converge\nfunc (c *Converge) WithProvider(p Provider) *Converge",{"id":335,"title":336,"titles":337,"content":338,"level":20},"/v0.0.6/reference/api#pipeline-helpers","Pipeline Helpers",[215],"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":340,"title":341,"titles":342,"content":343,"level":20},"/v0.0.6/reference/api#provider-management","Provider Management",[215],"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":345,"title":346,"titles":347,"content":348,"level":20},"/v0.0.6/reference/api#utilities","Utilities",[215],"func RenderNotesToContext(notes []Note) string",{"id":350,"title":351,"titles":352,"content":353,"level":20},"/v0.0.6/reference/api#configuration","Configuration",[215],"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)}",[355],{"title":356,"path":357,"stem":358,"children":359,"page":373},"V006","/v0.0.6","v0.0.6",[360,362,374],{"title":6,"path":5,"stem":361,"description":8},"v0.0.6/1.overview",{"title":363,"path":364,"stem":365,"children":366,"page":373},"Learn","/v0.0.6/learn","v0.0.6/2.learn",[367,369,371],{"title":43,"path":42,"stem":368,"description":45},"v0.0.6/2.learn/1.quickstart",{"title":87,"path":86,"stem":370,"description":89},"v0.0.6/2.learn/2.concepts",{"title":33,"path":144,"stem":372,"description":146},"v0.0.6/2.learn/3.architecture",false,{"title":375,"path":376,"stem":377,"children":378,"page":373},"Reference","/v0.0.6/reference","v0.0.6/5.reference",[379],{"title":215,"path":214,"stem":380,"description":217},"v0.0.6/5.reference/1.api",[382],{"title":356,"path":357,"stem":358,"children":383,"page":373},[384,385,390],{"title":6,"path":5,"stem":361},{"title":363,"path":364,"stem":365,"children":386,"page":373},[387,388,389],{"title":43,"path":42,"stem":368},{"title":87,"path":86,"stem":370},{"title":33,"path":144,"stem":372},{"title":375,"path":376,"stem":377,"children":391,"page":373},[392],{"title":215,"path":214,"stem":380},[394,2134,2620],{"id":395,"title":396,"body":397,"description":64,"extension":2127,"icon":2128,"meta":2129,"navigation":576,"path":2130,"seo":2131,"stem":2132,"__hash__":2133},"resources/readme.md","README",{"type":398,"value":399,"toc":2111},"minimark",[400,403,471,474,477,482,485,880,888,892,909,912,916,1605,1609,1711,1715,1771,1774,1777,1940,1943,1952,1956,1964,1968,1992,1996,2034,2038,2061,2064,2086,2090,2098,2101,2107],[401,402,12],"h1",{"id":12},[404,405,406,417,425,433,441,449,456,463],"p",{},[407,408,412],"a",{"href":409,"rel":410},"https://github.com/zoobz-io/cogito/actions/workflows/ci.yml",[411],"nofollow",[413,414],"img",{"alt":415,"src":416},"CI Status","https://github.com/zoobz-io/cogito/workflows/CI/badge.svg",[407,418,421],{"href":419,"rel":420},"https://codecov.io/gh/zoobz-io/cogito",[411],[413,422],{"alt":423,"src":424},"codecov","https://codecov.io/gh/zoobz-io/cogito/graph/badge.svg?branch=main",[407,426,429],{"href":427,"rel":428},"https://goreportcard.com/report/github.com/zoobz-io/cogito",[411],[413,430],{"alt":431,"src":432},"Go Report Card","https://goreportcard.com/badge/github.com/zoobz-io/cogito",[407,434,437],{"href":435,"rel":436},"https://github.com/zoobz-io/cogito/security/code-scanning",[411],[413,438],{"alt":439,"src":440},"CodeQL","https://github.com/zoobz-io/cogito/workflows/CodeQL/badge.svg",[407,442,445],{"href":443,"rel":444},"https://pkg.go.dev/github.com/zoobz-io/cogito",[411],[413,446],{"alt":447,"src":448},"Go Reference","https://pkg.go.dev/badge/github.com/zoobz-io/cogito.svg",[407,450,452],{"href":451},"LICENSE",[413,453],{"alt":454,"src":455},"License","https://img.shields.io/github/license/zoobz-io/cogito",[407,457,459],{"href":458},"go.mod",[413,460],{"alt":461,"src":462},"Go Version","https://img.shields.io/github/go-mod/go-version/zoobz-io/cogito",[407,464,467],{"href":465,"rel":466},"https://github.com/zoobz-io/cogito/releases",[411],[413,468],{"alt":469,"src":470},"Release","https://img.shields.io/github/v/release/zoobz-io/cogito",[404,472,473],{},"LLM-powered reasoning chains with semantic memory for Go.",[404,475,476],{},"Build autonomous systems that reason, remember, and adapt.",[478,479,481],"h2",{"id":480},"reasoning-that-accumulates","Reasoning That Accumulates",[404,483,484],{},"A Thought is a reasoning context. Primitives read it, reason via LLM, and contribute Notes back. Each step sees what came before.",[486,487,491],"pre",{"className":488,"code":489,"language":490,"meta":64,"style":64},"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",[492,493,494,542,572,578,584,607,639,661,684,693,698,703,734,739,745,778,844,850,856,862,868,874],"code",{"__ignoreMap":64},[495,496,498,502,506,509,512,515,518,522,525,528,530,533,535,539],"span",{"class":497,"line":9},"line",[495,499,501],{"class":500},"sh8_p","thought",[495,503,505],{"class":504},"sq5bi",",",[495,507,508],{"class":500}," _",[495,510,511],{"class":500}," :=",[495,513,514],{"class":500}," cogito",[495,516,517],{"class":504},".",[495,519,521],{"class":520},"s5klm","New",[495,523,524],{"class":504},"(",[495,526,527],{"class":500},"ctx",[495,529,505],{"class":504},[495,531,532],{"class":500}," memory",[495,534,505],{"class":504},[495,536,538],{"class":537},"sxAnc"," \"should we approve this refund?\"",[495,540,541],{"class":504},")\n",[495,543,544,546,548,551,553,555,557,560,562,565,567,570],{"class":497,"line":20},[495,545,501],{"class":500},[495,547,517],{"class":504},[495,549,550],{"class":520},"SetContent",[495,552,524],{"class":504},[495,554,527],{"class":500},[495,556,505],{"class":504},[495,558,559],{"class":537}," \"request\"",[495,561,505],{"class":504},[495,563,564],{"class":500}," customerEmail",[495,566,505],{"class":504},[495,568,569],{"class":537}," \"input\"",[495,571,541],{"class":504},[495,573,574],{"class":497,"line":70},[495,575,577],{"emptyLinePlaceholder":576},true,"\n",[495,579,580],{"class":497,"line":235},[495,581,583],{"class":582},"sLkEo","// Pipeline: each primitive builds on accumulated context\n",[495,585,587,590,592,594,596,599,601,604],{"class":497,"line":586},5,[495,588,589],{"class":500},"pipeline",[495,591,511],{"class":500},[495,593,514],{"class":500},[495,595,517],{"class":504},[495,597,598],{"class":520},"Sequence",[495,600,524],{"class":504},[495,602,603],{"class":537},"\"refund-decision\"",[495,605,606],{"class":504},",\n",[495,608,610,613,615,618,621,625,628,631,633,636],{"class":497,"line":609},6,[495,611,612],{"class":500},"    cogito",[495,614,517],{"class":504},[495,616,617],{"class":520},"NewAnalyze",[495,619,620],{"class":504},"[",[495,622,624],{"class":623},"sYBwO","RefundRequest",[495,626,627],{"class":504},"](",[495,629,630],{"class":537},"\"parse\"",[495,632,505],{"class":504},[495,634,635],{"class":537}," \"extract order ID, amount, and reason\"",[495,637,638],{"class":504},"),\n",[495,640,642,644,646,649,651,654,656,659],{"class":497,"line":641},7,[495,643,612],{"class":500},[495,645,517],{"class":504},[495,647,648],{"class":520},"NewSeek",[495,650,524],{"class":504},[495,652,653],{"class":537},"\"history\"",[495,655,505],{"class":504},[495,657,658],{"class":537}," \"this customer's previous refund requests\"",[495,660,638],{"class":504},[495,662,664,666,668,671,673,676,678,681],{"class":497,"line":663},8,[495,665,612],{"class":500},[495,667,517],{"class":504},[495,669,670],{"class":520},"NewDecide",[495,672,524],{"class":504},[495,674,675],{"class":537},"\"approve\"",[495,677,505],{"class":504},[495,679,680],{"class":537}," \"does this meet our refund policy?\"",[495,682,683],{"class":504},").\n",[495,685,687,690],{"class":497,"line":686},9,[495,688,689],{"class":520},"        WithIntrospection",[495,691,692],{"class":504},"(),\n",[495,694,696],{"class":497,"line":695},10,[495,697,541],{"class":504},[495,699,701],{"class":497,"line":700},11,[495,702,577],{"emptyLinePlaceholder":576},[495,704,706,709,711,713,715,718,720,723,725,727,729,732],{"class":497,"line":705},12,[495,707,708],{"class":500},"result",[495,710,505],{"class":504},[495,712,508],{"class":500},[495,714,511],{"class":500},[495,716,717],{"class":500}," pipeline",[495,719,517],{"class":504},[495,721,722],{"class":520},"Process",[495,724,524],{"class":504},[495,726,527],{"class":500},[495,728,505],{"class":504},[495,730,731],{"class":500}," thought",[495,733,541],{"class":504},[495,735,737],{"class":497,"line":736},13,[495,738,577],{"emptyLinePlaceholder":576},[495,740,742],{"class":497,"line":741},14,[495,743,744],{"class":582},"// Every step left a Note — an auditable chain of reasoning\n",[495,746,748,752,754,756,759,761,764,767,769,772,775],{"class":497,"line":747},15,[495,749,751],{"class":750},"sW3Qg","for",[495,753,508],{"class":500},[495,755,505],{"class":504},[495,757,758],{"class":500}," note",[495,760,511],{"class":500},[495,762,763],{"class":750}," range",[495,765,766],{"class":500}," result",[495,768,517],{"class":504},[495,770,771],{"class":520},"AllNotes",[495,773,774],{"class":504},"()",[495,776,777],{"class":504}," {\n",[495,779,781,784,786,789,791,794,798,801,803,806,808,812,815,817,819,821,824,826,828,830,833,835,837,839,842],{"class":497,"line":780},16,[495,782,783],{"class":500},"    fmt",[495,785,517],{"class":504},[495,787,788],{"class":520},"Printf",[495,790,524],{"class":504},[495,792,793],{"class":537},"\"[",[495,795,797],{"class":796},"scyPU","%s",[495,799,800],{"class":537},"] ",[495,802,797],{"class":796},[495,804,805],{"class":537},": ",[495,807,797],{"class":796},[495,809,811],{"class":810},"suWN2","\\n",[495,813,814],{"class":537},"\"",[495,816,505],{"class":504},[495,818,758],{"class":500},[495,820,517],{"class":504},[495,822,823],{"class":500},"Source",[495,825,505],{"class":504},[495,827,758],{"class":500},[495,829,517],{"class":504},[495,831,832],{"class":500},"Key",[495,834,505],{"class":504},[495,836,758],{"class":500},[495,838,517],{"class":504},[495,840,841],{"class":500},"Content",[495,843,541],{"class":504},[495,845,847],{"class":497,"line":846},17,[495,848,849],{"class":504},"}\n",[495,851,853],{"class":497,"line":852},18,[495,854,855],{"class":582},"// [input] request: \"I'd like a refund for order #12345...\"\n",[495,857,859],{"class":497,"line":858},19,[495,860,861],{"class":582},"// [analyze] parse: {\"order_id\": \"12345\", \"amount\": 49.99, \"reason\": \"arrived damaged\"}\n",[495,863,865],{"class":497,"line":864},20,[495,866,867],{"class":582},"// [seek] history: \"No previous refund requests found for this customer\"\n",[495,869,871],{"class":497,"line":870},21,[495,872,873],{"class":582},"// [decide] approve: \"yes\"\n",[495,875,877],{"class":497,"line":876},22,[495,878,879],{"class":582},"// [introspect] approve: \"Approved: first-time request, clear damage claim, within policy window\"\n",[404,881,882,883,887],{},"Introspection adds a semantic summary explaining ",[884,885,886],"em",{},"why"," — context for subsequent steps or human review. Notes persist with vector embeddings, enabling semantic search across all stored reasoning.",[478,889,891],{"id":890},"install","Install",[486,893,897],{"className":894,"code":895,"language":896,"meta":64,"style":64},"language-bash shiki shiki-themes","go get github.com/zoobz-io/cogito\n","bash",[492,898,899],{"__ignoreMap":64},[495,900,901,903,906],{"class":497,"line":9},[495,902,490],{"class":520},[495,904,905],{"class":537}," get",[495,907,908],{"class":537}," github.com/zoobz-io/cogito\n",[404,910,911],{},"Requires Go 1.21+.",[478,913,915],{"id":914},"quick-start","Quick Start",[486,917,919],{"className":488,"code":918,"language":490,"meta":64,"style":64},"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",[492,920,921,930,934,943,948,953,958,962,967,971,975,988,1000,1011,1025,1029,1033,1045,1063,1067,1072,1088,1114,1119,1125,1138,1143,1149,1170,1191,1199,1219,1233,1255,1287,1304,1312,1328,1336,1344,1350,1355,1361,1394,1423,1428,1434,1463,1479,1497,1503,1508,1514,1539,1563,1600],{"__ignoreMap":64},[495,922,923,927],{"class":497,"line":9},[495,924,926],{"class":925},"sUt3r","package",[495,928,929],{"class":623}," main\n",[495,931,932],{"class":497,"line":20},[495,933,577],{"emptyLinePlaceholder":576},[495,935,936,939],{"class":497,"line":70},[495,937,938],{"class":925},"import",[495,940,942],{"class":941},"soy-K"," (\n",[495,944,945],{"class":497,"line":235},[495,946,947],{"class":537},"    \"context\"\n",[495,949,950],{"class":497,"line":586},[495,951,952],{"class":537},"    \"fmt\"\n",[495,954,955],{"class":497,"line":609},[495,956,957],{"class":537},"    \"log\"\n",[495,959,960],{"class":497,"line":641},[495,961,577],{"emptyLinePlaceholder":576},[495,963,964],{"class":497,"line":663},[495,965,966],{"class":537},"    \"github.com/zoobz-io/cogito\"\n",[495,968,969],{"class":497,"line":686},[495,970,541],{"class":941},[495,972,973],{"class":497,"line":695},[495,974,577],{"emptyLinePlaceholder":576},[495,976,977,980,983,986],{"class":497,"line":700},[495,978,979],{"class":925},"type",[495,981,982],{"class":623}," TicketData",[495,984,985],{"class":925}," struct",[495,987,777],{"class":504},[495,989,990,994,997],{"class":497,"line":705},[495,991,993],{"class":992},"sBGCq","    CustomerName",[495,995,996],{"class":623}," string",[495,998,999],{"class":537},"   `json:\"customer_name\"`\n",[495,1001,1002,1005,1008],{"class":497,"line":736},[495,1003,1004],{"class":992},"    Issue",[495,1006,1007],{"class":623},"        string",[495,1009,1010],{"class":537},"   `json:\"issue\"`\n",[495,1012,1013,1016,1019,1022],{"class":497,"line":741},[495,1014,1015],{"class":992},"    Urgency",[495,1017,1018],{"class":504},"      []",[495,1020,1021],{"class":623},"string",[495,1023,1024],{"class":537}," `json:\"urgency_indicators\"`\n",[495,1026,1027],{"class":497,"line":747},[495,1028,849],{"class":504},[495,1030,1031],{"class":497,"line":780},[495,1032,577],{"emptyLinePlaceholder":576},[495,1034,1035,1038,1041,1043],{"class":497,"line":846},[495,1036,1037],{"class":925},"func",[495,1039,1040],{"class":520}," main",[495,1042,774],{"class":504},[495,1044,777],{"class":504},[495,1046,1047,1050,1052,1055,1057,1060],{"class":497,"line":852},[495,1048,1049],{"class":500},"    ctx",[495,1051,511],{"class":500},[495,1053,1054],{"class":500}," context",[495,1056,517],{"class":504},[495,1058,1059],{"class":520},"Background",[495,1061,1062],{"class":504},"()\n",[495,1064,1065],{"class":497,"line":858},[495,1066,577],{"emptyLinePlaceholder":576},[495,1068,1069],{"class":497,"line":864},[495,1070,1071],{"class":582},"    // Configure providers\n",[495,1073,1074,1076,1078,1081,1083,1086],{"class":497,"line":870},[495,1075,612],{"class":500},[495,1077,517],{"class":504},[495,1079,1080],{"class":520},"SetProvider",[495,1082,524],{"class":504},[495,1084,1085],{"class":500},"myLLMProvider",[495,1087,541],{"class":504},[495,1089,1090,1092,1094,1097,1099,1101,1103,1106,1108,1111],{"class":497,"line":876},[495,1091,612],{"class":500},[495,1093,517],{"class":504},[495,1095,1096],{"class":520},"SetEmbedder",[495,1098,524],{"class":504},[495,1100,12],{"class":500},[495,1102,517],{"class":504},[495,1104,1105],{"class":520},"NewOpenAIEmbedder",[495,1107,524],{"class":504},[495,1109,1110],{"class":500},"apiKey",[495,1112,1113],{"class":504},"))\n",[495,1115,1117],{"class":497,"line":1116},23,[495,1118,577],{"emptyLinePlaceholder":576},[495,1120,1122],{"class":497,"line":1121},24,[495,1123,1124],{"class":582},"    // Connect to memory (implement cogito.Memory interface)\n",[495,1126,1128,1131,1133,1136],{"class":497,"line":1127},25,[495,1129,1130],{"class":500},"    memory",[495,1132,511],{"class":500},[495,1134,1135],{"class":520}," NewMyMemory",[495,1137,1062],{"class":504},[495,1139,1141],{"class":497,"line":1140},26,[495,1142,577],{"emptyLinePlaceholder":576},[495,1144,1146],{"class":497,"line":1145},27,[495,1147,1148],{"class":582},"    // Build a reasoning pipeline\n",[495,1150,1152,1155,1157,1159,1161,1163,1165,1168],{"class":497,"line":1151},28,[495,1153,1154],{"class":500},"    pipeline",[495,1156,511],{"class":500},[495,1158,514],{"class":500},[495,1160,517],{"class":504},[495,1162,598],{"class":520},[495,1164,524],{"class":504},[495,1166,1167],{"class":537},"\"ticket-triage\"",[495,1169,606],{"class":504},[495,1171,1173,1176,1178,1180,1182,1185,1187,1189],{"class":497,"line":1172},29,[495,1174,1175],{"class":500},"        cogito",[495,1177,517],{"class":504},[495,1179,617],{"class":520},[495,1181,620],{"class":504},[495,1183,1184],{"class":623},"TicketData",[495,1186,627],{"class":504},[495,1188,630],{"class":537},[495,1190,606],{"class":504},[495,1192,1194,1197],{"class":497,"line":1193},30,[495,1195,1196],{"class":537},"            \"extract customer name, issue description, and urgency indicators\"",[495,1198,638],{"class":504},[495,1200,1202,1204,1206,1208,1210,1212,1214,1217],{"class":497,"line":1201},31,[495,1203,1175],{"class":500},[495,1205,517],{"class":504},[495,1207,648],{"class":520},[495,1209,524],{"class":504},[495,1211,653],{"class":537},[495,1213,505],{"class":504},[495,1215,1216],{"class":537}," \"similar support issues and resolutions\"",[495,1218,683],{"class":504},[495,1220,1222,1225,1227,1231],{"class":497,"line":1221},32,[495,1223,1224],{"class":520},"            WithLimit",[495,1226,524],{"class":504},[495,1228,1230],{"class":1229},"sMAmT","5",[495,1232,638],{"class":504},[495,1234,1236,1238,1240,1243,1245,1248,1250,1253],{"class":497,"line":1235},33,[495,1237,1175],{"class":500},[495,1239,517],{"class":504},[495,1241,1242],{"class":520},"NewCategorize",[495,1244,524],{"class":504},[495,1246,1247],{"class":537},"\"category\"",[495,1249,505],{"class":504},[495,1251,1252],{"class":537}," \"what type of support issue is this?\"",[495,1254,606],{"class":504},[495,1256,1258,1261,1263,1266,1269,1271,1274,1276,1279,1281,1284],{"class":497,"line":1257},34,[495,1259,1260],{"class":504},"            []",[495,1262,1021],{"class":623},[495,1264,1265],{"class":504},"{",[495,1267,1268],{"class":537},"\"billing\"",[495,1270,505],{"class":504},[495,1272,1273],{"class":537}," \"technical\"",[495,1275,505],{"class":504},[495,1277,1278],{"class":537}," \"account\"",[495,1280,505],{"class":504},[495,1282,1283],{"class":537}," \"feature_request\"",[495,1285,1286],{"class":504},"}),\n",[495,1288,1290,1292,1294,1297,1299,1302],{"class":497,"line":1289},35,[495,1291,1175],{"class":500},[495,1293,517],{"class":504},[495,1295,1296],{"class":520},"NewAssess",[495,1298,524],{"class":504},[495,1300,1301],{"class":537},"\"urgency\"",[495,1303,606],{"class":504},[495,1305,1307,1310],{"class":497,"line":1306},36,[495,1308,1309],{"class":537},"            \"how urgent is this ticket based on tone and content?\"",[495,1311,638],{"class":504},[495,1313,1315,1317,1319,1321,1323,1326],{"class":497,"line":1314},37,[495,1316,1175],{"class":500},[495,1318,517],{"class":504},[495,1320,670],{"class":520},[495,1322,524],{"class":504},[495,1324,1325],{"class":537},"\"escalate\"",[495,1327,606],{"class":504},[495,1329,1331,1334],{"class":497,"line":1330},38,[495,1332,1333],{"class":537},"            \"should this ticket be escalated to a senior agent?\"",[495,1335,683],{"class":504},[495,1337,1339,1342],{"class":497,"line":1338},39,[495,1340,1341],{"class":520},"            WithIntrospection",[495,1343,692],{"class":504},[495,1345,1347],{"class":497,"line":1346},40,[495,1348,1349],{"class":504},"    )\n",[495,1351,1353],{"class":497,"line":1352},41,[495,1354,577],{"emptyLinePlaceholder":576},[495,1356,1358],{"class":497,"line":1357},42,[495,1359,1360],{"class":582},"    // Create a thought with initial context\n",[495,1362,1364,1367,1369,1371,1373,1375,1377,1379,1381,1383,1385,1387,1389,1392],{"class":497,"line":1363},43,[495,1365,1366],{"class":500},"    thought",[495,1368,505],{"class":504},[495,1370,508],{"class":500},[495,1372,511],{"class":500},[495,1374,514],{"class":500},[495,1376,517],{"class":504},[495,1378,521],{"class":520},[495,1380,524],{"class":504},[495,1382,527],{"class":500},[495,1384,505],{"class":504},[495,1386,532],{"class":500},[495,1388,505],{"class":504},[495,1390,1391],{"class":537}," \"triage support ticket\"",[495,1393,541],{"class":504},[495,1395,1397,1399,1401,1403,1405,1407,1409,1412,1414,1417,1419,1421],{"class":497,"line":1396},44,[495,1398,1366],{"class":500},[495,1400,517],{"class":504},[495,1402,550],{"class":520},[495,1404,524],{"class":504},[495,1406,527],{"class":500},[495,1408,505],{"class":504},[495,1410,1411],{"class":537}," \"ticket\"",[495,1413,505],{"class":504},[495,1415,1416],{"class":500}," incomingTicket",[495,1418,505],{"class":504},[495,1420,569],{"class":537},[495,1422,541],{"class":504},[495,1424,1426],{"class":497,"line":1425},45,[495,1427,577],{"emptyLinePlaceholder":576},[495,1429,1431],{"class":497,"line":1430},46,[495,1432,1433],{"class":582},"    // Execute the pipeline\n",[495,1435,1437,1440,1442,1445,1447,1449,1451,1453,1455,1457,1459,1461],{"class":497,"line":1436},47,[495,1438,1439],{"class":500},"    result",[495,1441,505],{"class":504},[495,1443,1444],{"class":500}," err",[495,1446,511],{"class":500},[495,1448,717],{"class":500},[495,1450,517],{"class":504},[495,1452,722],{"class":520},[495,1454,524],{"class":504},[495,1456,527],{"class":500},[495,1458,505],{"class":504},[495,1460,731],{"class":500},[495,1462,541],{"class":504},[495,1464,1466,1469,1471,1474,1477],{"class":497,"line":1465},48,[495,1467,1468],{"class":750},"    if",[495,1470,1444],{"class":500},[495,1472,1473],{"class":750}," !=",[495,1475,1476],{"class":925}," nil",[495,1478,777],{"class":504},[495,1480,1482,1485,1487,1490,1492,1495],{"class":497,"line":1481},49,[495,1483,1484],{"class":500},"        log",[495,1486,517],{"class":504},[495,1488,1489],{"class":520},"Fatal",[495,1491,524],{"class":504},[495,1493,1494],{"class":500},"err",[495,1496,541],{"class":504},[495,1498,1500],{"class":497,"line":1499},50,[495,1501,1502],{"class":504},"    }\n",[495,1504,1506],{"class":497,"line":1505},51,[495,1507,577],{"emptyLinePlaceholder":576},[495,1509,1511],{"class":497,"line":1510},52,[495,1512,1513],{"class":582},"    // Results are Notes\n",[495,1515,1517,1520,1522,1524,1526,1528,1530,1533,1535,1537],{"class":497,"line":1516},53,[495,1518,1519],{"class":500},"    category",[495,1521,505],{"class":504},[495,1523,508],{"class":500},[495,1525,511],{"class":500},[495,1527,766],{"class":500},[495,1529,517],{"class":504},[495,1531,1532],{"class":520},"GetContent",[495,1534,524],{"class":504},[495,1536,1247],{"class":537},[495,1538,541],{"class":504},[495,1540,1542,1545,1547,1549,1551,1553,1555,1557,1559,1561],{"class":497,"line":1541},54,[495,1543,1544],{"class":500},"    escalate",[495,1546,505],{"class":504},[495,1548,508],{"class":500},[495,1550,511],{"class":500},[495,1552,766],{"class":500},[495,1554,517],{"class":504},[495,1556,1532],{"class":520},[495,1558,524],{"class":504},[495,1560,1325],{"class":537},[495,1562,541],{"class":504},[495,1564,1566,1568,1570,1572,1574,1577,1579,1582,1584,1586,1588,1590,1593,1595,1598],{"class":497,"line":1565},55,[495,1567,783],{"class":500},[495,1569,517],{"class":504},[495,1571,788],{"class":520},[495,1573,524],{"class":504},[495,1575,1576],{"class":537},"\"Category: ",[495,1578,797],{"class":796},[495,1580,1581],{"class":537},", Escalate: ",[495,1583,797],{"class":796},[495,1585,811],{"class":810},[495,1587,814],{"class":537},[495,1589,505],{"class":504},[495,1591,1592],{"class":500}," category",[495,1594,505],{"class":504},[495,1596,1597],{"class":500}," escalate",[495,1599,541],{"class":504},[495,1601,1603],{"class":497,"line":1602},56,[495,1604,849],{"class":504},[478,1606,1608],{"id":1607},"capabilities","Capabilities",[1610,1611,1612,1628],"table",{},[1613,1614,1615],"thead",{},[1616,1617,1618,1622,1625],"tr",{},[1619,1620,1621],"th",{},"Feature",[1619,1623,1624],{},"Description",[1619,1626,1627],{},"Docs",[1629,1630,1631,1645,1658,1672,1685,1697],"tbody",{},[1616,1632,1633,1637,1640],{},[1634,1635,1636],"td",{},"Reasoning Primitives",[1634,1638,1639],{},"Decide, Analyze, Categorize, Assess, Prioritize",[1634,1641,1642],{},[407,1643,247],{"href":1644},"docs/learn/primitives",[1616,1646,1647,1650,1653],{},[1634,1648,1649],{},"Semantic Control Flow",[1634,1651,1652],{},"Sift (LLM gate) and Discern (LLM router)",[1634,1654,1655],{},[407,1656,280],{"href":1657},"docs/guides/control-flow",[1616,1659,1660,1663,1666],{},[1634,1661,1662],{},"Memory & Reflection",[1634,1664,1665],{},"Recall, Reflect, Checkpoint, Seek, Survey",[1634,1667,1668],{},[407,1669,1671],{"href":1670},"docs/guides/memory","Memory",[1616,1673,1674,1676,1679],{},[1634,1675,303],{},[1634,1677,1678],{},"Compress and Truncate for token control",[1634,1680,1681],{},[407,1682,1684],{"href":1683},"docs/guides/sessions","Sessions",[1616,1686,1687,1689,1692],{},[1634,1688,322],{},[1634,1690,1691],{},"Amplify (iterative refinement), Converge (parallel synthesis)",[1634,1693,1694],{},[407,1695,322],{"href":1696},"docs/guides/synthesis",[1616,1698,1699,1702,1705],{},[1634,1700,1701],{},"Two-Phase Reasoning",[1634,1703,1704],{},"Deterministic decisions with optional creative introspection",[1634,1706,1707],{},[407,1708,1710],{"href":1709},"docs/learn/introspection","Introspection",[478,1712,1714],{"id":1713},"why-cogito","Why cogito?",[1716,1717,1718,1731,1737,1743,1749,1761],"ul",{},[1719,1720,1721,1725,1726],"li",{},[1722,1723,1724],"strong",{},"Composable reasoning"," — Chain primitives into pipelines via ",[407,1727,1730],{"href":1728,"rel":1729},"https://github.com/zoobz-io/pipz",[411],"pipz",[1719,1732,1733,1736],{},[1722,1734,1735],{},"Semantic memory"," — Notes persist with vector embeddings for similarity search",[1719,1738,1739,1742],{},[1722,1740,1741],{},"Context accumulation"," — Each step builds on previous reasoning",[1719,1744,1745,1748],{},[1722,1746,1747],{},"Two-phase reasoning"," — Deterministic decisions with optional creative introspection",[1719,1750,1751,1754,1755,1760],{},[1722,1752,1753],{},"Observable"," — Emits ",[407,1756,1759],{"href":1757,"rel":1758},"https://github.com/zoobz-io/capitan",[411],"capitan"," signals throughout execution",[1719,1762,1763,1766,1767,1770],{},[1722,1764,1765],{},"Extensible"," — Implement ",[492,1768,1769],{},"pipz.Chainable[*Thought]"," for custom primitives",[478,1772,1649],{"id":1773},"semantic-control-flow",[404,1775,1776],{},"Traditional pipelines route on data. Cogito routes on meaning.",[486,1778,1780],{"className":488,"code":1779,"language":490,"meta":64,"style":64},"// 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",[492,1781,1782,1787,1808,1815,1822,1826,1830,1835,1861,1894,1907,1919,1931,1936],{"__ignoreMap":64},[495,1783,1784],{"class":497,"line":9},[495,1785,1786],{"class":582},"// Sift: LLM decides whether to execute\n",[495,1788,1789,1792,1794,1796,1798,1801,1803,1806],{"class":497,"line":20},[495,1790,1791],{"class":500},"urgent",[495,1793,511],{"class":500},[495,1795,514],{"class":500},[495,1797,517],{"class":504},[495,1799,1800],{"class":520},"NewSift",[495,1802,524],{"class":504},[495,1804,1805],{"class":537},"\"urgent-only\"",[495,1807,606],{"class":504},[495,1809,1810,1813],{"class":497,"line":70},[495,1811,1812],{"class":537},"    \"is this request time-sensitive?\"",[495,1814,606],{"class":504},[495,1816,1817,1820],{"class":497,"line":235},[495,1818,1819],{"class":500},"    expeditedHandler",[495,1821,606],{"class":504},[495,1823,1824],{"class":497,"line":586},[495,1825,541],{"class":504},[495,1827,1828],{"class":497,"line":609},[495,1829,577],{"emptyLinePlaceholder":576},[495,1831,1832],{"class":497,"line":641},[495,1833,1834],{"class":582},"// Discern: LLM classifies and routes\n",[495,1836,1837,1840,1842,1844,1846,1849,1851,1854,1856,1859],{"class":497,"line":663},[495,1838,1839],{"class":500},"router",[495,1841,511],{"class":500},[495,1843,514],{"class":500},[495,1845,517],{"class":504},[495,1847,1848],{"class":520},"NewDiscern",[495,1850,524],{"class":504},[495,1852,1853],{"class":537},"\"route\"",[495,1855,505],{"class":504},[495,1857,1858],{"class":537}," \"how should we handle this?\"",[495,1860,606],{"class":504},[495,1862,1863,1866,1868,1870,1873,1875,1877,1880,1882,1885,1887,1889,1891],{"class":497,"line":686},[495,1864,1865],{"class":925},"    map",[495,1867,620],{"class":504},[495,1869,1021],{"class":623},[495,1871,1872],{"class":504},"]",[495,1874,1730],{"class":623},[495,1876,517],{"class":504},[495,1878,1879],{"class":623},"Chainable",[495,1881,620],{"class":504},[495,1883,1884],{"class":750},"*",[495,1886,12],{"class":623},[495,1888,517],{"class":504},[495,1890,96],{"class":623},[495,1892,1893],{"class":504},"]{\n",[495,1895,1896,1899,1902,1905],{"class":497,"line":695},[495,1897,1898],{"class":537},"        \"approve\"",[495,1900,1901],{"class":504},":",[495,1903,1904],{"class":500}," approvalFlow",[495,1906,606],{"class":504},[495,1908,1909,1912,1914,1917],{"class":497,"line":700},[495,1910,1911],{"class":537},"        \"review\"",[495,1913,1901],{"class":504},[495,1915,1916],{"class":500},"  manualReviewFlow",[495,1918,606],{"class":504},[495,1920,1921,1924,1926,1929],{"class":497,"line":705},[495,1922,1923],{"class":537},"        \"decline\"",[495,1925,1901],{"class":504},[495,1927,1928],{"class":500}," declineFlow",[495,1930,606],{"class":504},[495,1932,1933],{"class":497,"line":736},[495,1934,1935],{"class":504},"    },\n",[495,1937,1938],{"class":497,"line":741},[495,1939,541],{"class":504},[404,1941,1942],{},"Control flow adapts to domain changes without code changes — the LLM interprets intent.",[404,1944,1945,1946,1951],{},"Integrate with ",[407,1947,1950],{"href":1948,"rel":1949},"https://github.com/zoobz-io/flume",[411],"flume"," for declarative, hot-reloadable pipeline definitions.",[478,1953,1955],{"id":1954},"documentation","Documentation",[1716,1957,1958],{},[1719,1959,1960,1963],{},[407,1961,6],{"href":1962},"docs/overview"," — Design philosophy and architecture",[1965,1966,363],"h3",{"id":1967},"learn",[1716,1969,1970,1976,1981,1986],{},[1719,1971,1972,1975],{},[407,1973,43],{"href":1974},"docs/learn/quickstart"," — Build your first reasoning pipeline",[1719,1977,1978,1980],{},[407,1979,247],{"href":1644}," — Decide, Analyze, Categorize, and more",[1719,1982,1983,1985],{},[407,1984,1710],{"href":1709}," — Two-phase reasoning",[1719,1987,1988,1991],{},[407,1989,33],{"href":1990},"docs/learn/architecture"," — Thought-Note-Memory model",[1965,1993,1995],{"id":1994},"guides","Guides",[1716,1997,1998,2003,2008,2013,2018,2027],{},[1719,1999,2000,2002],{},[407,2001,280],{"href":1657}," — Sift and Discern for semantic routing",[1719,2004,2005,2007],{},[407,2006,1671],{"href":1670}," — Persistence and semantic search",[1719,2009,2010,2012],{},[407,2011,1684],{"href":1683}," — Token management with Compress and Truncate",[1719,2014,2015,2017],{},[407,2016,322],{"href":1696}," — Amplify and Converge patterns",[1719,2019,2020,2023,2024],{},[407,2021,201],{"href":2022},"docs/guides/custom-primitives"," — Implementing Chainable",[495,2025,2026],{},"*Thought",[1719,2028,2029,2033],{},[407,2030,2032],{"href":2031},"docs/guides/testing","Testing"," — Testing reasoning pipelines",[1965,2035,2037],{"id":2036},"cookbook","Cookbook",[1716,2039,2040,2047,2054],{},[1719,2041,2042,2046],{},[407,2043,2045],{"href":2044},"docs/cookbook/support-triage","Support Triage"," — Ticket classification and routing",[1719,2048,2049,2053],{},[407,2050,2052],{"href":2051},"docs/cookbook/document-analysis","Document Analysis"," — Extract and reason over documents",[1719,2055,2056,2060],{},[407,2057,2059],{"href":2058},"docs/cookbook/decision-workflows","Decision Workflows"," — Multi-step approval flows",[1965,2062,375],{"id":2063},"reference",[1716,2065,2066,2073,2079],{},[1719,2067,2068,2072],{},[407,2069,2071],{"href":2070},"docs/reference/api","API"," — Complete function documentation",[1719,2074,2075,2078],{},[407,2076,247],{"href":2077},"docs/reference/primitives"," — All primitives with signatures",[1719,2080,2081,2085],{},[407,2082,2084],{"href":2083},"docs/reference/types","Types"," — Thought, Note, Memory, Provider",[478,2087,2089],{"id":2088},"contributing","Contributing",[404,2091,2092,2093,2097],{},"See ",[407,2094,2096],{"href":2095},"CONTRIBUTING","CONTRIBUTING.md"," for guidelines.",[478,2099,454],{"id":2100},"license",[404,2102,2103,2104,2106],{},"MIT License — see ",[407,2105,451],{"href":451}," for details.",[2108,2109,2110],"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":64,"searchDepth":20,"depth":20,"links":2112},[2113,2114,2115,2116,2117,2118,2119,2125,2126],{"id":480,"depth":20,"text":481},{"id":890,"depth":20,"text":891},{"id":914,"depth":20,"text":915},{"id":1607,"depth":20,"text":1608},{"id":1713,"depth":20,"text":1714},{"id":1773,"depth":20,"text":1649},{"id":1954,"depth":20,"text":1955,"children":2120},[2121,2122,2123,2124],{"id":1967,"depth":70,"text":363},{"id":1994,"depth":70,"text":1995},{"id":2036,"depth":70,"text":2037},{"id":2063,"depth":70,"text":375},{"id":2088,"depth":20,"text":2089},{"id":2100,"depth":20,"text":454},"md","book-open",{},"/readme",{"title":396,"description":64},"readme","_gzEMeeO91REDqbm1oABQZ78v3ctfqSuyHaxVoS0s78",{"id":2135,"title":2136,"body":2137,"description":64,"extension":2127,"icon":2614,"meta":2615,"navigation":576,"path":2616,"seo":2617,"stem":2618,"__hash__":2619},"resources/security.md","Security",{"type":398,"value":2138,"toc":2599},[2139,2143,2147,2150,2189,2193,2196,2200,2205,2208,2247,2251,2254,2303,2307,2333,2337,2340,2344,2347,2454,2458,2461,2492,2496,2499,2525,2529,2532,2557,2561,2575,2579,2582,2587,2590,2596],[401,2140,2142],{"id":2141},"security-policy","Security Policy",[478,2144,2146],{"id":2145},"supported-versions","Supported Versions",[404,2148,2149],{},"We release patches for security vulnerabilities. Which versions are eligible for receiving such patches depends on the CVSS v3.0 Rating:",[1610,2151,2152,2165],{},[1613,2153,2154],{},[1616,2155,2156,2159,2162],{},[1619,2157,2158],{},"Version",[1619,2160,2161],{},"Supported",[1619,2163,2164],{},"Status",[1629,2166,2167,2178],{},[1616,2168,2169,2172,2175],{},[1634,2170,2171],{},"latest",[1634,2173,2174],{},"✅",[1634,2176,2177],{},"Active development",[1616,2179,2180,2183,2186],{},[1634,2181,2182],{},"\u003C latest",[1634,2184,2185],{},"❌",[1634,2187,2188],{},"Security fixes only for critical issues",[478,2190,2192],{"id":2191},"reporting-a-vulnerability","Reporting a Vulnerability",[404,2194,2195],{},"We take the security of cogito seriously. If you have discovered a security vulnerability in this project, please report it responsibly.",[1965,2197,2199],{"id":2198},"how-to-report","How to Report",[404,2201,2202],{},[1722,2203,2204],{},"Please DO NOT report security vulnerabilities through public GitHub issues.",[404,2206,2207],{},"Instead, please report them via one of the following methods:",[2209,2210,2211,2234],"ol",{},[1719,2212,2213,2216,2217],{},[1722,2214,2215],{},"GitHub Security Advisories"," (Preferred)",[1716,2218,2219,2228,2231],{},[1719,2220,2221,2222,2227],{},"Go to the ",[407,2223,2226],{"href":2224,"rel":2225},"https://github.com/zoobz-io/cogito/security",[411],"Security tab"," of this repository",[1719,2229,2230],{},"Click \"Report a vulnerability\"",[1719,2232,2233],{},"Fill out the form with details about the vulnerability",[1719,2235,2236,2239],{},[1722,2237,2238],{},"Email",[1716,2240,2241,2244],{},[1719,2242,2243],{},"Send details to the repository maintainer through GitHub profile contact information",[1719,2245,2246],{},"Use PGP encryption if possible for sensitive details",[1965,2248,2250],{"id":2249},"what-to-include","What to Include",[404,2252,2253],{},"Please include the following information (as much as you can provide) to help us better understand the nature and scope of the possible issue:",[1716,2255,2256,2262,2268,2274,2280,2285,2291,2297],{},[1719,2257,2258,2261],{},[1722,2259,2260],{},"Type of issue"," (e.g., prompt injection, data leakage, memory exposure, etc.)",[1719,2263,2264,2267],{},[1722,2265,2266],{},"Full paths of source file(s)"," related to the manifestation of the issue",[1719,2269,2270,2273],{},[1722,2271,2272],{},"The location of the affected source code"," (tag/branch/commit or direct URL)",[1719,2275,2276,2279],{},[1722,2277,2278],{},"Any special configuration required"," to reproduce the issue",[1719,2281,2282,2279],{},[1722,2283,2284],{},"Step-by-step instructions",[1719,2286,2287,2290],{},[1722,2288,2289],{},"Proof-of-concept or exploit code"," (if possible)",[1719,2292,2293,2296],{},[1722,2294,2295],{},"Impact of the issue",", including how an attacker might exploit the issue",[1719,2298,2299,2302],{},[1722,2300,2301],{},"Your name and affiliation"," (optional)",[1965,2304,2306],{"id":2305},"what-to-expect","What to Expect",[1716,2308,2309,2315,2321,2327],{},[1719,2310,2311,2314],{},[1722,2312,2313],{},"Acknowledgment",": We will acknowledge receipt of your vulnerability report within 48 hours",[1719,2316,2317,2320],{},[1722,2318,2319],{},"Initial Assessment",": Within 7 days, we will provide an initial assessment of the report",[1719,2322,2323,2326],{},[1722,2324,2325],{},"Resolution Timeline",": We aim to resolve critical issues within 30 days",[1719,2328,2329,2332],{},[1722,2330,2331],{},"Disclosure",": We will coordinate with you on the disclosure timeline",[1965,2334,2336],{"id":2335},"preferred-languages","Preferred Languages",[404,2338,2339],{},"We prefer all communications to be in English.",[478,2341,2343],{"id":2342},"security-best-practices","Security Best Practices",[404,2345,2346],{},"When using cogito in your applications, we recommend:",[2209,2348,2349,2370,2386,2406,2422,2438],{},[1719,2350,2351,2354],{},[1722,2352,2353],{},"Keep Dependencies Updated",[486,2355,2357],{"className":894,"code":2356,"language":896,"meta":64,"style":64},"go get -u github.com/zoobz-io/cogito\n",[492,2358,2359],{"__ignoreMap":64},[495,2360,2361,2363,2365,2368],{"class":497,"line":9},[495,2362,490],{"class":520},[495,2364,905],{"class":537},[495,2366,2367],{"class":925}," -u",[495,2369,908],{"class":537},[1719,2371,2372,2375],{},[1722,2373,2374],{},"Protect LLM Credentials",[1716,2376,2377,2380,2383],{},[1719,2378,2379],{},"Never hardcode API keys in source code",[1719,2381,2382],{},"Use environment variables or secret managers",[1719,2384,2385],{},"Rotate keys regularly",[1719,2387,2388,2391],{},[1722,2389,2390],{},"Validate LLM Outputs",[1716,2392,2393,2396,2399],{},[1719,2394,2395],{},"Treat LLM responses as untrusted input",[1719,2397,2398],{},"Validate extracted data before using in critical paths",[1719,2400,2401,2402,2405],{},"Use typed extraction (Analyze",[495,2403,2404],{},"T",") for structured data",[1719,2407,2408,2411],{},[1722,2409,2410],{},"Memory Security",[1716,2412,2413,2416,2419],{},[1719,2414,2415],{},"Be mindful of what data is persisted to Memory",[1719,2417,2418],{},"Implement access controls at the application layer",[1719,2420,2421],{},"Consider data retention policies for Notes",[1719,2423,2424,2427],{},[1722,2425,2426],{},"Context Management",[1716,2428,2429,2432,2435],{},[1719,2430,2431],{},"Use Compress/Truncate to limit context exposure",[1719,2433,2434],{},"Be aware that Notes accumulate across pipeline steps",[1719,2436,2437],{},"Review what information flows between primitives",[1719,2439,2440,2443],{},[1722,2441,2442],{},"Resource Management",[1716,2444,2445,2448,2451],{},[1719,2446,2447],{},"Use timeouts for all LLM operations",[1719,2449,2450],{},"Implement rate limiting for LLM calls",[1719,2452,2453],{},"Monitor token usage and costs",[478,2455,2457],{"id":2456},"security-features","Security Features",[404,2459,2460],{},"cogito includes several built-in security features:",[1716,2462,2463,2469,2475,2481,2486],{},[1719,2464,2465,2468],{},[1722,2466,2467],{},"Type Safety",": Generic types prevent type confusion in extracted data",[1719,2470,2471,2474],{},[1722,2472,2473],{},"Context Support",": Built-in cancellation and timeout support",[1719,2476,2477,2480],{},[1722,2478,2479],{},"Error Isolation",": Errors are properly wrapped and traced",[1719,2482,2483,2485],{},[1722,2484,192],{},": Full signal emission for audit trails via capitan",[1719,2487,2488,2491],{},[1722,2489,2490],{},"Session Isolation",": Separate LLM sessions prevent context leakage",[478,2493,2495],{"id":2494},"llm-specific-considerations","LLM-Specific Considerations",[404,2497,2498],{},"When building LLM-powered systems:",[1716,2500,2501,2507,2513,2519],{},[1719,2502,2503,2506],{},[1722,2504,2505],{},"Prompt Injection",": Validate and sanitize user inputs before including in prompts",[1719,2508,2509,2512],{},[1722,2510,2511],{},"Data Exfiltration",": Be cautious about what context is sent to external LLM providers",[1719,2514,2515,2518],{},[1722,2516,2517],{},"Hallucination",": Don't trust LLM outputs for security-critical decisions without validation",[1719,2520,2521,2524],{},[1722,2522,2523],{},"Cost Attacks",": Implement safeguards against requests designed to consume excessive tokens",[478,2526,2528],{"id":2527},"automated-security-scanning","Automated Security Scanning",[404,2530,2531],{},"This project uses:",[1716,2533,2534,2539,2545,2551],{},[1719,2535,2536,2538],{},[1722,2537,439],{},": GitHub's semantic code analysis for security vulnerabilities",[1719,2540,2541,2544],{},[1722,2542,2543],{},"Dependabot",": Automated dependency updates",[1719,2546,2547,2550],{},[1722,2548,2549],{},"golangci-lint",": Static analysis including security linters (gosec)",[1719,2552,2553,2556],{},[1722,2554,2555],{},"Codecov",": Coverage tracking to ensure security-critical code is tested",[478,2558,2560],{"id":2559},"vulnerability-disclosure-policy","Vulnerability Disclosure Policy",[1716,2562,2563,2566,2569,2572],{},[1719,2564,2565],{},"Security vulnerabilities will be disclosed via GitHub Security Advisories",[1719,2567,2568],{},"We follow a 90-day disclosure timeline for non-critical issues",[1719,2570,2571],{},"Critical vulnerabilities may be disclosed sooner after patches are available",[1719,2573,2574],{},"We will credit reporters who follow responsible disclosure practices",[478,2576,2578],{"id":2577},"credits","Credits",[404,2580,2581],{},"We thank the following individuals for responsibly disclosing security issues:",[404,2583,2584],{},[884,2585,2586],{},"This list is currently empty. Be the first to help improve our security!",[2588,2589],"hr",{},[404,2591,2592,2595],{},[1722,2593,2594],{},"Last Updated",": 2025-12-05",[2108,2597,2598],{},"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":64,"searchDepth":20,"depth":20,"links":2600},[2601,2602,2608,2609,2610,2611,2612,2613],{"id":2145,"depth":20,"text":2146},{"id":2191,"depth":20,"text":2192,"children":2603},[2604,2605,2606,2607],{"id":2198,"depth":70,"text":2199},{"id":2249,"depth":70,"text":2250},{"id":2305,"depth":70,"text":2306},{"id":2335,"depth":70,"text":2336},{"id":2342,"depth":20,"text":2343},{"id":2456,"depth":20,"text":2457},{"id":2494,"depth":20,"text":2495},{"id":2527,"depth":20,"text":2528},{"id":2559,"depth":20,"text":2560},{"id":2577,"depth":20,"text":2578},"shield",{},"/security",{"title":2136,"description":64},"security","6zBwm9Fdo0qcO3hA3nfDtG2AFdMmkzIR5NE4GGSzxX8",{"id":2621,"title":2089,"body":2622,"description":2630,"extension":2127,"icon":492,"meta":3211,"navigation":576,"path":3212,"seo":3213,"stem":2088,"__hash__":3214},"resources/contributing.md",{"type":398,"value":2623,"toc":3185},[2624,2628,2631,2635,2638,2642,2680,2684,2688,2706,2709,2725,2727,2738,2742,2746,2760,2764,2775,2779,2784,2787,2806,2810,2813,2830,2834,2837,2851,2855,2883,2886,2889,2904,2907,2923,2926,2942,2946,2954,2958,2961,3005,3009,3013,3016,3027,3030,3044,3048,3051,3079,3083,3109,3113,3140,3146,3150,3153,3164,3168,3179,3182],[401,2625,2627],{"id":2626},"contributing-to-cogito","Contributing to cogito",[404,2629,2630],{},"Thank you for your interest in contributing to cogito! This guide will help you get started.",[478,2632,2634],{"id":2633},"code-of-conduct","Code of Conduct",[404,2636,2637],{},"By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors.",[478,2639,2641],{"id":2640},"getting-started","Getting Started",[2209,2643,2644,2647,2653,2659,2662,2668,2671,2677],{},[1719,2645,2646],{},"Fork the repository",[1719,2648,2649,2650],{},"Clone your fork: ",[492,2651,2652],{},"git clone https://github.com/yourusername/cogito.git",[1719,2654,2655,2656],{},"Create a feature branch: ",[492,2657,2658],{},"git checkout -b feature/your-feature-name",[1719,2660,2661],{},"Make your changes",[1719,2663,2664,2665],{},"Run tests: ",[492,2666,2667],{},"go test ./...",[1719,2669,2670],{},"Commit your changes with a descriptive message",[1719,2672,2673,2674],{},"Push to your fork: ",[492,2675,2676],{},"git push origin feature/your-feature-name",[1719,2678,2679],{},"Create a Pull Request",[478,2681,2683],{"id":2682},"development-guidelines","Development Guidelines",[1965,2685,2687],{"id":2686},"code-style","Code Style",[1716,2689,2690,2693,2700,2703],{},[1719,2691,2692],{},"Follow standard Go conventions",[1719,2694,2695,2696,2699],{},"Run ",[492,2697,2698],{},"go fmt"," before committing",[1719,2701,2702],{},"Add comments for exported functions and types",[1719,2704,2705],{},"Keep functions small and focused",[1965,2707,2032],{"id":2708},"testing",[1716,2710,2711,2714,2719,2722],{},[1719,2712,2713],{},"Write tests for new functionality",[1719,2715,2716,2717],{},"Ensure all tests pass: ",[492,2718,2667],{},[1719,2720,2721],{},"Include benchmarks for performance-critical code",[1719,2723,2724],{},"Aim for good test coverage",[1965,2726,1955],{"id":1954},[1716,2728,2729,2732,2735],{},[1719,2730,2731],{},"Update documentation for API changes",[1719,2733,2734],{},"Add examples for new features",[1719,2736,2737],{},"Keep doc comments clear and concise",[478,2739,2741],{"id":2740},"types-of-contributions","Types of Contributions",[1965,2743,2745],{"id":2744},"bug-reports","Bug Reports",[1716,2747,2748,2751,2754,2757],{},[1719,2749,2750],{},"Use GitHub Issues",[1719,2752,2753],{},"Include minimal reproduction code",[1719,2755,2756],{},"Describe expected vs actual behavior",[1719,2758,2759],{},"Include Go version and OS",[1965,2761,2763],{"id":2762},"feature-requests","Feature Requests",[1716,2765,2766,2769,2772],{},[1719,2767,2768],{},"Open an issue for discussion first",[1719,2770,2771],{},"Explain the use case",[1719,2773,2774],{},"Consider backwards compatibility",[1965,2776,2778],{"id":2777},"code-contributions","Code Contributions",[2780,2781,2783],"h4",{"id":2782},"adding-primitives","Adding Primitives",[404,2785,2786],{},"New reasoning primitives should:",[1716,2788,2789,2794,2797,2800,2803],{},[1719,2790,2791,2792],{},"Implement ",[492,2793,1769],{},[1719,2795,2796],{},"Follow the existing pattern (two-phase reasoning with optional introspection)",[1719,2798,2799],{},"Emit appropriate capitan signals",[1719,2801,2802],{},"Include comprehensive tests",[1719,2804,2805],{},"Add documentation with examples",[2780,2807,2809],{"id":2808},"adding-memory-implementations","Adding Memory Implementations",[404,2811,2812],{},"New Memory implementations should:",[1716,2814,2815,2821,2824,2827],{},[1719,2816,2817,2818,2820],{},"Implement the ",[492,2819,1671],{}," interface fully",[1719,2822,2823],{},"Handle semantic search via vector embeddings",[1719,2825,2826],{},"Include tests for all operations",[1719,2828,2829],{},"Document any infrastructure requirements",[2780,2831,2833],{"id":2832},"examples","Examples",[404,2835,2836],{},"New examples should:",[1716,2838,2839,2842,2845,2848],{},[1719,2840,2841],{},"Solve a real-world reasoning problem",[1719,2843,2844],{},"Include tests",[1719,2846,2847],{},"Have a descriptive README",[1719,2849,2850],{},"Follow the existing structure",[478,2852,2854],{"id":2853},"pull-request-process","Pull Request Process",[2209,2856,2857,2863,2868,2873,2878],{},[1719,2858,2859,2862],{},[1722,2860,2861],{},"Keep PRs focused"," - One feature/fix per PR",[1719,2864,2865],{},[1722,2866,2867],{},"Write descriptive commit messages",[1719,2869,2870],{},[1722,2871,2872],{},"Update tests and documentation",[1719,2874,2875],{},[1722,2876,2877],{},"Ensure CI passes",[1719,2879,2880],{},[1722,2881,2882],{},"Respond to review feedback",[478,2884,2032],{"id":2885},"testing-1",[404,2887,2888],{},"Run the full test suite:",[486,2890,2892],{"className":894,"code":2891,"language":896,"meta":64,"style":64},"go test ./...\n",[492,2893,2894],{"__ignoreMap":64},[495,2895,2896,2898,2901],{"class":497,"line":9},[495,2897,490],{"class":520},[495,2899,2900],{"class":537}," test",[495,2902,2903],{"class":537}," ./...\n",[404,2905,2906],{},"Run with race detection:",[486,2908,2910],{"className":894,"code":2909,"language":896,"meta":64,"style":64},"go test -race ./...\n",[492,2911,2912],{"__ignoreMap":64},[495,2913,2914,2916,2918,2921],{"class":497,"line":9},[495,2915,490],{"class":520},[495,2917,2900],{"class":537},[495,2919,2920],{"class":925}," -race",[495,2922,2903],{"class":537},[404,2924,2925],{},"Run benchmarks:",[486,2927,2929],{"className":894,"code":2928,"language":896,"meta":64,"style":64},"go test -bench=. ./...\n",[492,2930,2931],{"__ignoreMap":64},[495,2932,2933,2935,2937,2940],{"class":497,"line":9},[495,2934,490],{"class":520},[495,2936,2900],{"class":537},[495,2938,2939],{"class":925}," -bench=.",[495,2941,2903],{"class":537},[478,2943,2945],{"id":2944},"project-structure","Project Structure",[486,2947,2952],{"className":2948,"code":2950,"language":2951},[2949],"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",[492,2953,2950],{"__ignoreMap":64},[478,2955,2957],{"id":2956},"commit-messages","Commit Messages",[404,2959,2960],{},"Follow conventional commits:",[1716,2962,2963,2969,2975,2981,2987,2993,2999],{},[1719,2964,2965,2968],{},[492,2966,2967],{},"feat:"," New feature",[1719,2970,2971,2974],{},[492,2972,2973],{},"fix:"," Bug fix",[1719,2976,2977,2980],{},[492,2978,2979],{},"docs:"," Documentation changes",[1719,2982,2983,2986],{},[492,2984,2985],{},"test:"," Test additions/changes",[1719,2988,2989,2992],{},[492,2990,2991],{},"refactor:"," Code refactoring",[1719,2994,2995,2998],{},[492,2996,2997],{},"perf:"," Performance improvements",[1719,3000,3001,3004],{},[492,3002,3003],{},"chore:"," Maintenance tasks",[478,3006,3008],{"id":3007},"release-process","Release Process",[1965,3010,3012],{"id":3011},"automated-releases","Automated Releases",[404,3014,3015],{},"This project uses automated release versioning. To create a release:",[2209,3017,3018,3021,3024],{},[1719,3019,3020],{},"Go to Actions → Release → Run workflow",[1719,3022,3023],{},"Leave \"Version override\" empty for automatic version inference",[1719,3025,3026],{},"Click \"Run workflow\"",[404,3028,3029],{},"The system will:",[1716,3031,3032,3035,3038,3041],{},[1719,3033,3034],{},"Automatically determine the next version from conventional commits",[1719,3036,3037],{},"Create a git tag",[1719,3039,3040],{},"Generate release notes via GoReleaser",[1719,3042,3043],{},"Publish the release to GitHub",[1965,3045,3047],{"id":3046},"manual-release-legacy","Manual Release (Legacy)",[404,3049,3050],{},"You can still create releases manually:",[486,3052,3054],{"className":894,"code":3053,"language":896,"meta":64,"style":64},"git tag v1.2.3\ngit push origin v1.2.3\n",[492,3055,3056,3067],{"__ignoreMap":64},[495,3057,3058,3061,3064],{"class":497,"line":9},[495,3059,3060],{"class":520},"git",[495,3062,3063],{"class":537}," tag",[495,3065,3066],{"class":537}," v1.2.3\n",[495,3068,3069,3071,3074,3077],{"class":497,"line":20},[495,3070,3060],{"class":520},[495,3072,3073],{"class":537}," push",[495,3075,3076],{"class":537}," origin",[495,3078,3066],{"class":537},[1965,3080,3082],{"id":3081},"known-limitations","Known Limitations",[1716,3084,3085,3091,3097],{},[1719,3086,3087,3090],{},[1722,3088,3089],{},"Protected branches",": The automated release cannot bypass branch protection rules. This is by design for security.",[1719,3092,3093,3096],{},[1722,3094,3095],{},"Concurrent releases",": Rapid successive releases may fail. Simply retry after a moment.",[1719,3098,3099,3102,3103,3105,3106,3108],{},[1722,3100,3101],{},"Conventional commits required",": Version inference requires conventional commit format (",[492,3104,2967],{},", ",[492,3107,2973],{},", etc.)",[1965,3110,3112],{"id":3111},"commit-conventions-for-versioning","Commit Conventions for Versioning",[1716,3114,3115,3120,3125,3131],{},[1719,3116,3117,3119],{},[492,3118,2967],{}," new features (minor version: 1.2.0 → 1.3.0)",[1719,3121,3122,3124],{},[492,3123,2973],{}," bug fixes (patch version: 1.2.0 → 1.2.1)",[1719,3126,3127,3130],{},[492,3128,3129],{},"feat!:"," breaking changes (major version: 1.2.0 → 2.0.0)",[1719,3132,3133,3105,3135,3105,3137,3139],{},[492,3134,2979],{},[492,3136,2985],{},[492,3138,3003],{}," no version change",[404,3141,3142,3143],{},"Example: ",[492,3144,3145],{},"feat(primitive): add Summarize primitive for context condensation",[1965,3147,3149],{"id":3148},"version-preview-on-pull-requests","Version Preview on Pull Requests",[404,3151,3152],{},"Every PR automatically shows the next version that will be created:",[1716,3154,3155,3158,3161],{},[1719,3156,3157],{},"Check PR comments for \"Version Preview\"",[1719,3159,3160],{},"Updates automatically as you add commits",[1719,3162,3163],{},"Helps verify your commits have the intended effect",[478,3165,3167],{"id":3166},"questions","Questions?",[1716,3169,3170,3173,3176],{},[1719,3171,3172],{},"Open an issue for questions",[1719,3174,3175],{},"Check existing issues first",[1719,3177,3178],{},"Be patient and respectful",[404,3180,3181],{},"Thank you for contributing to cogito!",[2108,3183,3184],{},"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":64,"searchDepth":20,"depth":20,"links":3186},[3187,3188,3189,3194,3199,3200,3201,3202,3203,3210],{"id":2633,"depth":20,"text":2634},{"id":2640,"depth":20,"text":2641},{"id":2682,"depth":20,"text":2683,"children":3190},[3191,3192,3193],{"id":2686,"depth":70,"text":2687},{"id":2708,"depth":70,"text":2032},{"id":1954,"depth":70,"text":1955},{"id":2740,"depth":20,"text":2741,"children":3195},[3196,3197,3198],{"id":2744,"depth":70,"text":2745},{"id":2762,"depth":70,"text":2763},{"id":2777,"depth":70,"text":2778},{"id":2853,"depth":20,"text":2854},{"id":2885,"depth":20,"text":2032},{"id":2944,"depth":20,"text":2945},{"id":2956,"depth":20,"text":2957},{"id":3007,"depth":20,"text":3008,"children":3204},[3205,3206,3207,3208,3209],{"id":3011,"depth":70,"text":3012},{"id":3046,"depth":70,"text":3047},{"id":3081,"depth":70,"text":3082},{"id":3111,"depth":70,"text":3112},{"id":3148,"depth":70,"text":3149},{"id":3166,"depth":20,"text":3167},{},"/contributing",{"title":2089,"description":2630},"X10dJScFliwaj37mqg0fRDjrKtaT5I_WsQfb2noWE00",{"id":3216,"title":87,"author":3217,"body":3218,"description":89,"extension":2127,"meta":4115,"navigation":576,"path":86,"published":4116,"readtime":4117,"seo":4118,"stem":370,"tags":4119,"updated":4121,"__hash__":4122},"cogito/v0.0.6/2.learn/2.concepts.md","zoobzio",{"type":398,"value":3219,"toc":4100},[3220,3223,3225,3227,3230,3241,3352,3355,3388,3391,3394,3425,3428,3431,3539,3542,3663,3666,3796,3799,3802,3852,3855,3858,3861,3954,3957,3977,4080,4083,4097],[401,3221,87],{"id":3222},"core-concepts",[404,3224,93],{},[478,3226,96],{"id":501},[404,3228,3229],{},"A Thought represents the rolling context of a reasoning chain. It maintains:",[1716,3231,3232,3235,3238],{},[1719,3233,3234],{},"An append-only log of Notes",[1719,3236,3237],{},"A tracking cursor for published vs unpublished Notes",[1719,3239,3240],{},"An LLM session for conversation continuity",[486,3242,3244],{"className":488,"code":3243,"language":490,"meta":64,"style":64},"// 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\"\n",[492,3245,3246,3251,3274,3278,3283,3308,3330],{"__ignoreMap":64},[495,3247,3248],{"class":497,"line":9},[495,3249,3250],{"class":582},"// Create a thought\n",[495,3252,3253,3255,3257,3259,3261,3263,3265,3267,3269,3272],{"class":497,"line":20},[495,3254,501],{"class":500},[495,3256,511],{"class":500},[495,3258,514],{"class":500},[495,3260,517],{"class":504},[495,3262,521],{"class":520},[495,3264,524],{"class":504},[495,3266,527],{"class":500},[495,3268,505],{"class":504},[495,3270,3271],{"class":537}," \"analyse document\"",[495,3273,541],{"class":504},[495,3275,3276],{"class":497,"line":70},[495,3277,577],{"emptyLinePlaceholder":576},[495,3279,3280],{"class":497,"line":235},[495,3281,3282],{"class":582},"// Thoughts have identity\n",[495,3284,3285,3288,3290,3293,3295,3297,3299,3302,3305],{"class":497,"line":586},[495,3286,3287],{"class":500},"fmt",[495,3289,517],{"class":504},[495,3291,3292],{"class":520},"Println",[495,3294,524],{"class":504},[495,3296,501],{"class":500},[495,3298,517],{"class":504},[495,3300,3301],{"class":500},"ID",[495,3303,3304],{"class":504},")",[495,3306,3307],{"class":582},"       // Auto-generated UUID\n",[495,3309,3310,3312,3314,3316,3318,3320,3322,3325,3327],{"class":497,"line":609},[495,3311,3287],{"class":500},[495,3313,517],{"class":504},[495,3315,3292],{"class":520},[495,3317,524],{"class":504},[495,3319,501],{"class":500},[495,3321,517],{"class":504},[495,3323,3324],{"class":500},"TraceID",[495,3326,3304],{"class":504},[495,3328,3329],{"class":582},"  // Auto-generated trace ID\n",[495,3331,3332,3334,3336,3338,3340,3342,3344,3347,3349],{"class":497,"line":641},[495,3333,3287],{"class":500},[495,3335,517],{"class":504},[495,3337,3292],{"class":520},[495,3339,524],{"class":504},[495,3341,501],{"class":500},[495,3343,517],{"class":504},[495,3345,3346],{"class":500},"Intent",[495,3348,3304],{"class":504},[495,3350,3351],{"class":582},"   // \"analyse document\"\n",[1965,3353,101],{"id":3354},"thought-lifecycle",[2209,3356,3357,3367,3376,3382],{},[1719,3358,3359,3362,3363,3366],{},[1722,3360,3361],{},"Creation"," - ",[492,3364,3365],{},"New()"," creates a thought with auto-generated ID",[1719,3368,3369,3372,3373],{},[1722,3370,3371],{},"Note Accumulation"," - Primitives add notes via ",[492,3374,3375],{},"SetContent()",[1719,3377,3378,3381],{},[1722,3379,3380],{},"Processing"," - Primitives read context from notes, call LLM, write results",[1719,3383,3384,3387],{},[1722,3385,3386],{},"Publication"," - Notes are marked as \"published\" after being sent to LLM",[1965,3389,106],{"id":3390},"cloning-for-parallel-processing",[404,3392,3393],{},"Thoughts can be cloned for parallel execution:",[486,3395,3397],{"className":488,"code":3396,"language":490,"meta":64,"style":64},"clone := thought.Clone()\n// Clone has independent notes and session\n// Modifications don't affect the original\n",[492,3398,3399,3415,3420],{"__ignoreMap":64},[495,3400,3401,3404,3406,3408,3410,3413],{"class":497,"line":9},[495,3402,3403],{"class":500},"clone",[495,3405,511],{"class":500},[495,3407,731],{"class":500},[495,3409,517],{"class":504},[495,3411,3412],{"class":520},"Clone",[495,3414,1062],{"class":504},[495,3416,3417],{"class":497,"line":20},[495,3418,3419],{"class":582},"// Clone has independent notes and session\n",[495,3421,3422],{"class":497,"line":70},[495,3423,3424],{"class":582},"// Modifications don't affect the original\n",[478,3426,111],{"id":3427},"note",[404,3429,3430],{},"Notes are atomic units of information in the reasoning chain:",[486,3432,3434],{"className":488,"code":3433,"language":490,"meta":64,"style":64},"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}\n",[492,3435,3436,3447,3457,3467,3478,3489,3508,3519,3535],{"__ignoreMap":64},[495,3437,3438,3440,3443,3445],{"class":497,"line":9},[495,3439,979],{"class":925},[495,3441,3442],{"class":623}," Note",[495,3444,985],{"class":925},[495,3446,777],{"class":504},[495,3448,3449,3452,3454],{"class":497,"line":20},[495,3450,3451],{"class":992},"    ID",[495,3453,1007],{"class":623},[495,3455,3456],{"class":582},"            // Auto-generated UUID\n",[495,3458,3459,3462,3464],{"class":497,"line":70},[495,3460,3461],{"class":992},"    ThoughtID",[495,3463,996],{"class":623},[495,3465,3466],{"class":582},"            // Parent thought\n",[495,3468,3469,3472,3475],{"class":497,"line":235},[495,3470,3471],{"class":992},"    Key",[495,3473,3474],{"class":623},"       string",[495,3476,3477],{"class":582},"            // Lookup key\n",[495,3479,3480,3483,3486],{"class":497,"line":586},[495,3481,3482],{"class":992},"    Content",[495,3484,3485],{"class":623},"   string",[495,3487,3488],{"class":582},"            // String content (everything is text in LLM space)\n",[495,3490,3491,3494,3497,3499,3501,3503,3505],{"class":497,"line":609},[495,3492,3493],{"class":992},"    Metadata",[495,3495,3496],{"class":925},"  map",[495,3498,620],{"class":504},[495,3500,1021],{"class":623},[495,3502,1872],{"class":504},[495,3504,1021],{"class":623},[495,3506,3507],{"class":582}," // Structured extension\n",[495,3509,3510,3513,3516],{"class":497,"line":641},[495,3511,3512],{"class":992},"    Source",[495,3514,3515],{"class":623},"    string",[495,3517,3518],{"class":582},"            // Origin primitive\n",[495,3520,3521,3524,3527,3529,3532],{"class":497,"line":663},[495,3522,3523],{"class":992},"    Created",[495,3525,3526],{"class":623},"   time",[495,3528,517],{"class":504},[495,3530,3531],{"class":623},"Time",[495,3533,3534],{"class":582},"         // Timestamp\n",[495,3536,3537],{"class":497,"line":686},[495,3538,849],{"class":504},[1965,3540,116],{"id":3541},"adding-notes",[486,3543,3545],{"className":488,"code":3544,"language":490,"meta":64,"style":64},"// 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})\n",[492,3546,3547,3552,3581,3585,3590,3634,3646,3658],{"__ignoreMap":64},[495,3548,3549],{"class":497,"line":9},[495,3550,3551],{"class":582},"// Simple content\n",[495,3553,3554,3556,3558,3560,3562,3564,3566,3569,3571,3574,3576,3579],{"class":497,"line":20},[495,3555,501],{"class":500},[495,3557,517],{"class":504},[495,3559,550],{"class":520},[495,3561,524],{"class":504},[495,3563,527],{"class":500},[495,3565,505],{"class":504},[495,3567,3568],{"class":537}," \"summary\"",[495,3570,505],{"class":504},[495,3572,3573],{"class":537}," \"Customer requests refund\"",[495,3575,505],{"class":504},[495,3577,3578],{"class":537}," \"analyze\"",[495,3580,541],{"class":504},[495,3582,3583],{"class":497,"line":70},[495,3584,577],{"emptyLinePlaceholder":576},[495,3586,3587],{"class":497,"line":235},[495,3588,3589],{"class":582},"// With metadata\n",[495,3591,3592,3594,3596,3599,3601,3603,3605,3608,3610,3613,3615,3618,3620,3623,3625,3627,3629,3631],{"class":497,"line":586},[495,3593,501],{"class":500},[495,3595,517],{"class":504},[495,3597,3598],{"class":520},"SetNote",[495,3600,524],{"class":504},[495,3602,527],{"class":500},[495,3604,505],{"class":504},[495,3606,3607],{"class":537}," \"decision\"",[495,3609,505],{"class":504},[495,3611,3612],{"class":537}," \"approved\"",[495,3614,505],{"class":504},[495,3616,3617],{"class":537}," \"decide\"",[495,3619,505],{"class":504},[495,3621,3622],{"class":925}," map",[495,3624,620],{"class":504},[495,3626,1021],{"class":623},[495,3628,1872],{"class":504},[495,3630,1021],{"class":623},[495,3632,3633],{"class":504},"{\n",[495,3635,3636,3639,3641,3644],{"class":497,"line":609},[495,3637,3638],{"class":537},"    \"confidence\"",[495,3640,1901],{"class":504},[495,3642,3643],{"class":537}," \"0.95\"",[495,3645,606],{"class":504},[495,3647,3648,3651,3653,3656],{"class":497,"line":641},[495,3649,3650],{"class":537},"    \"reasoning\"",[495,3652,1901],{"class":504},[495,3654,3655],{"class":537},"  \"Clear policy violation\"",[495,3657,606],{"class":504},[495,3659,3660],{"class":497,"line":663},[495,3661,3662],{"class":504},"})\n",[1965,3664,121],{"id":3665},"reading-notes",[486,3667,3669],{"className":488,"code":3668,"language":490,"meta":64,"style":64},"// 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()\n",[492,3670,3671,3676,3700,3704,3709,3734,3743,3768,3772,3776,3781],{"__ignoreMap":64},[495,3672,3673],{"class":497,"line":9},[495,3674,3675],{"class":582},"// Get content by key\n",[495,3677,3678,3681,3683,3685,3687,3689,3691,3693,3695,3698],{"class":497,"line":20},[495,3679,3680],{"class":500},"content",[495,3682,505],{"class":504},[495,3684,1444],{"class":500},[495,3686,511],{"class":500},[495,3688,731],{"class":500},[495,3690,517],{"class":504},[495,3692,1532],{"class":520},[495,3694,524],{"class":504},[495,3696,3697],{"class":537},"\"summary\"",[495,3699,541],{"class":504},[495,3701,3702],{"class":497,"line":70},[495,3703,577],{"emptyLinePlaceholder":576},[495,3705,3706],{"class":497,"line":235},[495,3707,3708],{"class":582},"// Get full note\n",[495,3710,3711,3713,3715,3718,3720,3722,3724,3727,3729,3732],{"class":497,"line":586},[495,3712,3427],{"class":500},[495,3714,505],{"class":504},[495,3716,3717],{"class":500}," ok",[495,3719,511],{"class":500},[495,3721,731],{"class":500},[495,3723,517],{"class":504},[495,3725,3726],{"class":520},"GetNote",[495,3728,524],{"class":504},[495,3730,3731],{"class":537},"\"decision\"",[495,3733,541],{"class":504},[495,3735,3736,3739,3741],{"class":497,"line":609},[495,3737,3738],{"class":750},"if",[495,3740,3717],{"class":500},[495,3742,777],{"class":504},[495,3744,3745,3747,3749,3751,3753,3755,3757,3760,3762,3765],{"class":497,"line":641},[495,3746,783],{"class":500},[495,3748,517],{"class":504},[495,3750,3292],{"class":520},[495,3752,524],{"class":504},[495,3754,3427],{"class":500},[495,3756,517],{"class":504},[495,3758,3759],{"class":500},"Metadata",[495,3761,620],{"class":504},[495,3763,3764],{"class":537},"\"confidence\"",[495,3766,3767],{"class":504},"])\n",[495,3769,3770],{"class":497,"line":663},[495,3771,849],{"class":504},[495,3773,3774],{"class":497,"line":686},[495,3775,577],{"emptyLinePlaceholder":576},[495,3777,3778],{"class":497,"line":695},[495,3779,3780],{"class":582},"// Get all notes\n",[495,3782,3783,3786,3788,3790,3792,3794],{"class":497,"line":700},[495,3784,3785],{"class":500},"notes",[495,3787,511],{"class":500},[495,3789,731],{"class":500},[495,3791,517],{"class":504},[495,3793,771],{"class":520},[495,3795,1062],{"class":504},[1965,3797,126],{"id":3798},"published-vs-unpublished",[404,3800,3801],{},"Notes track whether they've been sent to the LLM:",[486,3803,3805],{"className":488,"code":3804,"language":490,"meta":64,"style":64},"// Get notes not yet sent to LLM\nunpublished := thought.GetUnpublishedNotes()\n\n// After processing, mark as published\nthought.MarkNotesPublished(ctx)\n",[492,3806,3807,3812,3828,3832,3837],{"__ignoreMap":64},[495,3808,3809],{"class":497,"line":9},[495,3810,3811],{"class":582},"// Get notes not yet sent to LLM\n",[495,3813,3814,3817,3819,3821,3823,3826],{"class":497,"line":20},[495,3815,3816],{"class":500},"unpublished",[495,3818,511],{"class":500},[495,3820,731],{"class":500},[495,3822,517],{"class":504},[495,3824,3825],{"class":520},"GetUnpublishedNotes",[495,3827,1062],{"class":504},[495,3829,3830],{"class":497,"line":70},[495,3831,577],{"emptyLinePlaceholder":576},[495,3833,3834],{"class":497,"line":235},[495,3835,3836],{"class":582},"// After processing, mark as published\n",[495,3838,3839,3841,3843,3846,3848,3850],{"class":497,"line":586},[495,3840,501],{"class":500},[495,3842,517],{"class":504},[495,3844,3845],{"class":520},"MarkNotesPublished",[495,3847,524],{"class":504},[495,3849,527],{"class":500},[495,3851,541],{"class":504},[404,3853,3854],{},"This prevents redundant context in multi-step pipelines.",[478,3856,131],{"id":3857},"provider",[404,3859,3860],{},"Providers handle LLM communication:",[486,3862,3864],{"className":488,"code":3863,"language":490,"meta":64,"style":64},"type Provider interface {\n    Call(ctx context.Context, messages []zyn.Message, temperature float32) (*zyn.ProviderResponse, error)\n    Name() string\n}\n",[492,3865,3866,3878,3940,3950],{"__ignoreMap":64},[495,3867,3868,3870,3873,3876],{"class":497,"line":9},[495,3869,979],{"class":925},[495,3871,3872],{"class":623}," Provider",[495,3874,3875],{"class":925}," interface",[495,3877,777],{"class":504},[495,3879,3880,3883,3885,3888,3890,3892,3895,3897,3900,3903,3906,3908,3911,3913,3916,3919,3921,3924,3926,3928,3930,3933,3935,3938],{"class":497,"line":20},[495,3881,3882],{"class":520},"    Call",[495,3884,524],{"class":504},[495,3886,527],{"class":3887},"sSYET",[495,3889,1054],{"class":623},[495,3891,517],{"class":504},[495,3893,3894],{"class":623},"Context",[495,3896,505],{"class":504},[495,3898,3899],{"class":3887}," messages",[495,3901,3902],{"class":504}," []",[495,3904,3905],{"class":623},"zyn",[495,3907,517],{"class":504},[495,3909,3910],{"class":623},"Message",[495,3912,505],{"class":504},[495,3914,3915],{"class":3887}," temperature",[495,3917,3918],{"class":623}," float32",[495,3920,3304],{"class":504},[495,3922,3923],{"class":504}," (",[495,3925,1884],{"class":750},[495,3927,3905],{"class":623},[495,3929,517],{"class":504},[495,3931,3932],{"class":623},"ProviderResponse",[495,3934,505],{"class":504},[495,3936,3937],{"class":623}," error",[495,3939,541],{"class":504},[495,3941,3942,3945,3947],{"class":497,"line":70},[495,3943,3944],{"class":520},"    Name",[495,3946,774],{"class":504},[495,3948,3949],{"class":623}," string\n",[495,3951,3952],{"class":497,"line":235},[495,3953,849],{"class":504},[1965,3955,136],{"id":3956},"resolution-hierarchy",[2209,3958,3959,3965,3971],{},[1719,3960,3961,3962],{},"Step-level: ",[492,3963,3964],{},".WithProvider(p)",[1719,3966,3967,3968],{},"Context: ",[492,3969,3970],{},"cogito.WithProvider(ctx, p)",[1719,3972,3973,3974],{},"Global: ",[492,3975,3976],{},"cogito.SetProvider(p)",[486,3978,3980],{"className":488,"code":3979,"language":490,"meta":64,"style":64},"// 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)\n",[492,3981,3982,3987,4002,4006,4011,4036,4040,4045],{"__ignoreMap":64},[495,3983,3984],{"class":497,"line":9},[495,3985,3986],{"class":582},"// Global default\n",[495,3988,3989,3991,3993,3995,3997,4000],{"class":497,"line":20},[495,3990,12],{"class":500},[495,3992,517],{"class":504},[495,3994,1080],{"class":520},[495,3996,524],{"class":504},[495,3998,3999],{"class":500},"defaultProvider",[495,4001,541],{"class":504},[495,4003,4004],{"class":497,"line":70},[495,4005,577],{"emptyLinePlaceholder":576},[495,4007,4008],{"class":497,"line":235},[495,4009,4010],{"class":582},"// Context override\n",[495,4012,4013,4015,4018,4020,4022,4025,4027,4029,4031,4034],{"class":497,"line":586},[495,4014,527],{"class":500},[495,4016,4017],{"class":500}," =",[495,4019,514],{"class":500},[495,4021,517],{"class":504},[495,4023,4024],{"class":520},"WithProvider",[495,4026,524],{"class":504},[495,4028,527],{"class":500},[495,4030,505],{"class":504},[495,4032,4033],{"class":500}," specialProvider",[495,4035,541],{"class":504},[495,4037,4038],{"class":497,"line":609},[495,4039,577],{"emptyLinePlaceholder":576},[495,4041,4042],{"class":497,"line":641},[495,4043,4044],{"class":582},"// Step override\n",[495,4046,4047,4050,4052,4054,4056,4058,4060,4063,4065,4068,4071,4073,4075,4078],{"class":497,"line":663},[495,4048,4049],{"class":500},"decide",[495,4051,511],{"class":500},[495,4053,514],{"class":500},[495,4055,517],{"class":504},[495,4057,670],{"class":520},[495,4059,524],{"class":504},[495,4061,4062],{"class":537},"\"key\"",[495,4064,505],{"class":504},[495,4066,4067],{"class":537}," \"question\"",[495,4069,4070],{"class":504},").",[495,4072,4024],{"class":520},[495,4074,524],{"class":504},[495,4076,4077],{"class":500},"customProvider",[495,4079,541],{"class":504},[478,4081,38],{"id":4082},"next-steps",[1716,4084,4085,4091],{},[1719,4086,4087,4090],{},[407,4088,33],{"href":4089},"architecture"," - System design deep dive",[1719,4092,4093,4096],{},[407,4094,215],{"href":4095},"../reference/api"," - Complete API documentation",[2108,4098,4099],{},"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)}",{"title":64,"searchDepth":20,"depth":20,"links":4101},[4102,4106,4111,4114],{"id":501,"depth":20,"text":96,"children":4103},[4104,4105],{"id":3354,"depth":70,"text":101},{"id":3390,"depth":70,"text":106},{"id":3427,"depth":20,"text":111,"children":4107},[4108,4109,4110],{"id":3541,"depth":70,"text":116},{"id":3665,"depth":70,"text":121},{"id":3798,"depth":70,"text":126},{"id":3857,"depth":20,"text":131,"children":4112},[4113],{"id":3956,"depth":70,"text":136},{"id":4082,"depth":20,"text":38},{},"2025-12-01T00:00:00.000Z",null,{"title":87,"description":89},[12,4120,501,3427],"concepts","2026-02-21T00:00:00.000Z","KLeXOX_yKo1i0aIqpdesOWvroCS3t-lD3Lg-3I_Skws",[4124,4125],{"title":43,"path":42,"stem":368,"description":45,"children":-1},{"title":33,"path":144,"stem":372,"description":146,"children":-1},1776192784426]