Skip to content

v0.8.0: Context Engineering, Memory v2, WhatsApp Hardening

Latest

Choose a tag to compare

@Anandesh-Sharma Anandesh-Sharma released this 24 Mar 15:53
· 43 commits to main since this release
d69dfd4

What's New in v0.8.0

Highlights

  • Context Engineering System — Layered prompts, token budget allocation, history trimming strategies, deferred tool loading, and LLM-based summarization for intelligent context management.
  • Memory v2 — New tool-based memory system with working memory + archived entries, SQLite FTS5 search, category-based organization, and system prompt injection.
  • WhatsApp Baileys Hardening — WebSocket reconnection with backoff, heartbeat monitoring, send retries, contact validation, credential save queue, and proper process lifecycle management.

New Features

  • Agent(context=Context(token_budget=TokenBudget(...))) for model-aware context window management
  • Context(deferred_tools=True) for progressive tool disclosure — models load tool schemas on demand
  • Context(history_strategy="tail"|"head_and_tail"|"summarize") for intelligent history trimming
  • Context(cache_optimization=True) for static/dynamic prompt splitting (Anthropic cache blocks)
  • Memory v2: WorkingMemory (scratchpad) + IndexEntry/MemoryEntry (archived), SQLiteStore with FTS5
  • BaileysProvider.check_on_whatsapp() — verify phone numbers are on WhatsApp
  • BaileysProvider.save_contact() — save contacts to WhatsApp address book
  • WhatsApp delivery tracking on all send operations with error logging
  • Agent(interfaces=[], gateway=) unified interface attachment

Reliability Improvements

  • Baileys WebSocket auto-reconnect with exponential backoff (up to 5 attempts)
  • Heartbeat monitoring detects stale connections and forces reconnect
  • Send retries with permanent-error detection (no retry on "blocked", "invalid jid", etc.)
  • Credential save queue prevents concurrent writes corrupting creds.json
  • Proper sidecar process reaping prevents zombie processes
  • Bridge handles viewOnceMessageV2 and ephemeralMessage wrappers
  • Bridge uncaughtException and unhandledRejection handlers prevent silent crashes
  • max_tool_rounds default increased from 30 to 500

Bug Fixes

  • Fixed parallel tool call name concatenation for non-OpenAI models (#150)
  • Fixed FTS5 search join using stable id column instead of fragile rowid
  • Fixed _ready_event not cleared before WebSocket reconnect wait
  • Fixed Telegram streaming double-reply when partial send occurred
  • Fixed RunOutput metadata propagation through _build_response
  • Skipped redundant CI lint/typecheck/test on merge to main

CI Fixes

  • Added pytest-timeout to dev dependencies (integration tests require --timeout)
  • Changed core dep to httpx[http2] (async client uses HTTP/2)
  • Added anthropic extra to integration test CI install
  • Fixed chunker test using chunk_size=200 with default chunk_overlap=200

Full Changelog: v0.7.0...v0.8.0