Skip to content

feat(claude-agent-sdk): add Claude Agent SDK integration#1582

Open
DK09876 wants to merge 3 commits into
mainfrom
feat/claude-agent-sdk-integration
Open

feat(claude-agent-sdk): add Claude Agent SDK integration#1582
DK09876 wants to merge 3 commits into
mainfrom
feat/claude-agent-sdk-integration

Conversation

@DK09876
Copy link
Copy Markdown
Contributor

@DK09876 DK09876 commented May 11, 2026

Summary

  • Adds hindsight-claude-agent-sdk package under hindsight-integrations/claude-agent-sdk/
  • In-process MCP server providing retain, recall, and reflect tools for Claude agents
  • Automatic memory hooks: auto-recall on UserPromptSubmit, auto-retain on Stop, tool output retention on PostToolUse
  • Global configuration via configure() with per-call overrides
  • 74 unit tests covering tools, hooks, config, and consumer usage patterns
  • CI job in test.yml and release script entry
  • Cookbook recipe added to docs site

Test plan

  • uv run pytest tests -v — 74 tests pass
  • Lint passes (ruff check, ruff format)
  • End-to-end notebook run with live Claude Agent SDK + Hindsight API verified all steps (retain, recall, reflect, hooks)
  • CI runs on this PR

🤖 Generated with Claude Code

DK09876 and others added 3 commits May 29, 2026 08:43
…tools and hooks

Adds hindsight-claude-agent-sdk package providing:
- In-process MCP server with retain, recall, and reflect tools
- Automatic memory hooks (auto-recall on prompt, auto-retain on stop)
- Tool output retention via PostToolUse hooks
- Global configuration and per-call overrides
- 74 unit tests, CI job, and release script entry
- Cookbook recipe for docs site

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d E2E + bucketing

- resolve_client() now falls back to DEFAULT_HINDSIGHT_API_URL and the
  HINDSIGHT_API_KEY env var when configure() was never called (it previously
  raised). Updated the tools + hooks unit tests to assert the cloud-default +
  env-key behavior. Satisfies the "default to Cloud" goal for both
  create_hindsight_tools and create_memory_hooks.
- Add a gated tests/test_e2e.py (retain/recall/reflect MCP tools against a live
  Hindsight server, stdlib urllib health check — no requests dep), marked
  requires_real_llm; register the marker; the test-claude-agent-sdk-integration
  CI job now runs the deterministic bucket (-m "not requires_real_llm").

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…I_KEY from env

Mirrors the tools env-key test so hook construction's cloud-default + env-key
path is covered, not just the no-key default.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@DK09876 DK09876 force-pushed the feat/claude-agent-sdk-integration branch from 816d6f2 to bd29904 Compare May 29, 2026 15:44
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