Metadata-Version: 2.4
Name: crowe-agent-core
Version: 0.1.0
Summary: Crowe Agent Kernel — the one provider-agnostic agent loop the Crowe ecosystem mounts.
Author-email: Michael Crowe <michael@crowelogic.com>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://crowelogic.com/foundry/
Project-URL: Release notes, https://pypi.org/project/crowe-agent-core/#history
Keywords: agent,kernel,llm,tool-calling,crowe-logic
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: adapters
Requires-Dist: httpx>=0.28.0; extra == "adapters"
Provides-Extra: test
Requires-Dist: pytest>=8.0.0; extra == "test"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "test"
Dynamic: license-file

# crowe-agent-core

The **Crowe Agent Kernel** — one provider-agnostic, capability-gated agent loop
that every Crowe surface mounts (foundry CLI, `crowelm-dp`, Cortex, `cla`, the
Terminal). It replaces the sprawl of divergent per-provider loops with a single
kernel + thin transport adapters.

Canonical architecture doc:
`crowe-agent-team/docs/superpowers/specs/2026-07-02-crowe-agent-kernel-architecture.md`

## The shape

```
Kernel.run(role, messages) -> async stream of normalized Events
        │
        ├─ TransportAdapter   (per-provider; the ONLY thing that varies)
        ├─ ToolRegistry       (federates Python/Go/MCP tools)
        ├─ HookChain          (pre_turn / pre_tool_use / post_tool_use / stop)
        │     └─ CapabilityGate   (CCCP guardedCall(); human/agent actor split)
        └─ Role               (roles/<name>.role.json — a clone is data)
```

- **One loop, many transports.** Providers implement `TransportAdapter.stream()`
  and nothing else. DeepParallel is an adapter (one turn = one cluster synthesis),
  not its own loop.
- **Every dispatch is gated.** Tool calls pass the capability choke point before
  running. The gate is a hook; add cost caps / human-confirm as more hooks.
- **Agents are data.** A role file selects prompt, backend, tool allowlist, and
  gate policy. A subagent is a kernel instance with a different role.

## Status

Scaffold. The kernel loop, adapter contract, tool registry, hook/capability
seam, and role loader are implemented and tested with a deterministic
`ScriptedAdapter`. Real adapters (openai_compat, anthropic, deepparallel) and the
CMP event mapping are the next phase — see the build sequence in the arch doc.

## Develop

```bash
uv venv --python 3.11 .venv
uv pip install --python .venv/bin/python -e ".[test]"
.venv/bin/python -m pytest -q
```
