You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If opencode evolves into a general purpose platform beyond coding, people may have a lot of state sitting around.
Scalability: pgvector > sqlite-vec
The main reason people prefer sqlite is the embedded nature of the solution. That advantage goes away with pgserver and opens up the door to other postgres extensions like pgvectorscale and beyond.
Excellent. I'm looking forward to pushing my work to pypi as a new package (didn't hear back from the maintainer of pgserver after a week, no activity on github).
Will ping here once its on pypi and then we can look into writing an embedded postgres provider. Thank you for making the interface generic!
Excellent. I'm looking forward to pushing my work to pypi as a new package (didn't hear back from the maintainer of pgserver after a week, no activity on github).
Will ping here once its on pypi and then we can look into writing an embedded postgres provider. Thank you for making the interface generic!
unfortunately it wasn't received well, their own branch prefers hardcoding sqlite with no interfance and an unconfigurable schema.
@pschiel what was the reason your approach was dismissed? I do share the opinion of having a an interface for storage can benefit the project as it can allow for more distributed setups that can access and share the same history.
From an end user benefit point of view, the access to postgres extensions is a much bigger deal. But there is a perception that for embedded use sqlite works and postgres doesn't. Don't know where it comes from (other than familiarity with embedded sqlite).
sqlite is a better fit for the direction we're going, also maintaining agnostic storage backends is way too much overhead. you can replicate sqlite db into whatever you need
My guess is that over time opencode will support hosted postgres (shared coding agents). And similar to roborev-dev, will pursue a dual database strategy. This is likely based on the maintainer belief that:
SQLite is a good enough SQL implementation (which I agree)
SQLite has good enough vector search (I'm not sure if this is true)
SQLite has lower overhead in an embedded environment (resource usage, startup time)
SQLite provides a path to knowledge graphs and deterministic retrieval (As a maintainer of a graphdb, I'm biased)
Pgembed is built around the belief that:
over time, the richer postgres extension ecosystem will provide customer benefit (pgvector, pgvectorscale)
the resource usage gap can be closed (added support for alpine containers recently)
gentler upgrade path when you outgrow local storage and want to explore hosted postgres for multi-agent state
Please show up on our discord to discuss this topic further. Nanobot on pgembed is a proof of concept.
Activity
github-actions commentedon Jan 11, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Jan 11, 2026
we will prolly start using sqlite instead soon
adsharma commentedon Jan 11, 2026
If opencode evolves into a general purpose platform beyond coding, people may have a lot of state sitting around.
Scalability: pgvector > sqlite-vec
The main reason people prefer sqlite is the embedded nature of the solution. That advantage goes away with pgserver and opens up the door to other postgres extensions like pgvectorscale and beyond.
My motivation is to implement something like
https://github.com/yichuan-w/LEANN like solution on top of general purpose session storage.
pschiel commentedon Jan 17, 2026
proposal to introduce storage interface, supporting json/sqlite: #9012
postgres could be just another provider, selectable in your config
adsharma commentedon Jan 17, 2026
Excellent. I'm looking forward to pushing my work to pypi as a new package (didn't hear back from the maintainer of pgserver after a week, no activity on github).
Will ping here once its on pypi and then we can look into writing an embedded postgres provider. Thank you for making the interface generic!
pschiel commentedon Jan 20, 2026
unfortunately it wasn't received well, their own branch prefers hardcoding sqlite with no interfance and an unconfigurable schema.
adsharma commentedon Jan 21, 2026
https://github.com/Ladybug-Memory/pgembed - if you want to experiment with persisting session state with this backend.
Rezrazi commentedon Feb 11, 2026
@pschiel what was the reason your approach was dismissed? I do share the opinion of having a an interface for storage can benefit the project as it can allow for more distributed setups that can access and share the same history.
adsharma commentedon Feb 11, 2026
From an end user benefit point of view, the access to postgres extensions is a much bigger deal. But there is a perception that for embedded use sqlite works and postgres doesn't. Don't know where it comes from (other than familiarity with embedded sqlite).
thdxr commentedon Feb 14, 2026
sqlite is a better fit for the direction we're going, also maintaining agnostic storage backends is way too much overhead. you can replicate sqlite db into whatever you need
adsharma commentedon Feb 14, 2026
Similar discussion and decision here: kenn-io/roborev#213
My guess is that over time opencode will support hosted postgres (shared coding agents). And similar to roborev-dev, will pursue a dual database strategy. This is likely based on the maintainer belief that:
Pgembed is built around the belief that:
Please show up on our discord to discuss this topic further. Nanobot on pgembed is a proof of concept.