Skip to main content

A context-sensitive cognitive control stack for workflow AI.

Project description

Cognitive Cell

PyPI version Python versions

Cognitive Cell is a context-sensitive control stack for workflow AI.

Accepted v9 stack:

router-v4 → selector-v5 → finalizer-v9

What it does

The system separates:

1. cognitive routing
2. workflow-vs-direct pathway selection
3. final user-facing rendering

This lets the same input behave differently depending on context, posture, urgency, role, and workflow constraints.

Install

pip install "cognitive-cell[server]"

Python usage

from cognitive_cell import CognitiveCellRequest, CognitiveCellV9

cell = CognitiveCellV9()

request = CognitiveCellRequest(
    statement="Blue colour is observed.",
    interaction_mode="workflow_component",
    autonomy_mode="log",
)

result = cell.run(request)

print(result.response_text)
print(result.trace)

CLI usage

Create an event JSON file, then run:

cognitive-cell --event-json examples/event.example.json

This calls the configured model and may incur API cost.

HTTP sidecar usage

Start the server:

python -m uvicorn cognitive_cell.server.app:app --port 8000

Check health without model calls:

curl -s http://127.0.0.1:8000/health

Send an enterprise event:

curl -s -X POST http://127.0.0.1:8000/v1/sidecar \
  -H "Content-Type: application/json" \
  -d @examples/event.example.json

Example event

{
  "event_id": "evt_pricing_refunds_001",
  "source": "growth_ops_monitor",
  "event_type": "metric_anomaly",
  "statement": "Refund requests doubled after the pricing page update. What should we examine first?",
  "context": {
    "world_facts": [],
    "constraints": ["Prioritize high-signal first checks before broad analysis."],
    "active_goals": ["identify the first diagnostic step"]
  },
  "metadata": {
    "persona": "growth operations analyst",
    "time_pressure": "medium"
  },
  "interaction_mode": "workflow_component",
  "autonomy_mode": "suggest"
}

Current evidence

Fresh holdout-v1, 100 cases:

Judge Architecture preference Baseline preference
gpt-4.1 primary 0.6200 0.3800
gpt-5.5 second, combined 40+60 0.5575 0.4425
Two-judge mean 0.58875 0.41125

Safe claim:

On a fresh 100-case holdout, the frozen v9 cognitive-cell stack beat a plain strong-model baseline under two standardized OpenAI judges, with mean architecture preference around 0.589.

Caution

This is an engineering validation result, not a universal claim of superiority over frontier models. Larger benchmarks, human evaluation, ablations, and cross-provider validation are still needed.

Cost note

/health costs nothing.

/v1/sidecar and cognitive-cell --event-json ... call the configured model and may incur API cost.

Recommended production posture

Start with:

autonomy_mode = "suggest"
human-in-the-loop
no automatic external action execution

Known weaknesses

  • Atomic observation remains weaker because pure logging competes against advice/explanation.
  • Contextual observation remains mixed when direct action beats record/analyze behavior.
  • Persona shift is weaker under the second judge.
  • Writing support is improved but not consistently superior.

What this is not

Cognitive Cell is not AGI, not a production-autonomous agent, and not a claim of universal superiority over frontier models.

It is a workflow-control layer that helps decide whether to record, clarify, analyze, plan, answer directly, or escalate.

Enterprise sidecar pilot

Cognitive Cell v9 passed a 100-event enterprise sidecar pilot across:

  • growth/product analytics
  • support/operations
  • data-pipeline reliability
  • risk/compliance
  • operations/process workflows

Pilot result:

Metric Result
Useful first move 1.00
Too vague 0.00
Unsafe or overreaching 0.00
Trace useful 1.00

See: docs/PILOT_100_REPORT.md

Caution: this is a curated pilot result, not a claim of universal superiority.

100-event ablation

Full Cognitive Cell v9 was compared against a plain direct baseline on the 100-event enterprise sidecar pilot.

Result:

Preferred output Count Rate
Full v9 44 0.44
Baseline 21 0.21
Tie 35 0.35

Full v9 was preferred or tied in:

79 / 100 = 0.79

See: docs/ABLATION_100_REPORT.md

Caution: this is a curated enterprise sidecar ablation, not a universal benchmark.

100-event component ablation

Full Cognitive Cell v9 was compared against its simpler components and a plain direct baseline on the 100-event enterprise sidecar pilot.

Output Preferred count
Full v9 77
Plain direct 9
Direct artifact 13
Workflow artifact 0
Selector without finalizer 0
Tie 1

Full v9 was preferred or tied in:

78 / 100 = 0.78

This supports the route-select-render architecture: internal artifacts are useful for reasoning and traceability, but finalizer-v9 is important for converting them into user-facing answers.

See: docs/COMPONENT_ABLATION_100_REPORT.md

Documentation

Key docs:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cognitive_cell-0.9.7.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cognitive_cell-0.9.7-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file cognitive_cell-0.9.7.tar.gz.

File metadata

  • Download URL: cognitive_cell-0.9.7.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cognitive_cell-0.9.7.tar.gz
Algorithm Hash digest
SHA256 33fb3b73f5670438c01e4b7b83e9c86d363b9feef1348e5080aff5c48166e4eb
MD5 746a503e150c646dd313dab789d0b507
BLAKE2b-256 fe3a7f7b20b4e54cb7b46e02bb8a70751c8464268fac4be8f888d2332efe160f

See more details on using hashes here.

File details

Details for the file cognitive_cell-0.9.7-py3-none-any.whl.

File metadata

  • Download URL: cognitive_cell-0.9.7-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cognitive_cell-0.9.7-py3-none-any.whl
Algorithm Hash digest
SHA256 afdf04d9cc6dfaaeff0ba7a99c36df034a18cba0e63478d80a3b838f6e9e91f5
MD5 4b3927652c5d136c667449b3ffec4172
BLAKE2b-256 ffa20efc00320029bdab5b1bce7420b3e032fa0a843410b232128ca31114a1ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page