-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
265 lines (258 loc) · 18.6 KB
/
Copy pathindex.html
File metadata and controls
265 lines (258 loc) · 18.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<!DOCTYPE html>
<html lang="en" data-accent-color="violet" data-content_root="./">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Cognition documentation</title><link rel="shortcut icon" href="_static/favicon.ico"/><link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Key API Ideas" href="ideas/index.html" /><script>
function setColorMode(t){let e=document.documentElement;e.setAttribute("data-color-mode",t);let a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,s=t;"auto"===t&&(s=a?"dark":"light"),"light"===s?(e.classList.remove("dark"),e.classList.add("light")):(e.classList.remove("light"),e.classList.add("dark"))}
setColorMode(localStorage._theme||"auto");
</script><link rel="stylesheet" type="text/css" href="_static/pygments.css?v=e1a1ceaf" />
<link rel="stylesheet" type="text/css" href="_static/shibuya.css?v=44020203" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=4ae1632d" />
<link media="print" rel="stylesheet" type="text/css" href="_static/print.css?v=20ff2c19" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
:root {
--sy-f-text: "Inter", var(--sy-f-sys), var(--sy-f-cjk), sans-serif;
--sy-f-heading: "Inter", var(--sy-f-sys), var(--sy-f-cjk), sans-serif;
}
</style>
<meta property="og:type" content="website"/><meta property="og:title" content="Documentation"/>
<meta name="twitter:card" content="summary"/>
</head>
<body><div class="sy-head">
<div class="sy-head-blur"></div>
<div class="sy-head-inner sy-container mx-auto">
<a class="sy-head-brand" href="#">
<strong>Cognition</strong>
</a>
<div class="sy-head-nav" id="head-nav">
<nav class="sy-head-links"></nav>
<div class="sy-head-extra flex items-center print:hidden"><form class="searchbox flex items-center" action="search.html" method="get">
<input type="text" name="q" placeholder="Search" />
<kbd>/</kbd>
</form><div class="sy-head-socials"></div></div>
</div>
<div class="sy-head-actions flex items-center shrink-0 print:hidden"><button class="js-theme theme-switch flex items-center"
data-aria-auto="Switch to light color mode"
data-aria-light="Switch to dark color mode"
data-aria-dark="Switch to auto color mode">
<i class="i-lucide theme-icon"></i>
</button><button class="md:hidden flex items-center js-menu" aria-label="Menu" type="button" aria-controls="head-nav" aria-expanded="false">
<div class="hamburger">
<span class="hamburger_1"></span>
<span class="hamburger_2"></span>
<span class="hamburger_3"></span>
</div>
</button>
</div>
</div>
</div>
<div class="sy-page sy-container flex mx-auto">
<aside id="lside" class="sy-lside md:w-72 md:shrink-0 print:hidden">
<div class="sy-lside-inner md:sticky">
<div class="sy-scrollbar p-6">
<div class="globaltoc" data-expand-depth="0"><ul>
<li class="toctree-l1"><a class="reference internal" href="ideas/index.html">Key API Ideas</a><ul>
<li class="toctree-l2"><a class="reference internal" href="ideas/kadp.html">Knowledge-Augmented Decision Process (KADP)</a></li>
<li class="toctree-l2"><a class="reference internal" href="ideas/cogent.html">Cognitive Agent (Cogent)</a></li>
<li class="toctree-l2"><a class="reference internal" href="ideas/knowledge.html">Knowledge Representation Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="ideas/planning.html">Planning</a></li>
<li class="toctree-l2"><a class="reference internal" href="ideas/language.html">Language</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="cook/index.html">Cookbook</a><ul>
<li class="toctree-l2"><a class="reference internal" href="cook/hello.html">Hello World</a></li>
<li class="toctree-l2"><a class="reference internal" href="cook/counting.html">Counting</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="autoapi/index.html">API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="autoapi/cognition/index.html">cognition</a><ul>
<li class="toctree-l3"><a class="reference internal" href="autoapi/cognition/cogent/index.html">cognition.cogent</a><ul>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/cogent/cogent/index.html">cognition.cogent.cogent</a></li>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/cogent/env/index.html">cognition.cogent.env</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="autoapi/cognition/decision/index.html">cognition.decision</a><ul>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/decision/chain/index.html">cognition.decision.chain</a></li>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/decision/core/index.html">cognition.decision.core</a></li>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/decision/dp/index.html">cognition.decision.dp</a></li>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/decision/stage/index.html">cognition.decision.stage</a></li>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/decision/state/index.html">cognition.decision.state</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="autoapi/cognition/knowledge/index.html">cognition.knowledge</a><ul>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/knowledge/organization/index.html">cognition.knowledge.organization</a></li>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/knowledge/representation/index.html">cognition.knowledge.representation</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="autoapi/cognition/language/index.html">cognition.language</a><ul>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/language/classification/index.html">cognition.language.classification</a></li>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/language/description/index.html">cognition.language.description</a></li>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/language/population/index.html">cognition.language.population</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="autoapi/cognition/reasoning/index.html">cognition.reasoning</a><ul>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/reasoning/planning/index.html">cognition.reasoning.planning</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="autoapi/cognition/util/index.html">cognition.util</a><ul>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/util/enumeration/index.html">cognition.util.enumeration</a></li>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/util/functypes/index.html">cognition.util.functypes</a></li>
<li class="toctree-l4"><a class="reference internal" href="autoapi/cognition/util/misc/index.html">cognition.util.misc</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</aside>
<div class="lside-overlay js-menu" role="button" aria-label="Close left sidebar" aria-controls="lside" aria-expanded="false"></div>
<aside id="rside" class="sy-rside pb-3 w-64 shrink-0 order-last">
<button class="rside-close js-menu xl:hidden" aria-label="Close Table of Contents" type="button" aria-controls="rside" aria-expanded="false">
<i class="i-lucide close"></i>
</button>
<div class="sy-scrollbar sy-rside-inner px-6 xl:top-16 xl:sticky xl:pl-0 pt-6 pb-4"><div class="localtoc"><h3>On this page</h3><ul>
<li><a class="reference internal" href="#table-of-contents">📖 Table of Contents</a></li>
<li><a class="reference internal" href="#core-concepts">Core concepts</a><ul>
<li><a class="reference internal" href="#agent-runtime-loop-with-cogent">Agent Runtime Loop with <code class="docutils literal notranslate"><span class="pre">Cogent</span></code></a></li>
<li><a class="reference internal" href="#knowledge-augmented-decisionprocess">Knowledge-Augmented <code class="docutils literal notranslate"><span class="pre">DecisionProcess</span></code></a></li>
<li><a class="reference internal" href="#structured-knowledge-representation-with-worldgraph">Structured Knowledge Representation with <code class="docutils literal notranslate"><span class="pre">WorldGraph</span></code></a></li>
<li><a class="reference internal" href="#language-processing-with-data-models">4. Language Processing with Data Models</a></li>
<li><a class="reference internal" href="#verifiable-logical-reasoning-with-searchplanner">5. Verifiable Logical Reasoning with <code class="docutils literal notranslate"><span class="pre">SearchPlanner</span></code></a></li>
</ul>
</li>
</ul>
</div><div id="ethical-ad-placement" data-ea-publisher="readthedocs"></div></div>
</aside>
<div class="rside-overlay js-menu" role="button" aria-label="Close Table of Contents" aria-controls="rside" aria-expanded="false"></div>
<main class="sy-main w-full max-sm:max-w-full print:pt-6">
<div class="sy-breadcrumbs" role="navigation">
<div class="sy-breadcrumbs-inner flex items-center">
<div class="md:hidden mr-3">
<button class="js-menu" aria-label="Menu" type="button" aria-controls="lside" aria-expanded="false">
<i class="i-lucide menu"></i>
</button>
</div>
<ol class="flex-1" itemscope itemtype="https://schema.org/BreadcrumbList"><li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="#"><span itemprop="name">Cognition</span></a>
<span>/</span>
<meta itemprop="position" content="1" />
</li><li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<strong itemprop="name">Documentation</strong>
<meta itemprop="position" content="2" />
</li></ol>
<div class="xl:hidden ml-1">
<button class="js-menu" aria-label="Show table of contents" type="button" aria-controls="rside"
aria-expanded="false">
<i class="i-lucide outdent"></i>
</button>
</div>
</div>
</div><div class="flex flex-col break-words justify-between">
<div class="relative min-w-0 max-w-6xl px-6 pb-6 pt-8 xl:px-12">
<article class="yue" role="main">
<section id="documentation">
<h1>Documentation<a class="headerlink" href="#documentation" title="Link to this heading">¶</a></h1>
<p>Welcome to <code class="docutils literal notranslate"><span class="pre">cognition</span></code> 🧠 an open-source agent framework in Python developed by <a class="reference external" href="https://polycog.ai">Polycog, Inc.</a>. The framework implements a <a class="reference external" href="https://en.wikipedia.org/wiki/Neuro-symbolic_AI">neurosymbolic</a> foundation for complex decision-making, natural language processing, structural knowledge representation, and logical & deterministic reasoning.
It enables developers to build trustworthy cognitive agents - agents that are reliable (repeatable, provably correct reasoning), steerable (programmatic enforcement of behavior directives), and explainable (causal provenance of all decisions).</p>
<section id="table-of-contents">
<h2>📖 Table of Contents<a class="headerlink" href="#table-of-contents" title="Link to this heading">¶</a></h2>
<ul class="simple">
<li><p><a class="reference internal" href="#core-concepts"><span class="xref myst">Core Concepts</span></a></p></li>
<li><p><a class="reference internal" href="#library-structure"><span class="xref myst">Library Structure</span></a></p></li>
<li><p><a class="reference internal" href="#getting-started"><span class="xref myst">Getting Started</span></a></p></li>
<li><p><a class="reference internal" href="#documentation--resources"><span class="xref myst">Documentation & Resources</span></a></p></li>
</ul>
</section>
<section id="core-concepts">
<h2>Core concepts<a class="headerlink" href="#core-concepts" title="Link to this heading">¶</a></h2>
<section id="agent-runtime-loop-with-cogent">
<h3>Agent Runtime Loop with <code class="docutils literal notranslate"><span class="pre">Cogent</span></code><a class="headerlink" href="#agent-runtime-loop-with-cogent" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p><strong>What it does:</strong> Manages the <a class="reference external" href="https://en.wikipedia.org/wiki/Intelligent_agent">intelligent agent loop</a>, bridging internal cognitive processes with external environmental sensors and actuators.</p></li>
<li><p><strong>Agentic AI Equivalent:</strong> Harness</p></li>
<li><p><strong>Why use it:</strong> Separates core cognitive reasoning from raw API calls. This creates a clean boundary for safety checks, API mocking, and simulation testing. <img alt="" src="https://img.shields.io/badge/-Decoupled_%26_Modular-E9D5FF?style=flat-square" /></p></li>
</ul>
</section>
<section id="knowledge-augmented-decisionprocess">
<h3>Knowledge-Augmented <code class="docutils literal notranslate"><span class="pre">DecisionProcess</span></code><a class="headerlink" href="#knowledge-augmented-decisionprocess" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p><strong>What it does:</strong> Design agent behavior via a declarative, <a class="reference external" href="https://doi.org/10.1016/j.tics.2003.08.012">state-driven execution machine</a> that matches the current environment state against explicit policy directives.</p></li>
<li><p><strong>Agentic AI Equivalent:</strong> Orchestrator</p></li>
<li><p><strong>Why use it:</strong> Replaces non-deterministic LLM loops and brittle if-else scripts with declarative state control — enforcing safety guardrails, business logic, and policies at every step. <img alt="" src="https://img.shields.io/badge/-Compliance_without_Rigidity-E9D5FF?style=flat-square" /></p></li>
</ul>
</section>
<section id="structured-knowledge-representation-with-worldgraph">
<h3>Structured Knowledge Representation with <code class="docutils literal notranslate"><span class="pre">WorldGraph</span></code><a class="headerlink" href="#structured-knowledge-representation-with-worldgraph" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p><strong>What it does:</strong> Declares <a class="reference external" href="https://doi.org/10.48550/arXiv.2506.18019">domain knowledge</a> using strongly-typed, validated data models that can be inspected, queried, and mutated at runtime.</p></li>
<li><p><strong>Agentic AI Equivalent:</strong> engineered or raw prompt context</p></li>
<li><p><strong>Why use it:</strong> Gives agents a typed, queryable source of truth instead of relying on fragile context windows or unvalidated text blobs. <img alt="" src="https://img.shields.io/badge/-Stable_%26_Grounded-E9D5FF?style=flat-square" /></p></li>
</ul>
</section>
<section id="language-processing-with-data-models">
<h3>4. Language Processing with Data Models<a class="headerlink" href="#language-processing-with-data-models" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p><strong>What it does:</strong> Uses LLMs for specific, constrained tasks—such as intent classification (<code class="docutils literal notranslate"><span class="pre">EnumClassifier</span></code>), generating natural language from facts (<code class="docutils literal notranslate"><span class="pre">describe_facts</span></code>), and extracting structured data (<code class="docutils literal notranslate"><span class="pre">ModelPopulator</span></code>) with <a class="reference external" href="https://doi.org/10.48550/arXiv.2501.10868">automated context engineering</a>.</p></li>
<li><p><strong>Agentic AI Equivalent:</strong> Structured Outputs</p></li>
<li><p><strong>Why use it:</strong> Restricts LLM operations to strict input/output contracts, keeping non-deterministic text generation out of core control flow. <img alt="" src="https://img.shields.io/badge/-Structured_%26_Safe-E9D5FF?style=flat-square" /></p></li>
</ul>
</section>
<section id="verifiable-logical-reasoning-with-searchplanner">
<h3>5. Verifiable Logical Reasoning with <code class="docutils literal notranslate"><span class="pre">SearchPlanner</span></code><a class="headerlink" href="#verifiable-logical-reasoning-with-searchplanner" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p><strong>What it does:</strong> Solves planning sub-problems algorithmically to find an <a class="reference external" href="https://doi.org/10.1109/TSSC.1968.300136">optimal sequence of actions</a> to reach a specified target state.</p></li>
<li><p><strong>Agentic AI Equivalent:</strong> Chain-of-Thought</p></li>
<li><p><strong>Why use it:</strong> Guarantees causal validity, completeness, and efficiency for complex multi-step problems without relying on probabilistic LLM guessing. <img alt="" src="https://img.shields.io/badge/-Provably_Correct_%26_Explainable-E9D5FF?style=flat-square" /></p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This project is under active development!</p>
</div>
<div class="toctree-wrapper compound">
</div>
</section>
</section>
</section>
</article><button class="back-to-top" type="button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
</svg>
<span>Back to top</span>
</button><div class="navigation flex print:hidden"><div class="navigation-next">
<a href="ideas/index.html">
<div class="page-info">
<span>Next</span>
<div class="title">Key API Ideas</div>
</div>
<i class="i-lucide chevron-right"></i>
</a>
</div></div></div>
</div>
</main>
</div>
<footer class="sy-foot">
<div class="sy-foot-inner sy-container mx-auto">
<div class="sy-foot-reserved md:flex justify-between items-center">
<div class="sy-foot-copyright"><p>2026, Polycog, Inc.</p>
<p>
Made with
<a href="https://www.sphinx-doc.org/">Sphinx</a> and
<a href="https://shibuya.lepture.com">Shibuya theme</a>.
</p>
</div>
<div class="sy-foot-socials"></div>
</div>
</div>
</footer>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=fd6eb6e6"></script>
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
<script src="_static/shibuya.js?v=cac61aee"></script></body>
</html>