v0.4.0
Minor release — all changes since 0.3.0 are additive and backward compatible.
Highlights
- Token-accurate context (P19) —
TokenCounter+count_tokens+FitContextWindowtrim the transcript to a real token budget (pluggable tokenizer; tiktoken/provider counters drop in). - Pluggable memory (P20) — a
Memoryprotocol (recall/write) + dependency-freeInMemoryMemory;Agent(memory=…, remember_exchange=…)recalls cross-session context (bring your own vector DB behind the interface). - First-class structured output (P21) —
Agent(response_model=…)(Pydantic class or JSON-Schema dict) wires validation + retry, a schema prompt, and native provider enforcement (with_response_format) in one knob;outcome.parsedis typed. - Rate-limit-aware retries (P22) —
RetryModelhonors a provider'sRetry-After(default_retry_after,max_sleep,on_retry) instead of blind exponential backoff. - Tier C polish — eval JSONL/CSV loaders (
load_cases), record/replay cassettes (CassetteModel) for deterministic real-model tests, subagent cost roll-up (child spend → parent totals), and one-call tracing (instrument(agent)).
Install: pip install "agentix-toolkit[anthropic]" (import as agentix).
Full notes: see CHANGELOG.md.