add asta literature interactive: stateful multi-turn paper-finder via A2A#52
Conversation
rodneykinney
left a comment
There was a problem hiding this comment.
Nice! Some minor comments
| not by the complexity of any single query: | ||
|
|
||
| - **`asta literature interactive`** — default for literature-focused sessions. Use it when the | ||
| **first interaction** in the session is about literature search or exploration, or when the |
There was a problem hiding this comment.
Instructions on when to use interactive vs find are 🏆
| literature-centered, prefer `interactive`. | ||
|
|
||
| **Continuing a conversation — recommended pattern (`--thread-dir`):** for any | ||
| multi-turn search session, pick a directory like `.asta/literature/threads/<topic>/` |
There was a problem hiding this comment.
Instead of <topic> use YYYY-MM-DD-<slug>, which is the pattern used by other agents
| # --------------------------------------------------------------------------- | ||
|
|
||
|
|
||
| async def _run_interactive( |
There was a problem hiding this comment.
How much of this logic is PF-specific? Could it be put into utils for other interactive A2A agents to use in the future?
| @@ -0,0 +1,382 @@ | |||
| """Interactive-A2A skill runner: Click options + server/auth resolution + | |||
There was a problem hiding this comment.
@regan-huff @charliemcgrady FYI: MarkP's implementation of an interactive CLI talking to an A2A server
There was a problem hiding this comment.
I also got some comments for the PR of the PF a2a endpoint impl, so I will merge this once the other (PF) PR is merged and deployed; most likely on Sunday/Monday.
028132a to
4862b94
Compare



Adds
asta literature interactive— a stateful, multi-turn literature search commandthat talks to the mabool paper-finder A2A endpoint over JSON-RPC + SSE. Runs the full
paper-finder agent (planning + reasoning/verification loop + conversation state) on top
of the same retrieval pipeline used by
asta literature find.Highlights:
--thread-dir DIRpersists a session: each turn writesDIR/<-o stem>.NNN.<ext>and appends to
DIR/index.json(ordered turn metadata +thread_id). Subsequentinvocations auto-resume the conversation — no copying ids between calls.
--thread-id <id>kept as a lower-level escape hatch.LiteratureSearchResult(compatible withfind) plus optionalthread_idandnarrativefields.asta authtoken /ASTA_A2A_API_KEY. Server URL via--serverorASTA_PAPER_FINDER_A2A_URL.Skills updated:
find-literature— documentsfindvsinteractiveat the session level (defaultto
interactivefor any literature-focused session;findfor embedded searchsub-steps in unrelated multi-step flows). Documents
--thread-diras therecommended multi-turn pattern.
semantic-scholar— cross-references find-literature for the "lookup vs. gradedretrieval" decision.