Skip to content

add asta literature interactive: stateful multi-turn paper-finder via A2A#52

Merged
Grishezz merged 4 commits into
mainfrom
literature-find-interactive
May 11, 2026
Merged

add asta literature interactive: stateful multi-turn paper-finder via A2A#52
Grishezz merged 4 commits into
mainfrom
literature-find-interactive

Conversation

@Grishezz

@Grishezz Grishezz commented May 4, 2026

Copy link
Copy Markdown
Contributor

Adds asta literature interactive — a stateful, multi-turn literature search command
that 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 DIR persists a session: each turn writes DIR/<-o stem>.NNN.<ext>
    and appends to DIR/index.json (ordered turn metadata + thread_id). Subsequent
    invocations auto-resume the conversation — no copying ids between calls.
  • --thread-id <id> kept as a lower-level escape hatch.
  • Streams step-progress events to stderr in real time.
  • Output schema mirrors LiteratureSearchResult (compatible with find) plus optional
    thread_id and narrative fields.
  • Auth: optional bearer (gateway-enforced upstream); falls back to asta auth token /
    ASTA_A2A_API_KEY. Server URL via --server or ASTA_PAPER_FINDER_A2A_URL.

Skills updated:

  • find-literature — documents find vs interactive at the session level (default
    to interactive for any literature-focused session; find for embedded search
    sub-steps in unrelated multi-step flows). Documents --thread-dir as the
    recommended multi-turn pattern.
  • semantic-scholar — cross-references find-literature for the "lookup vs. graded
    retrieval" decision.

@Grishezz

Grishezz commented May 4, 2026

Copy link
Copy Markdown
Contributor Author
Screenshot 2026-05-04 at 23 29 07 Screenshot 2026-05-04 at 23 29 23 Screenshot 2026-05-04 at 23 31 36

@rodneykinney rodneykinney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>/`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of <topic> use YYYY-MM-DD-<slug>, which is the pattern used by other agents

Comment thread src/asta/literature/interactive.py Outdated
# ---------------------------------------------------------------------------


async def _run_interactive(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much of this logic is PF-specific? Could it be put into utils for other interactive A2A agents to use in the future?

@rodneykinney rodneykinney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to have this!

@@ -0,0 +1,382 @@
"""Interactive-A2A skill runner: Click options + server/auth resolution +

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@regan-huff @charliemcgrady FYI: MarkP's implementation of an interactive CLI talking to an A2A server

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Grishezz
Grishezz force-pushed the literature-find-interactive branch from 028132a to 4862b94 Compare May 11, 2026 09:55
@Grishezz
Grishezz merged commit c278bbd into main May 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants