Metadata-Version: 2.4
Name: autourgos-agent-logger-core
Version: 1.0.0
Summary: Console logging utilities for Autourgos agents and orchestrators.
Author-email: Jitin Kumar Sengar <autourgoskit@gmail.com>
Maintainer: Sonia & Om
License: MIT
Project-URL: Homepage, https://github.com/autourgoskit
Project-URL: Repository, https://github.com/autourgoskit
Project-URL: Linkedin, https://www.linkedin.com/in/devxjitin/
Keywords: agent,agents,ai,autourgos,llm
Requires-Python: >=3.10
Description-Content-Type: text/markdown

<div align="center">

# Agent Logger

![version](https://img.shields.io/badge/version-1.0.0-c96bff?style=for-the-badge) ![python](https://img.shields.io/badge/python-3.10%2B-1f6feb?style=for-the-badge) ![license](https://img.shields.io/badge/license-MIT-1b7f5a?style=for-the-badge) ![focus](https://img.shields.io/badge/focus-agentic%20AI-111827?style=for-the-badge)

</div>

---

The Autourgos Agent Logger is the internal diagnostic system that powers trace formatting, execution metrics, and cognitive step tracking within the framework.

Unlike other parts of the ecosystem, the Agent Logger is designed exclusively as an internal dependency (`autourgos-agent-logger-core`). It is automatically managed by the cognitive loops behind the scenes. Developers do not instantiate, configure, or interact with this logger directly in their code.

---

## Internal Responsibilities

The logger runs silently inside the cognitive loop of your local agents. It is responsible for the following core operations:

### Iteration Tracking

Keeps a precise count of every single thinking loop during agent execution. Enforces maximum iteration bounds to prevent infinite runaways.

### Trace Formatting

Intercepts raw thoughts, tool actions, and received observations. Formats them into clear, readable execution trails.

### Cost Recording

Records real-time token metrics and computes exact dollar expenditures across all reasoning steps dynamically.

### Console Output

Directs internal diagnostics straight to standard output streams when verbose mode is enabled in agent constructors.

---

## Why Direct Usage is Restricted

Autourgos maintains a strict separation of concerns to keep your local agent setups simple and clean. The Agent Logger is kept internal for several key reasons:

- **State Integrity**: Instantiating the logger independently could interfere with the active thinking loop, leading to missing observations or out-of-order logs.
- **Resource Management**: The logger coordinates access to local resources (such as standard output streams and internal memory buffers) and locking it inside the cognitive harness prevents write collisions.
- **Zero Configuration**: By handling logging entirely inside the agent loops, developers do not need to write setup files, configure file handlers, or manage logging levels manually.

---

## FAQs

### Why is the Agent Logger strictly internal?

The logger is deeply tied to the internal cognitive harness of the ReAct and planning loops. Keeping it internal ensures that all thoughts, actions, and tool errors are captured in the correct chronological order without exposing developers to complex state management.

### How do I see the logs if I cannot use the logger directly?

You see the logs by enabling verbose mode on your agent's constructor. When this setting is activated, the cognitive harness automatically directs the internal logger to output thinking steps and execution diagnostics straight to your terminal.

### Does the internal logger write files to my disk automatically?

No. The core internal logger only handles console prints and internal metric counters. If you want to write structured Markdown logs or execution traces to your local disk, you should attach the prebuilt History Middleware instead.

### Is there any telemetry or cloud sharing inside the internal logger?

No. True to the Autourgos local-first philosophy, the internal logger contains zero telemetry, zero analytics tracking, and zero remote network calls. Every log message generated stays strictly on your local developer workstation.

### Can I redirect the logger's terminal prints to an external Python logging framework?

Yes. While you cannot invoke the logger itself, it respects standard Python system streams. You can easily capture and redirect stdout prints using standard libraries or configure a custom Callback Middleware to route events to your enterprise logging tools.
---

## Metadata & Credits

- **Developer / Author**: [Jitin Kumar Sengar](https://www.linkedin.com/in/devxjitin/)
- **Documentation Authors**: Sonia & Om
- **GitHub Repository**: [AutourgosKit](https://github.com/autourgoskit)
- **Contact Email**: autourgoskit@gmail.com
