A minimal, explicit agent runtime
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rexion_loguit-0.1.1.tar.gz.
File metadata
- Download URL: rexion_loguit-0.1.1.tar.gz
- Upload date:
- Size: 49.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39d2f9f704cac4c307875e7df1a26266841ef2f7515c9e258fdf4ecebd7c1255
|
|
| MD5 |
c8047768063566e0208e78548de8f3d4
|
|
| BLAKE2b-256 |
b5cb11598605d955b21ef0ce0c6f6cd4dbe7e0e872a36a6092ea8fe3d37a37af
|
Provenance
The following attestation bundles were made for rexion_loguit-0.1.1.tar.gz:
Publisher:
publish-pypi.yml on rexionai/loguit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rexion_loguit-0.1.1.tar.gz -
Subject digest:
39d2f9f704cac4c307875e7df1a26266841ef2f7515c9e258fdf4ecebd7c1255 - Sigstore transparency entry: 1292446526
- Sigstore integration time:
-
Permalink:
rexionai/loguit@1873fc097c9fe4e91739eaacdca6f74e00a4a1d8 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/rexionai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@1873fc097c9fe4e91739eaacdca6f74e00a4a1d8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rexion_loguit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: rexion_loguit-0.1.1-py3-none-any.whl
- Upload date:
- Size: 65.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
585e63ffbf8c10335b4867c67ba72046ffda704436d10c32ed9b1ee968959a4b
|
|
| MD5 |
698b7b3420ca0b8575fb66dfbb13eb5e
|
|
| BLAKE2b-256 |
3c4802db52b0814887e47ccf4446ad96c9a26f5a32a2befda1c94dc1e7c3d476
|
Provenance
The following attestation bundles were made for rexion_loguit-0.1.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on rexionai/loguit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rexion_loguit-0.1.1-py3-none-any.whl -
Subject digest:
585e63ffbf8c10335b4867c67ba72046ffda704436d10c32ed9b1ee968959a4b - Sigstore transparency entry: 1292446545
- Sigstore integration time:
-
Permalink:
rexionai/loguit@1873fc097c9fe4e91739eaacdca6f74e00a4a1d8 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/rexionai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@1873fc097c9fe4e91739eaacdca6f74e00a4a1d8 -
Trigger Event:
push
-
Statement type: