Skip to content

Document usage of existing Chat record with Agent#693

Merged
crmne merged 3 commits into
crmne:mainfrom
sarrietav-dev:patch-1
May 6, 2026
Merged

Document usage of existing Chat record with Agent#693
crmne merged 3 commits into
crmne:mainfrom
sarrietav-dev:patch-1

Conversation

@sarrietav-dev

Copy link
Copy Markdown
Contributor

Added instructions for using an existing Chat record with Agent.

What this does

Adds a section to the Agents docs about how to instantiate an Agent using an existing chat. I found this useful when handling authorization of chats/agents:

chat_record = Current.user.chats.find(params[:id])
@chat = WorkAssistant.new(chat: chat_record)

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Performance improvement

Scope check

  • I read the Contributing Guide
  • This aligns with RubyLLM's focus on LLM communication
  • This isn't application-specific logic that belongs in user code
  • This benefits most users, not just my specific use case

Added instructions for using an existing Chat record with Agent.
@crmne crmne merged commit e6eeb13 into crmne:main May 6, 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.

2 participants