Metadata-Version: 2.4
Name: recurve
Version: 0.1.0
Summary: Recursive context-aware reasoning & planning for LLM agents — the ReCAP loop (arXiv:2510.23822) as a thin, provider-agnostic library.
Keywords: llm,agents,planning,recap,recursive,reasoning
Author: ned
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Dist: pydantic>=2.12
Requires-Dist: anyio>=4.4
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic-ai-slim[anthropic]>=1.104,<3 ; extra == 'anthropic'
Requires-Dist: litellm>=1.83.0,<2 ; extra == 'litellm'
Requires-Dist: pydantic-ai-slim[openai]>=1.104,<3 ; extra == 'openai'
Requires-Dist: opentelemetry-api>=1.27 ; extra == 'otel'
Requires-Dist: opentelemetry-sdk>=1.27 ; extra == 'otel'
Requires-Python: >=3.11
Project-URL: Homepage, https://github.com/main-path/aethel
Project-URL: Source, https://github.com/main-path/aethel
Project-URL: Issues, https://github.com/main-path/aethel/issues
Provides-Extra: anthropic
Provides-Extra: litellm
Provides-Extra: openai
Provides-Extra: otel
Description-Content-Type: text/markdown

# recurve

> Recursive context-aware reasoning & planning for LLM agents.

`recurve` is a thin, async-first, provider-agnostic Python library implementing the **ReCAP**
loop — *Recursive Context-Aware Reasoning and Planning*
([arXiv:2510.23822](https://arxiv.org/abs/2510.23822), NeurIPS 2025).

Its one defensible novelty, packaged nowhere else: ReCAP's **single shared sliding-window context
with structured re-injection** of the parent's remaining plan on return — not isolated sub-agent
contexts, not a graph engine. The loop:

1. **plan-ahead** — emit the whole ordered subtask list, but execute only the first item;
2. **recurse** on composite subtasks within the *same* shared context;
3. **re-inject** the parent's remaining plan when a subtask returns;
4. **refine** the remaining plan after each step.

Provider plumbing, typed structured outputs, retries, and tracing are *reused* (Pydantic AI / LiteLLM
behind a tiny 2-method `Model` protocol), never reinvented.

Part of the [AETHEL](https://github.com/main-path/aethel) project. MIT licensed. Status: alpha (Phase 1).
