OGMA
Enhanced logging and messaging framework with rich console support and distributed message bus capabilities.
## Overview
OGMA provides:
- **Advanced logging capabilities** with optional rich terminal output
- **Distributed message bus** using ZMQ for inter-process communication
- **Subagent management** for spawning and managing background workers
- **Channel-based messaging** for publish/subscribe patterns
- **RPC support** for request/response communication
- **Service discovery** for finding and connecting to agents
## Current Status
- **State**: Active
- **Version**: 0.0.1.0.1.2
- **License**: MIT
## Key Features
### Logging (`kahndor.logma`)
- Extended `logging.Logger` class with convenience methods
- Rich console output (colorized, tables, markup)
- JSON/YAML output helpers
- Process timing and tracking
- Diff utilities for dicts and strings
### Message Bus (`ogma.channels`, `ogma.protocols`)
- ZMQ-based publish/subscribe channels
- Request/response messaging
- Dealer/router patterns for subagent communication
- Peer-to-peer messaging support
### Subagent System (`ogma.subagent`)
- Spawn and manage background workers
- Subagent bus for task distribution
- Worker pool management
- Task timeout and retry handling
### RPC (`ogma.rpc`)
- Remote procedure call support
- Timeout and retry mechanisms
- Automatic serialization
### Discovery (`ogma.discovery`)
- Agent discovery across the network
- Broadcast-based discovery
- Automatic service registration
### Monitoring (`ogma.monitor`)
- Health monitoring
- Heartbeat system
- Performance metrics
## Installation
```bash
pip install ogma
```
## Usage
### Basic Logging
```python
from kahndor.logma import Logma
log = Logma("myapp")
log.info("Hello world")
# Rich console
log.rich_enable()
log.rich_print("Colored message", style="info")
log.rich_table("Title", ["Col1", "Col2"], [["a", "b"]])
```
### Message Bus
```python
from ogma.comms.channels import Channel
import time
# Create and use channels
pub = Channel.create_publisher("test_channel")
sub = Channel.create_subscriber("test_channel")
# Publisher sends messages
pub.publish("Hello, world!")
# Subscriber receives messages
message = sub.receive(timeout=1.0)
print(f"Received: {message}")
```
### Subagent Management
```python
from ogma.comms.subagent import SubagentBus
# Create subagent bus
bus = SubagentBus()
# Spawn a subagent
subagent_id = bus.spawn_subagent(
task="Analyze this data",
timeout=300
)
# Wait for completion
result = bus.wait_for_completion(subagent_id)
print(f"Result: {result}")
```
### RPC
```python
from ogma.protocols.rpc import RPCClient
client = RPCClient("localhost", port=5556)
result = client.call("method_name", {"param": "value"})
```
### Discovery
```python
from ogma.discovery import DiscoveryService
discovery = DiscoveryService()
agents = discovery.discover_agents()
print(f"Found {len(agents)} agents")
```
## Configuration
Create an `ogma_config.yaml` file in your project root:
```yaml
logging:
level: INFO
channels:
max_message_size: 10485760
message_ttl: 60
subagent:
max_workers: 10
worker_timeout: 300
```
## CLI
```bash
# List channels
ogma channel list
# Start subagent
ogma subagent start "Task description"
# Discover agents
ogma discover
# Monitor channel
ogma monitor --channel my_channel
```
## Architecture
```
┌─────────────────────────────────────┐
│ Application │
└──────────────┬──────────────────────┘
│
┌───────┴───────┐
│ OGMA │
│ (Framework) │
└───────┬───────┘
│
┌───────────┼───────────┐
│ │ │
┌──┴──┐ ┌───┴───┐ ┌───┴───┐
│ RPC │ │ Bus │ │Logger │
└─────┘ └───────┘ └───────┘
```
## Dependencies
### Core
- `zmq` - ZeroMQ for messaging
- `backoff` - Retry logic
- `click` - CLI framework
- `uuid7` - UUID generation
### Optional
- `rich` - Rich console output
- `memory_profiler` - Memory profiling
## Development
### Running Tests
```bash
pytest tests/
```
### Code Quality
```bash
# Linting
pylint ogma/
ruff check ogma/
# Type checking
pyright ogma/
# Formatting
black ogma/
isort ogma/
```
## Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run tests and linting
5. Submit a pull request
## License
MIT License - see [LICENSE](LICENSE.md) file for details.
## Support
- GitHub Issues: https://github.com/solutionsbrewer/ogma/issues
- Documentation: [CLI.md](CLI.md)
Metadata
Release files for eaglis 0.0.1.post0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eaglis-0.0.1.post0-cp312-cp312-manylinux_2_39_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.39+ x86-64 | Details for eaglis-0.0.1.post0-cp312-cp312-manylinux_2_39_x86_64.whl |
Release files / eaglis-0.0.1.post0-cp312-cp312-manylinux_2_39_x86_64.whl
| Download URL | eaglis-0.0.1.post0-cp312-cp312-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 123.2 kB |
| Tags | CPython 3.12 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
660d1a42b0dae4e8fb4fc42e2f7b8b0cfdf2d48debd972e53613bc65df43e758
|
|
BLAKE2b-256 checksum How to use checksums |
679a33e81a8b14556390c42dba4254b9551dd72db966709c30e7f2ad1e935050
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for eaglis 0.0.1.post0
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.