Skip to content

feat(planner): adopt native Pydantic AI runtime - #196

Open
wilburx813 wants to merge 2 commits into
RLinf:mainfrom
wilburx813:feat/api-harness
Open

wilburx813 wants to merge 2 commits into
RLinf:mainfrom
wilburx813:feat/api-harness

Conversation

@wilburx813

Copy link
Copy Markdown
Collaborator

Description

  • Replace the custom API planner loop with Pydantic AI's native runtime.
  • Integrate the native CLI for terminal interaction and adapt Dashboard
    steering and cancellation.
  • Use Harness sliding-window trimming to manage conversation history.
  • Preserve tool history after failures, support finish retries, and
    retain Anthropic prompt caching.
  • Update dependencies, regression tests, and related documentation.

Testing

Local checks with Python 3.12:

  • pre-commit run --all-files: passed.
  • python -m pytest tests/unit_tests -q -ra: 598 passed, 3 skipped
    due to missing optional RLinf and LeRobot dependencies.
  • sphinx-build -W --keep-going docs/source-en docs/build/html-en: passed.
  • sphinx-build -W --keep-going docs/source-zh docs/build/html-zh: passed.
  • python -m rpent.cli.main --help, API planner import, and pip check: passed.

Manual verification

No live model API, simulator, or real-robot verification performed.

Checklist

  • My code follows the code style of this project.
  • I have updated related documentation when needed.
  • I have added tests to cover my changes when needed.
  • All new and existing tests passed.

@read-the-docs-community

read-the-docs-community Bot commented Sep 17, 2026

Copy link
Copy Markdown

Documentation build overview

📚 RPent | 🛠️ Build #34606353 | 📁 Comparing f416c51 against latest (de921c5)

  🔍 Preview build  

2 files changed
± rst_source/development/architecture.html
± rst_source/usage/configure_planner.html

@read-the-docs-community

read-the-docs-community Bot commented Sep 17, 2026

Copy link
Copy Markdown

Documentation build overview

📚 RPent-cn | 🛠️ Build #34606354 | 📁 Comparing f416c51 against latest (de921c5)

  🔍 Preview build  

2 files changed
± rst_source/development/architecture.html
± rst_source/usage/configure_planner.html

Comment thread rpent/planner/api_loop.py
logger = get_logger("api")


class ApiAgentLoop:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add an abstract base class for planners

Comment thread rpent/planner/api_loop.py
from pydantic_ai.messages import ModelMessage, UserContent
from pydantic_ai.models import Model, ModelRequestContext
from pydantic_ai.run import AgentRun, AgentRunResult
from pydantic_ai_harness.compaction import SlidingWindowCompaction

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is only the SlidingWindowCompaction feature in the pydantic harness used?

@qurakchin
qurakchin self-requested a review September 17, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants