Loguit
Loguit is a Python-first, code-first runtime for building agents without LangChain's abstraction bloat. It's designed for complicated, out-there products where hidden layers get in the way.
Core principles:
- Explicit model and tool calls
- Framework-owned run state
- Run-level and step-level middleware
- Bounded state growth via pruning
- Basic structured logging
Quickstart
from loguit import Agent, init_model, tool
@tool
def add(a: int, b: int) -> int:
return a + b
model = init_model("openai:o3-mini")
agent = Agent(model, tools=[add])
result = agent.invoke("Use add to sum 2 and 3, then answer.")
print(result.content)
agent.invoke(...) runs a single prompt through the full model→tool→model loop.
agent.repl(...) launches an interactive REPL (type exit or quit to leave).
Use tool_execution="parallel" when you want tool calls from a single model step to execute concurrently.
Use agent.as_tool(...) to wrap a sub-agent as a normal tool.
Middleware (Run + Step)
from time import time
from loguit import BaseRunMiddleware, BaseStepMiddleware
class RunLogger(BaseRunMiddleware):
def before_run(self, context, state): # noqa: ANN001
print("run start", context.run_id)
class StepTimer(BaseStepMiddleware):
def before_step(self, context, state, step): # noqa: ANN001
step._started_at = time()
def after_step(self, context, state, step, result): # noqa: ANN001
print(step.step_type, time() - step._started_at)
Examples
See examples/ for organized demos:
examples/agents/examples/coding/examples/models/examples/mcp/examples/observability/examples/tools/
Anti-goals
Loguit is intentionally narrow in V1:
- No LangChain API compatibility
- No graph DSLs or chain abstractions
- No RAG or vector store framework
- No durable state persistence
- No multi-agent orchestration
Why Loguit?
Because you should be able to build complex products without being chained to bloatware.
Metadata
Release files for rexion-loguit 0.1.1
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 | Actions |
|---|---|---|---|---|
| rexion_loguit-0.1.1.tar.gz | 49.2 kB | With provenance | Details for rexion_loguit-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rexion_loguit-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for rexion_loguit-0.1.1-py3-none-any.whl |
Total release size: 114.9 kB
Release files / rexion_loguit-0.1.1.tar.gz
| Download URL | rexion_loguit-0.1.1.tar.gz |
|---|---|
| Size | 49.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39d2f9f704cac4c307875e7df1a26266841ef2f7515c9e258fdf4ecebd7c1255
|
|
BLAKE2b-256 checksum How to use checksums |
b5cb11598605d955b21ef0ce0c6f6cd4dbe7e0e872a36a6092ea8fe3d37a37af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logRelease files / rexion_loguit-0.1.1-py3-none-any.whl
| Download URL | rexion_loguit-0.1.1-py3-none-any.whl |
|---|---|
| Size | 65.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
585e63ffbf8c10335b4867c67ba72046ffda704436d10c32ed9b1ee968959a4b
|
|
BLAKE2b-256 checksum How to use checksums |
3c4802db52b0814887e47ccf4446ad96c9a26f5a32a2befda1c94dc1e7c3d476
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logSecurity for rexion-loguit 0.1.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for rexion_loguit-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logA 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.