Skip to content

Conversation

@murrayju
Copy link
Member

When processing a message in a Slack thread, fetch the prior 10 messages and pass them to the Pydantic-AI agent as message_history. This provides the AI with conversation context without requiring MCP tool calls.

Changes:

  • Add ThreadMessage type in types.py for representing thread messages
  • Add fetch_thread_replies function in slack.py to fetch thread history
  • Modify generate_response in agent.py to build and pass message_history
  • User messages become ModelRequest, bot messages become ModelResponse

When processing a message in a Slack thread, fetch the prior 10 messages
and pass them to the Pydantic-AI agent as message_history. This provides
the AI with conversation context without requiring MCP tool calls.

Changes:
- Add ThreadMessage type in types.py for representing thread messages
- Add fetch_thread_replies function in slack.py to fetch thread history
- Modify generate_response in agent.py to build and pass message_history
- User messages become ModelRequest, bot messages become ModelResponse
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

4 participants