Skip to content

feat(agent): add cell-explorer-agent library and CLI#54

Open
hweej wants to merge 26 commits intomainfrom
feature/chat-agent-library
Open

feat(agent): add cell-explorer-agent library and CLI#54
hweej wants to merge 26 commits intomainfrom
feature/chat-agent-library

Conversation

@hweej
Copy link
Copy Markdown
Contributor

@hweej hweej commented Apr 23, 2026

Summary

  • New cell-explorer-agent uv workspace package: dataset-scoped LLM chat agent over a provider-pluggable LLMClient protocol (Anthropic adapter ships v1; direct / Bedrock / Vertex transports).
  • 7 data tools (get_dataset_schema, describe_obs_column, cluster_stats, search_genes, gene_expression_summary, top_expressed_genes, compare_groups) + 7 UI-action tools that emit partial AppConfig payloads consumed by the frontend viewer.
  • Typer CLI cell-explorer-chat single-shot entry point; FakeLLMClient + FakeZarrAccess drive 84 unit/integration tests with no network dependency.
  • All tool responses bounded via cap_json_bytes; agent loop enforces max_tool_calls_per_turn, converts tool exceptions into structured tool-results with correlation IDs, and propagates cancellation.

Scope

This is plan 1 of 3 for the chat feature. The FastAPI /api/chat route and the frontend chat package ship in follow-up PRs.

Test plan

  • uv run pytest packages/cell-explorer-agent/tests/ -v — 84 passed, 1 skipped (TS drift check only runs in non-worktree checkout)
  • uv run cell-explorer-chat --help renders expected usage
  • Full workspace suite still green: uv run pytest — 181 pre-existing tests remain passing alongside the new 84
  • Manual smoke test against a real dataset with ANTHROPIC_API_KEY set

hweej added 26 commits April 23, 2026 20:41
@hweej hweej force-pushed the feature/chat-agent-library branch from 6510477 to ae70608 Compare April 24, 2026 00:41
@hweej hweej self-assigned this Apr 24, 2026
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.

1 participant