Skip to content

feat: give agent ability to read cross-posted Slack message links [closes OPE-37]#1200

Open
Aran Yogesh (aran-yogesh) wants to merge 5 commits intomainfrom
yogesh/slack-link-resolution
Open

feat: give agent ability to read cross-posted Slack message links [closes OPE-37]#1200
Aran Yogesh (aran-yogesh) wants to merge 5 commits intomainfrom
yogesh/slack-link-resolution

Conversation

@aran-yogesh
Copy link
Copy Markdown
Contributor

@aran-yogesh Aran Yogesh (aran-yogesh) commented Apr 16, 2026

Summary

  • Add read_slack_message agent tool to resolve cross-posted Slack message
    links on demand
  • Auto-resolve Slack links in webhook preprocessing so the agent gets message
    content upfront

Trace

https://dev.smith.langchain.com/public/0c688e43-4f82-4165-a126-c53b64a3493a/r

Comment thread agent/webapp.py Outdated
all_context_text = " ".join(msg.get("text", "") for msg in context_messages)
slack_links = extract_slack_message_urls(all_context_text)
seen_urls: set[str] = set()
if slack_links:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

all this logic should be abstracted out. dont want to include this much business logic within an already very large function

Comment thread agent/webapp.py Outdated
f"## Conversation Context\n{context_text}\n\n"
f"## Latest Mention Request\n{clean_text}\n\n"
f"## Latest Mention Request\n{clean_text}"
f"{resolved_links_section}\n\n"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

shouldn't actually include this section unless there's contents (there likely won't be most of the time)

Comment thread agent/tools/read_slack_message.py Outdated
return message, author


def read_slack_message(url: str) -> dict[str, Any]:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this should be slack_read_thread_messages

and it should accept args for getting any message not just messages from urls:

  • message_ts
  • channel_ts
    the agent will be smart enough to convert the url to this format, and then it can also be used in other instances to get messages in slack

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