Skip to content

Add guide method#11

Merged
g-eoj merged 7 commits intomainfrom
change-api
Feb 1, 2026
Merged

Add guide method#11
g-eoj merged 7 commits intomainfrom
change-api

Conversation

@g-eoj
Copy link
Owner

@g-eoj g-eoj commented Dec 17, 2025

Goal:

from cragents import CRAgent, Anchor, Constrain, Free, Think, UseTools
from pydantic_ai import ToolOutput


agent = CRAgent(model, output_type=[ToolOutput(int), ToolOutput(bool)])

generation_sequence = [
    Think(
        [
            Anchor("I think "), 
            Constrain(2,2),
            Anchor("Therefore "), 
            Free(),
        ]
    ),
    UseTools(),
]

await agent.guide(generation_sequence)

Todo:

  • Tweak API
    • Handle Anchor and Block in main sequence
  • Update README
  • Improve test coverage
  • Define stricter types

@g-eoj g-eoj changed the title Change API Add guide method Jan 21, 2026
@g-eoj g-eoj force-pushed the change-api branch 9 times, most recently from 7a116ad to bcfab0d Compare February 1, 2026 18:34
@g-eoj g-eoj marked this pull request as ready for review February 1, 2026 18:59
@g-eoj g-eoj merged commit 04b17be into main Feb 1, 2026
2 checks passed
@g-eoj g-eoj mentioned this pull request Feb 1, 2026
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.

1 participant