typedef-ai/fenic
A Python library providing declarative context construction for AI agents with typed tools and inference offloading.

fenic is a context construction layer for AI agents that works with any agent framework. It allows developers to declaratively specify what context an agent should see, applying deterministic and semantic transforms like extraction, chunking, retrieval, storage, summarization, and compaction. The library exposes the resulting context as typed, bounded tools while offloading inference work outside the agent’s prompt context window, reducing context bloat so agents remain focused on reasoning tasks.