Commit graph

53 commits

Author SHA1 Message Date
Yiorgis Gozadinos
771ac9c96c
Register the optional capabilities where agents are composed
The README feature list and the overview stopped at the analysis capability.
Both examples and the app backend composed agents without the capabilities the
documentation recommends alongside an evidence capability.

custom_agent.py ran each input as an independent agent run, so it needed a state
dict and a carried history before compaction could mean anything there: without
state the evidence record is empty, and earlier evidence would reduce to
receipts retaining nothing.
2026-08-13 15:04:05 +03:00
Yiorgis Gozadinos
2cd568847e
Move the wire rewrite into the compaction capability
`_compact_old_tool_returns`, `PRIOR_TURN_NOTICE` and `turn_start` leave
`RAGCapabilityBase`, along with its `wrap_model_request` hook. The evidence
capabilities now retrieve and validate, and nothing else. Registering the compaction
capability is what rewrites a request; leaving it out sends the transcript untouched,
which was never a choice a host could make before.

The boundary is the recorded question identity rather than message shape, so a
resumption compacts what lies below the question in progress instead of switching
compaction off for the whole run. The newest earlier evidence return carries the
capsule and every other becomes a receipt, so one capsule exists by construction and
every return stays paired with its call.

Pictures of cited evidence are fetched through the capability that retrieved them and
re-attached beside the capsule with fresh labels. Ownership of a picture on the wire
requires the machine tag we write and an image directly after it, since neither
position nor prose is proof: several tools' results can arrive in one request, and a
user quoting our wording above their own picture had it removed. A picture that cannot
be fetched or decoded is emitted with neither its image nor its label.

The chat TUI and the example backend register the compactor, being multi-turn.
`client.ask`, `client.analyze` and the MCP tools do not: a single-shot question has
nothing earlier to compact.
2026-08-13 13:00:02 +03:00
Yiorgis Gozadinos
9e7db72997
Load capabilities eagerly for dedicated single-agent consumers 2026-07-24 15:26:17 +03:00
Yiorgis Gozadinos
9deb1f2bd4
replace haiku.skills with native Pydantic AI capabilities 2026-07-24 15:26:17 +03:00
Yiorgis Gozadinos
da79f92af1
Honor OTEL_SERVICE_NAME and set service name/version for all processes 2026-07-10 11:11:46 +03:00
Yiorgis Gozadinos
995d081aa1
Visualize the exact context the model saw via Citation.doc_item_refs
visualize_chunk re-expanded chunks from scratch to recover their refs,
which could not faithfully reproduce the original merge, scores, and
clip — so a visualization could highlight different pages than the
citation covered. Carry the cited items on Citation.doc_item_refs and
resolve bounding boxes from them directly; re-expansion remains only as
the fallback for callers with no stored context (CLI, inspector). Chat,
inspector, the app endpoint, and the frontend pass the refs through.
2026-07-09 11:51:37 +03:00
Yiorgis Gozadinos
494f774473
Visualize all constituent chunks of a merged citation 2026-07-09 11:05:41 +03:00
Yiorgis Gozadinos
1969c4528e
Fix example app 2026-06-26 13:12:53 +03:00
Yiorgis Gozadinos
1df6530d03
Bump pydantic-ai, prepare for 2.* 2026-05-18 15:14:29 +03:00
Yiorgis Gozadinos
2ad51f5dca
Serialize HaikuRAG singleton creation in backend get_client 2026-04-24 15:31:20 +03:00
Yiorgis Gozadinos
d99e48a9a3
Close HaikuRAG client on backend shutdown 2026-04-24 14:43:59 +03:00
Yiorgis Gozadinos
82fd10e0ee
Migrate LanceDB to native async API
Convert all LanceDB operations from sync calls wrapped in async
functions to the native async API (connect_async, AsyncConnection,
AsyncTable, AsyncQuery). Database I/O no longer blocks the event loop.

- Store and HaikuRAG use async context managers (async with). Store
  initialization is deferred to __aenter__; direct construction
  without async with is no longer supported.
- Index creation uses config objects (FTS, BTree, IvfPq) instead of
  string-based index_type parameter.
- Upgrade callbacks are async.
- HaikuRAG tracks background vacuum tasks and awaits them in __aexit__
  and before destructive rebuild operations to avoid races with
  concurrent table mutations.
- temp_db_path fixture uses pytest's tmp_path for reliable async
  cleanup.
