Observed since 21 Oct, 09:06 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
AGI.green Framework
A modern Python framework for building AI-powered asynchonous chat applications with a browser interface, featuring markdown content rendering and a unified messaging system.
Application can be built entirely in Python or can integrate with arbitrary external services. This differs from conventional full stack solutions with a javascript frontend application making API calls to a Python backend. Instead, the frontend is a slave and the backend is the application.
# Install RabbitMQ
sudo apt-get install rabbitmq-server # Ubuntu/Debian
brew install rabbitmq # macOS
# Install package
pip install agi.green
from agi_green.dispatcher import Dispatcher
class ChatNode(Dispatcher):
async def on_mq_chat(self, author: str, content: str):
'Receive chat message from RabbitMQ'
await self.send_ws('append_chat', content=content)
async def on_ws_chat_input(self, content: str = ''):
'Handle chat input from browser'
await self.send_mq('chat',
author=self.name,
content=content
)
The framework uses a protocol-based architecture where each protocol handles specific types of communication:
ws: WebSocket communication with browsermq: RabbitMQ for peer-to-peer messaginggpt: OpenAI API integrationhttp: HTTP/HTTPS serverSupport for rich content in messages:
# Markdown with syntax highlighting
await self.send_ws('append_chat',
content='```python\nprint("Hello")\n```'
)
# Mermaid diagrams
await self.send_ws('append_chat',
content='```mermaid\ngraph TD;\nA-->B;\n```'
)
# Math equations
await self.send_ws('append_chat',
content=r'\\( \int x dx = \frac{x^2}{2} + C \\)'
)
Currently in active development (March 2024). The framework is being used in production but the API may have breaking changes. See CHANGELOG for version history.
Contributions are welcome! Please check our Contributing Guidelines for details.
Copyright (c) 2024 Ken Seehart, AGI Green. See LICENSE for details.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.4.8 | 6 Oct 2025 | 18 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 09:06 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:c36f2b7302ee169e76da22792de6b25686166a8ca5b62d1d5910138bfda7f4c4