This release is a pre-release and may not be stable for production use.
ag-llm
A Python package that integrates LLM functionality directly into your Python shell experience.
Installation
uv install ag-llm
Or alternatively:
pip install ag-llm
Usage
Once installed, you can use ag directly in your Python shell with a simple syntax:
import ag
ag/"how are you"
This sends your query to the default LLM and streams the response directly in your terminal with beautiful markdown rendering thanks to Streamdown.
Features
- Direct Python Integration: Use natural Python syntax with the
/operator - Streaming Responses: Get real-time output as the model generates responses
- Markdown Rendering: Beautifully formatted output with code highlighting
- IPython Integration: Automatically hooks into IPython for seamless usage
- Simple Setup: Just import and start querying
Requirements
- Python >= 3.8
- llm for LLM integration
- streamdown for markdown rendering
Configuration
The package uses the default configuration from the llm package for model selection. You can configure your preferred model using:
llm models default your-model-name
See the LLM documentation for more configuration options.
Example
import ag
# Simple query
ag/"What is the capital of France?"
# More complex query
ag/"Explain quantum computing in simple terms"
How It Works
When you use ag/"your query", the package:
- Sends your query to the configured LLM model via the
llmpackage - Streams the response token by token
- Renders the output using Streamdown for beautiful formatting
- Handles all the complexity behind the scenes
Development
To develop on this package:
git clone [repository-url]
cd ag-llm
uv install
License
MIT
Metadata
Release files for ag-llm 0.1.0a1
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 |
|---|---|---|---|---|
| ag_llm-0.1.0a1.tar.gz | 19.7 kB | Without provenance | Details for ag_llm-0.1.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ag_llm-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details for ag_llm-0.1.0a1-py3-none-any.whl |
Total release size: 41.6 kB
Release files / ag_llm-0.1.0a1.tar.gz
| Download URL | ag_llm-0.1.0a1.tar.gz |
|---|---|
| Size | 19.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa08386c1c1a3e19abc586e7ce77e7beaba374c843d4f83678fb0d00802a03ac
|
|
BLAKE2b-256 checksum How to use checksums |
39316069a0a0e3faf05514695889e1e86bc4ce09c4ba465c9b0bbd56844bdc94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.4
|
Release files / ag_llm-0.1.0a1-py3-none-any.whl
| Download URL | ag_llm-0.1.0a1-py3-none-any.whl |
|---|---|
| Size | 21.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dcbce77af1f5f9b63f4904560ff7c3ea8ea2bb0146142ac369c71274949ba91a
|
|
BLAKE2b-256 checksum How to use checksums |
0d3f73cf4e0705d4730276fe1ab06fb3f172a2e4ca908951ce67e17f381f0aef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.4
|
Security for ag-llm 0.1.0a1
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.