semvec/pypi-packages huggingface dataset:
libagent-ai 0.1.1
A simple LLM client wrapper for OpenAI-compatible APIs
License: MIT
Requires Python: >=3.10
Keywords: ai, chatgpt, llm, openai

# LLM Agent

A simple LLM client and AI Agent framework for OpenAI-compatible APIs.

## Features

- **LLM**: Basic client for OpenAI-compatible APIs with streaming support
- **ReActAgent**: Reasoning and Acting agent (coming soon)
- **PlanAndSolveAgent**: Planning and problem-solving agent (coming soon)
- **ReflectionAgent**: Self-reflective agent (coming soon)

## Installation

```bash
pip install libagent-ai
```

## Usage

### LLM Client

```python
from libagent_ai import LLM

llm = LLM(
    model="glm-4.7",
    apiKey="your-api-key",
    baseUrl="https://api.example.com/v1"
)

messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Hello!"}
]

response = llm.think(messages)
print(response)
```

### Using Environment Variables

Create a `.env` file:

```bash
LLM_API_KEY=your-api-key
LLM_BASE_URL=https://api.example.com/v1
```

Then use:

```python
from libagent_ai import LLM

llm = LLM(model="glm-4.7")
response = llm.think(messages)
```

## Development

```bash
# Install dependencies
uv sync

# Run tests
uv run python -m libagent_ai.llm
```

## License

MIT