# poe2-agent

AI agent for Path of Exile 2 build analysis. Published on crates.io as `poe2-agent`.

## Module Structure

| Module | Purpose |
|--------|---------|
| `llm` | OpenAI chat completion client (blocking and streaming) |
| `query_agent` | Single-turn build Q&A agent |
| `pob_parser` | Thread-safe PoB XML parser (wraps `pob` on a dedicated thread) |
| `pob` | Path of Building headless Lua integration |
| `wiki` | PoE2 wiki data fetcher |
| `knowledge` | Pre-summarized game mechanics for LLM context |

## Coding Standards

- Rust 2021 edition
- `thiserror` for library errors, `anyhow` for application errors
- `tracing` for logging (not `println!`)
- One concern per module
- Document public APIs

## Environment

```bash
# Required
export OPENAI_API_KEY="sk-..."

# PoB2 (if not already cloned)
git clone https://github.com/PathOfBuildingCommunity/PathOfBuilding-PoE2.git vendor/PathOfBuilding-PoE2
```
