posit-dev / posit-dev/chatlas

tool_context() equivalent: per-conversation store and tool-calling context

Open
#425 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triage:done Priority: Low
Dominant language
Python
Stars
176
Forks
28
Avg merge
18h 42m
Merged PRs (30d)
16

Description

ellmer recently added tool_context() plus a per-conversation chat$store environment (tidyverse/ellmer#1023, part of tidyverse/ellmer#871). Tools can use it to access per-conversation state without globals, and it survives clone(deep = TRUE).

chatlas has no equivalent: there's no contextvar-based way for a running tool to access the current chat/tool-call context, and no per-chat mutable store.

Possible shape on the Python side: a tool_context() accessor backed by a contextvars.ContextVar set around tool invocation, plus a chat.store dict (or similar) that tools can read/write.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the tool invocation path and the chat cloning implementation; determine where a contextvars.ContextVar can surround tool calls and where per-chat state belongs. Done means tools can access the current context and mutable chat store, with the store preserved by deep cloning.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.