etot-core
Shared engine for ETOT agentic loops: a produce → check → revise controller, a structured Claude client, a run logger, and config loading. It knows nothing about any one tool's prompts, rules, or corpus — those live beside each tool that uses it.
Motif is the first tool built on it.
What's in it
etot_core/
loop.py generic plan -> act -> check -> revise -> stop controller
llm.py thin Claude client: one call, structured JSON out, usage tracked
logger.py per-run directory with every prompt, response, and metric saved
config.py load YAML config with model roles and critic rules
Install
pip install etot-core
Python 3.10+. Requires an Anthropic API key at call time (ANTHROPIC_API_KEY or a context-scoped key passed to core.llm).
A tool path that never calls a model can load its config without a key: load_config(path, require_key=False). The default (require_key=True) raises when no key is available.
Snapshots
RunLogger.snapshot_corpus(processed_dir, names) copies what a run reads into runs/<id>/corpus/, driven by processed_dir/manifest.json. Each entry needs a name; its files default to <name>.txt and <name>.jsonl, or it can list its own as "files": ["library.jsonl", ...]. A words count is recorded when every entry has one.
Use it in a new tool
from etot_core.loop import run_loop
from etot_core.logger import RunLogger
from etot_core import llm
result = run_loop(
state={},
produce=produce, # state -> state: first draft into state
check=check, # state -> verdict: {"pass": bool, "failures": [...]}
revise=revise, # state, verdict -> state: address failures
max_iterations=3,
)
The loop stops on a passing verdict, on no progress (the same set of failures twice running), or at
max_iterations. Failures are identified by (insight_id, rule) by default; pass failure_key= to name them
by your own fields, e.g. failure_key=lambda f: (f["finding_id"], f["rule"]).
Call models through llm.call, log through RunLogger, and keep tool-specific prompts, rules, and corpus handling in your own package — etot_core never talks to a tool's domain, and a tool never re-implements the loop.
License
MIT. See LICENSE.
Metadata
Release files for etot-core 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| etot_core-0.3.0.tar.gz | 12.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| etot_core-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.4 kB
Release files / etot_core-0.3.0.tar.gz
| Download URL | etot_core-0.3.0.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15eb456bdfbc139014319cdc2aba6b5d77e43b308057ff2c91157530e43b135d
|
|
BLAKE2b-256 checksum How to use checksums |
39d1d4bc40620b82c4195c67ccb2d0e74b8e17061f65c07b0468e34b8e6b6dd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / etot_core-0.3.0-py3-none-any.whl
| Download URL | etot_core-0.3.0-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eb77e2eabe477de763f5e77476521f2a3a89c8aff8b119186945ff9a0c60f02a
|
|
BLAKE2b-256 checksum How to use checksums |
ab83ac81a897f9e5714256658df196d69ae2480a4945148cb306bd96df9cf215
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for etot-core 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.