Skip to main content

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,
)

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.

Download files

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

Source Distribution

etot_core-0.2.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

etot_core-0.2.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file etot_core-0.2.0.tar.gz.

File metadata

  • Download URL: etot_core-0.2.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for etot_core-0.2.0.tar.gz
Algorithm Hash digest
SHA256 73a59651632b57353992d64073b8d2017b423b22f81458a7a8551ebd64b4a88a
MD5 db2b379422c0941622fb47858085c774
BLAKE2b-256 35de73b3f2adc84d4ae15fb35f2cf4b16788f4e7facc17075da028b658b30daa

See more details on using hashes here.

File details

Details for the file etot_core-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: etot_core-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for etot_core-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 572a049376fedcb71859ddaa524d3c58c095d82184641fe30a164511f28f3bdc
MD5 0cfd6b97ada977c356285a629adaebfc
BLAKE2b-256 7a4317f90f1f078b85b2bd4280957bdb11e9a9eaa879f6bd5ced34b4f263a874

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.0

2 files

This release

0.2.0 This release

2 files

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page