Cog Arch Actr¶
cog_arch_actr — ACT-R cognitive architecture.
Cluster: Experience & Autonomy | Type: component | MCP Tools: 34
Overview¶
Pilot-ready infrastructure, not a polished end-user workflow
cog_arch_actr is functional for MVP and pilot use as an MCP-accessible reasoning component. It is best treated as infrastructure for developers or advanced agent workflows, not as a standalone tool for non-technical users.
The component exposes ACT-R concepts directly: chunks, productions, buffers, activation, and cycles. A first-time vibe coder will usually need a higher-level recipe or wrapper around these operations to get immediate value. Retrieval also includes stochastic ACT-R behavior by design, so exact runs may vary unless callers control thresholds, timing, and random state at the engine layer.
Adaptive Control of Thought-Rational (ACT-R) cognitive architecture implementation that models human cognition through a declarative memory of typed chunks and a procedural production system. Delegates all 26 core operations to an inner ACTRMCPBlock backed by SQLite, with six read-only discovery operations for capabilities, backend status, engine config, store status, schema, and degradation contract.
Discovery is path-redacted and honest about the component's deterministic envelope: stochastic retrieval/utility noise is surfaced, optional LLM authoring is disclosed as peripheral and fallback-capable, and underused persistence tables are marked as live_workflow, audit_only, or infrastructure_ready.
When to use:
- Simulating human-like associative recall and production-rule reasoning in an agent loop
- Storing and retrieving typed symbolic chunks to model working memory and long-term declarative knowledge
- Augmenting ACT-R symbolic reasoning with LLM-generated productions or explanations
- Inspecting ACT-R capability/status metadata before selecting mutable operations
Do not use as:
- A general natural-language chatbot or turnkey workflow builder
- A non-developer-facing onboarding path without a simpler guide or prebuilt workflow
- A regulated-domain decision system without external validation, audit controls, and human review
- An arbitrary SQL, filesystem, endpoint-probing, or agentic-runtime adapter
Reliability envelope: Outputs include completion_state, warning_card, evidence, request_id, task_id, and run_id where supplied. Expected domain misses are qualified-draft; degraded or blocked execution is surfaced as blocked-escalated with stable G6_E_* codes.
Example:
from mvp.cog_arch_actr import CogArchACTRBlock, ACTRInput
block = CogArchACTRBlock(name="actr")
create = block.infer(ACTRInput(
op="chunk_create",
chunk_type="fact",
slots_json='{"subject":"sky","color":"blue"}',
current_time=0.0,
))
result = block.infer(ACTRInput(
op="chunk_retrieve",
chunk_type="fact",
slots_json='{"subject":"sky"}',
current_time=1.0,
))
# result.ok -> True; result.value -> ACTROutput with records, chunk_id, message
Works well with: cog_arch_soar, experience_loop, deep_understanding
Public API¶
CogArchACTRBlock(AIBlock[ACTRInput, ACTROutput, dict])¶
ACT-R cognitive architecture block — delegates to ACTRMCPBlock.
| Field | Type | Default |
|---|---|---|
name | str | 'cog_arch_actr' |
state | dict \| None | None |
db_path | str | ':memory:' |
resource_bounds | ResourceBounds \| None | None |
usage | ResourceUsage | field(default_factory=ResourceUsage) |
Methods:
infer(data: ACTRInput) -> Result[ACTROutput]¶
ACTRInput(BaseModel)¶
| Field | Type | Default |
|---|---|---|
op | str | required |
chunk_id | str | '' |
chunk_type | str | '' |
slots_json | str | '{}' |
production_id | str | '' |
production_name | str | '' |
conditions_json | str | '{}' |
actions_json | str | '{}' |
utility | float | 0.0 |
buffer_name | str | '' |
max_cycles | int | 100 |
goal_test_json | str | '' |
current_time | float | 0.0 |
decay | float | 0.5 |
reward | float | 0.0 |
alpha | float | 0.2 |
description | str | '' |
buffer_state_json | str | '' |
source_json | str | '' |
target_json | str | '' |
bridge_config_json | str | '' |
gate_type | str | '' |
query | str | '' |
top_k | int | 5 |
limit | int | 50 |
session_id | str | '' |
request_id | str | '' |
task_id | str | '' |
run_id | str | '' |
ACTROutput(BaseModel)¶
| Field | Type | Default |
|---|---|---|
op | str | required |
ok | bool | required |
message | str | '' |
error | str | '' |
data_json | str | '' |
chunk_id | str | '' |
production_id | str | '' |
chunks | list[dict] | Field(default_factory=list) |
productions | list[dict] | Field(default_factory=list) |
records | list[dict[str, Any]] | Field(default_factory=list) |
count | int | 0 |
metadata | dict[str, Any] | Field(default_factory=dict) |
degraded | bool | False |
degradation_reason | str | '' |
completion_state | str | 'qualified-draft' |
warning_card | dict[str, Any] | Field(default_factory=dict) |
evidence | dict[str, Any] | Field(default_factory=dict) |
code | str | '' |
request_id | str | '' |
task_id | str | '' |
run_id | str | '' |
MCP Tools¶
| Operation | Source |
|---|---|
ops | cog_arch_actr_mcp |
help | cog_arch_actr_mcp |
actr_capabilities | cog_arch_actr_mcp |
actr_backend_status | cog_arch_actr_mcp |
actr_engine_config | cog_arch_actr_mcp |
actr_store_status | cog_arch_actr_mcp |
actr_schema_describe | cog_arch_actr_mcp |
actr_degradation_contract | cog_arch_actr_mcp |
chunk_create | cog_arch_actr_mcp |
chunk_get | cog_arch_actr_mcp |
chunk_retrieve | cog_arch_actr_mcp |
chunk_list | cog_arch_actr_mcp |
chunk_delete | cog_arch_actr_mcp |
production_create | cog_arch_actr_mcp |
production_get | cog_arch_actr_mcp |
production_list | cog_arch_actr_mcp |
production_delete | cog_arch_actr_mcp |
buffer_set | cog_arch_actr_mcp |
buffer_get | cog_arch_actr_mcp |
buffer_clear | cog_arch_actr_mcp |
cycle_run | cog_arch_actr_mcp |
cycle_step | cog_arch_actr_mcp |
cycle_status | cog_arch_actr_mcp |
activation_compute | cog_arch_actr_mcp |
utility_update | cog_arch_actr_mcp |
utility_list | cog_arch_actr_mcp |
llm_encode_chunk | cog_arch_actr_mcp |
llm_suggest_production | cog_arch_actr_mcp |
find_analogy | cog_arch_actr_mcp |
realtime_bridge | cog_arch_actr_mcp |
hat_gate | cog_arch_actr_mcp |
actr_search | cog_arch_actr_mcp |
actr_info | cog_arch_actr_mcp |
list_patterns | cog_arch_actr_mcp |