Single-vessel, single-agent demo that wires a shared HistoryStore so the agent remembers what was said earlier in the conversation. Pair this with vesseld-multi-vessel — that one shows multi-agent + Kanban delegation; this one shows how a Vessel preserves transcript state across turns.
| File | Concept |
|---|---|
daemon.yaml |
Daemon-wide config: control socket, drain timeout, shared LLM rate-limit bucket. |
shared/openai.yaml |
One LLMProfile. |
shared/history.yaml |
A HistoryStore with ref: buffer and a per-conversation cap of 500 messages. |
vessels/assistant/vessel.yaml |
Vessel references the HistoryStore; the Agent opts into historyAccess: read_write. |
Multiple Vessels can reference the same HistoryStore — useful when a "human" vessel and a "supervisor sidecar" vessel need to see one another's turns.
export OPENAI_API_KEY=sk-...
go build -o ./vesseld ./cmd/vesseld./vesseld validate --config examples/vesseld-with-history -R
./vesseld run --config examples/vesseld-with-history -RThe key is a stable context_id in each request. Different context_ids give independent transcripts; the same one continues a thread.
SOCK=/tmp/vesseld-with-history.sock
CONV=demo-alice # any stable string; treat it as the conversation key
# Turn 1: tell the agent something.
curl --unix-socket $SOCK -X POST http://vesseld/v1/vessels/assistant/call \
-H 'content-type: application/json' \
-d "{\"agent\":\"assistant-agent\",\"context_id\":\"$CONV\",\"query\":\"My name is Alice and I prefer coffee over tea.\"}"
# Turn 2: ask a follow-up — the agent recalls from the buffer.
curl --unix-socket $SOCK -X POST http://vesseld/v1/vessels/assistant/call \
-H 'content-type: application/json' \
-d "{\"agent\":\"assistant-agent\",\"context_id\":\"$CONV\",\"query\":\"What should I drink this morning?\"}"The second response should reference coffee. Change CONV to a new value and ask the same question — the agent will (correctly) admit it doesn't know.
The buffer history lives in the daemon's memory. Restart
vesseldand every conversation is gone.Persistent transcripts across daemon restarts arrive in
v0.2.0via theCompactedhistory flavor (hierarchical SummaryDAG + SQLite/Postgres-backedStore). The declarative YAML schema and thevessel.WithSessionStoreoption are on the v0.2.0 roadmap.If you need cross-restart memory today, embed
vesselas a library and passhistory.NewCompacted(store, llm, ws)directly — seeexamples/chatbot-with-recall/for the in-process pattern.
- Set
maxMessageslower (e.g. 20) and observe the agent "forgetting" once eviction kicks in. - Add a second agent to the same vessel with
historyAccess: read_onlyto model a supervisor that watches without writing. - Combine with
examples/vesseld-multi-vessel/patterns: point both demo daemons at the sameHistoryStoredocument and they'll share transcripts.