Prompt "profiles": serializable bundles of system prompt + tools + schema
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- python
- Domain
- backend-api-design
Research direction
Start by reading chatlas/_interpolate.py and chatlas/_chat.py, especially interpolate(), chat_structured(), set_model_params(), and the tool methods. Resolve the open questions around serialization scope and the creation entry point, then verify that a Profile can round-trip its system_prompt, data_model, and params and create a Chat with interpolation. Tool bundling is outside the initial done criteria.
Written by the indexing model from the issue text.
Description
Motivation
Simon Willison's llm has templates: YAML bundles of system prompt, prompt fragments, model options, tools, and schemas, invoked via llm -t name. This lets users package up a reusable "agent config" and share it as a file. chatlas has the pieces (interpolate()/interpolate_file() in chatlas/_interpolate.py, register_tool()/set_tools() and chat_structured(data_model=...) in chatlas/_chat.py, set_model_params()), but nothing that bundles them into one serializable, shareable unit. Pydantic AI has a related but narrower idea in reusable Agent instances, though those aren't declaratively serializable either.
Proposed approach
Introduce a Profile object — a thin, serializable bundle of the inputs to a Chat, not a new execution engine:
from chatlas import Profile, ChatOpenAI
profile = Profile(
system_prompt="You are a terse SQL assistant.\n{{ extra_instructions }}", # interpolate() template
data_model="myapp.schemas.SqlAnswer", # optional, import-path string
params={"temperature": 0.2},
)
chat = profile.create_chat(ChatOpenAI, variables={"extra_instructions": "Always cite the table."})
Profile.from_yaml(path)/Profile.to_yaml(path)(or TOML) for round-tripping.system_promptis rendered throughinterpolate()atcreate_chat()time, so the same template mechanics/variable-inference already in_interpolate.pyapply.data_modelandparamsmap directly ontochat_structured(data_model=...)andset_model_params().- Tools are the hard part. Functions aren't YAML-serializable. Two honest options: (a) store an import path string (
"myapp.tools:lookup_price") resolved viaimportlibat load time — simple, but ties the profile to code being importable in the same environment; (b) require a small in-app registry mapping names to callables that the profile references by name only. Given this complexity, the proposal is to ship the non-tool subset first (system prompt + data_model + params, dumpable/loadable), and treat tool bundling as a stretch goal / separate follow-up once the serialization approach is validated with users.
Alternatives / prior art
- ellmer has
interpolate()(string-only) and no bundling concept beyond that — this would be new territory for both projects, so getting the design right in chatlas first and porting later (as usual) seems reasonable. - Do nothing: users keep hand-rolling a
dict/module of prompt+schema+params, which works but isn't shareable as a file the wayllm's templates are. - A pure-YAML "recipe" that only ever produces kwargs for
ChatAuto(**kwargs)(no new class) is a lighter-weight alternative worth considering.
Open questions
- Is
create_chat()the right entry point, or should this be aChat*(profile=...)constructor kwarg instead (per the original ask)? - YAML vs TOML vs both?
- Should
Profilealso carry the provider/model string (à laChatAuto's"provider/model"), or stay provider-agnostic and let the caller pick theChat*class?
Drafted from a competitive review of llm / Pydantic AI / LangChain / LiteLLM (July 2026); filed via Claude Code on behalf of @cpsievert.
- Dominant language
- Python
- Stars
- 179
- Forks
- 32
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 10
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from posit-dev/chatlas
-
A streaming text delta that repeats everything streamed so far is missing from the recorded turnPossibly taken @cpsievert claimed this 81 days ago. Openai-triage:done Priority: Medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
ai-triage:needs-review documentation
Difficulty 2/5 1-2 days Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
ai-triage:done Priority: Low
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
All issues in posit-dev/chatlas
Similar issues
-
jira: an unquoted JQL number of more than 4300 digits is a plain-text 500, where real answers 200Openfidelity
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
A JSON chat answer blocks the backend event loop for the whole RAG runPossibly taken @NopeCharon claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
The-OpenROAD-Project/ORAssistant#656 ·
Maintainers usually reply within 1 day
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionErrorPossibly taken @jejjohnson claimed this today. Opentype:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jejjohnson/integrix#144 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
finos/ai-governance-framework#459 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
Maintainers usually reply within 1 day