AGENT SKILL

optional-local-agent

Operate DeepXiv's optional OpenAI-compatible LangGraph ReAct Agent for local paper search, reading, and multi-turn analysis.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
optional-local-agent
license
MIT
metadata
{ "disco-role": "operating" }
description
Operate DeepXiv's optional OpenAI-compatible LangGraph ReAct Agent for local paper search, reading, and multi-turn analysis.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Optional local Agent

Use this route when the task needs DeepXiv's local ReAct loop with a caller-selected OpenAI-compatible chat model. It owns the deepxiv_sdk.Agent class, its optional dependency boundary, provider request options, paper-context persistence, tool orchestration, budgets, and failure recovery.

Do not use this route for hosted Reader.agent_search* calls or deepxiv agent ... CLI configuration/query syntax; route those to the Reader/CLI sibling skills.

Fast route

  1. Run scripts/agent_dependency_probe.py before diagnosing an optional-install problem. It performs local import/spec checks only; it never calls an LLM or the paper service.
  2. Install the optional set with python -m pip install "deepxiv-sdk[agent]" (or [all]). The published 1.0.0 extras declare openai, langgraph, and langchain-core, but do not declare tiktoken, although deepxiv_sdk.agent.agent imports it at module load. Install tiktoken explicitly when the probe reports it missing.
  3. Construct Reader and pass it explicitly to Agent; reader is a required constructor argument in source. Supply the model API key to api_key, and use base_url for an OpenAI-compatible provider.
  4. For reasoning models used across tool rounds, set enable_thinking=False (or pass an equivalent provider field through extra_body) when the provider rejects reasoning content in non-final assistant messages.
  5. Keep max_llm_calls and max_time_seconds bounded. Preserve context across follow-up query calls unless reset_papers=True or reset_papers() is intentional.
  6. Follow the load-first and progressive-reading protocol in references/tool-protocol.md; consult references/troubleshooting.md for missing papers versus service failures.

Operating rules

  • The base package can expose Reader without the Agent. deepxiv_sdk.__init__ attempts the Agent import and silently omits Agent when an optional import raises ImportError; check dependencies rather than assuming the symbol exists.
  • Never put a key, token, private endpoint, checkout path, or environment name in a public skill or example. Pass secrets at runtime.
  • Treat add_paper() returning False as a recoverable missing/not-yet-indexed result. Do not treat it as proof that the ID is invalid forever; try a different ID or broader search. Genuine server/auth/rate-limit failures propagate from add_paper().
  • A tool result describing a malformed argument, an unloaded paper, or a missing section is recoverable and must not by itself trip the service circuit breaker. Repeated service-side result markers do trip it and force a tools-less final-answer call.
  • query() returns the graph's extracted answer, but catches graph exceptions and returns an Error: ... string. add_paper() has different behavior: expected not-found/bad-request cases return False, while genuine API failures propagate.

References

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351