2026-04-24 14:42:52 +03:00
Yiorgis Gozadinos
a1181ff52d
extract get_database_stats and share it across info, inspector, and backend 2026-04-17 15:33:30 +03:00
Yiorgis Gozadinos
e16c819e83
Adapt to new haiku.skills 2026-04-16 11:50:55 +03:00
Yiorgis Gozadinos
c4c90b3930
Propagate domain_preamble to skill instructions and main agent preamble 2026-04-01 13:13:36 +03:00
Yiorgis Gozadinos
2566bf1a61
Adapt to haiku.skills streaming sub-agent ag-ui events 2026-03-03 11:16:44 +02:00
Yiorgis Gozadinos
52ef983e75
Fix default chat model, default to config.qa.model 2026-02-28 14:00:40 +02:00
Yiorgis Gozadinos
27a71c7e01
Adapt skill usage to haiku.skills prompt builder. Closes #289 2026-02-28 13:34:54 +02:00
Yiorgis Gozadinos
eb9436eb2a
Remove unused conversational output mode from research graph 2026-02-20 16:36:50 +02:00
Yiorgis Gozadinos
972fb18d30
Wire AG-UI state round-tripping in app backend 2026-02-20 16:36:50 +02:00
Yiorgis Gozadinos
a7850e2210
Assign stable index to citations. Use a strong prompt preamble for our app agents 2026-02-20 16:36:48 +02:00
Yiorgis Gozadinos
643ed20d6f
Rewrite chat TUI and app backend with haiku.skills 2026-02-20 16:36:48 +02:00
Yiorgis Gozadinos
8c76897af2
Update tui and app to use the toolkit 2026-02-16 12:54:44 +02:00
Yiorgis Gozadinos
5f6d9e9812
handle state_key duplication between deps and ToolContext 2026-02-13 10:23:12 +02:00
Yiorgis Gozadinos
05ebd781d4
Move client and tool_context from toolset factories to RunContext.deps 2026-02-12 15:50:46 +02:00
Yiorgis Gozadinos
58c2bd49ea
Clean up server vs client session setting priorities 2026-02-11 16:54:00 +02:00
Yiorgis Gozadinos
9e63ff1ff7
Remove session_id from state layer, remove module-level caches 2026-02-11 14:55:53 +02:00
Yiorgis Gozadinos
c916356a42
Clean up toolset exports, simplify update_session_context(), fix health check 2026-02-11 12:46:50 +02:00
Yiorgis Gozadinos
3ed9cbb7d3
Use the tools inside the chat agent. 2026-02-10 14:38:12 +02:00
Yiorgis Gozadinos
cbd94f6cc9
Always use state deltas instead of conditional snapshot/delta logic 2026-01-28 17:03:18 +02:00
Yiorgis Gozadinos
e325962fcc
Add logging to the backend 2026-01-28 14:08:24 +02:00
Yiorgis Gozadinos
b5aeefb10f
Fix state delta computation by avoiding mutation of original state 2026-01-28 14:06:29 +02:00
Yiorgis Gozadinos
c27dde2497
Send state deltas updates instead of full state snapshots 2026-01-28 14:06:29 +02:00
Yiorgis Gozadinos
614c34b98f
Add read-only initial context for chat sessions for TUI and web app 2026-01-27 13:59:00 +02:00
Yiorgis Gozadinos
ee3cb5bd87
Allow initial_context to be set for the chat agent 2026-01-27 10:38:18 +02:00
Yiorgis Gozadinos
0419c9a0ae
Filter documents in app 2026-01-26 16:42:40 +02:00
Yiorgis Gozadinos
5aabae4d06
Remove background_context & simplify 2026-01-26 16:42:39 +02:00
Yiorgis Gozadinos
9d71ccb213
Move session context to agent, make AGUI work 2026-01-26 16:42:39 +02:00
Yiorgis Gozadinos
aaddf4a5a9
Dynamic session context to be used in the conversational agent 2026-01-26 16:41:12 +02:00
Yiorgis Gozadinos
ea7a4a9a8f
apply dotenv usecwd fix to remaining files
Apply the same find_dotenv(usecwd=True) fix from cli.py to:
- evaluations/evaluations/benchmark.py
- app/backend/main.py

Co-Authored-By: Tianyi Cui <contact@tianyicui.com>
2026-01-22 12:41:35 +02:00
Yiorgis Gozadinos
5e55c0df54
replace pyright with ty type checker 2026-01-19 15:50:14 +02:00
Yiorgis Gozadinos
bdfc6b87e7
Rename initial_context to background_context 2026-01-16 15:03:42 +02:00
Yiorgis Gozadinos
18362f01c2
Pass context for CLI/app 2026-01-16 15:03:06 +02:00
Yiorgis Gozadinos
7639c2915e
Add AGUI_STATE_KEY for namespaced AG-UI state emission 2026-01-15 15:46:37 +02:00
Yiorgis Gozadinos
7cc561d1db
Refactor to make agents a top-level module. Bring in the conversational agent from the app 2026-01-12 12:37:08 +02:00
Yiorgis Gozadinos
f2fb64cbca
Remove custom ag-ui from app backend. 2026-01-12 12:36:32 +02:00
Yiorgis Gozadinos
a6a60963c0
Add SSE heartbeat to prevent connection timeouts
Sends SSE comment every 15 seconds during long LLM operations
to keep the connection alive and prevent body timeout errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 12:36:30 +02:00
Yiorgis Gozadinos
18cec25fc9
Visual grounding; 2026-01-12 12:36:30 +02:00
Yiorgis Gozadinos
6ba28244d8
Logfire integration for debugging 2026-01-12 12:36:29 +02:00
Yiorgis Gozadinos
14873862f8
Q/A history 2026-01-12 12:36:29 +02:00