Skip to content

feat: replace custom ContextStore with A2A-native task history#121

Open
jezekra1 wants to merge 1 commit intomainfrom
a2a-native-context
Open

feat: replace custom ContextStore with A2A-native task history#121
jezekra1 wants to merge 1 commit intomainfrom
a2a-native-context

Conversation

@jezekra1
Copy link
Copy Markdown
Contributor

Summary

  • Replace the custom ContextStore abstraction with A2A's native TaskStore as the single source of truth for conversation history
  • Implement on_list_tasks in the A2A proxy so the UI can fetch history via ListTasks JSON-RPC
  • Rewire the UI to fetch conversation history from A2A tasks instead of the /contexts/{id}/history REST endpoint
  • Remove ~1,200 lines of duplicate history storage code

This is a breaking change — the context_store parameter, context.store(), and /contexts/history endpoints are all removed.

Closes #116

Changes by layer

adk-server

  • Implement on_list_tasks in ProxyRequestHandler (forwards to agent transport)
  • Remove context history endpoints (POST/GET/DELETE /contexts/{id}/history)
  • Remove title generation job and worker queue
  • Remove history-related service methods, repository code, and schema types
  • Keep context CRUD endpoints for sidebar/metadata

adk-py

  • Delete ContextStore, InMemoryContextStore, PlatformContextStore
  • Rewire RunContext to use TaskStoreload_history() now reads from task_store.get(task_id)
  • Remove store(), store_sync(), delete_history_from_id() from RunContext
  • Remove context_store parameter from create_app() and Server.serve()
  • Remove ContextHistoryItem and history methods from platform SDK
  • Update all agents, examples to remove context.store() calls

adk-ui

  • Add listTasks to A2A JSON-RPC client
  • Create fetchTasksForContext for server-side RSC task fetching
  • Add convertTasksToUIMessages for task→UI message conversion
  • Rewire AgentRunPlatformContextProviderMessagesProvider to use tasks
  • Remove useListContextHistory hook and context history API code

Test plan

  • mise run check passes (linting, type checking, doc snippets)
  • Start adk-server + agent, verify conversation history loads in UI via A2A ListTasks
  • Verify sidebar still lists conversations (contexts endpoint unchanged)
  • Verify canvas edit works (artifact lookup via load_history)
  • Verify new conversations work end-to-end

@jezekra1 jezekra1 force-pushed the a2a-native-context branch from ab4cbf2 to e204981 Compare March 30, 2026 08:22
@jezekra1 jezekra1 force-pushed the sdk-streaming-refactor branch from d0b5b45 to 8a81d55 Compare March 30, 2026 12:40
Base automatically changed from sdk-streaming-refactor to main March 30, 2026 13:08
Use A2A Tasks as the single source of truth for conversation history,
eliminating the duplicate ContextStore abstraction.

adk-server:
- Implement on_list_tasks in A2A proxy (forwards to agent transport)
- Remove context history endpoints (POST/GET/DELETE /contexts/{id}/history)
- Remove title generation job and worker
- Remove history-related service, repository, and schema code

adk-py:
- Delete ContextStore, InMemoryContextStore, PlatformContextStore
- Rewire RunContext to use TaskStore (load_history reads from task store)
- Remove store(), store_sync(), delete_history_from_id() from RunContext
- Remove context_store parameter from create_app() and Server.serve()
- Remove ContextHistoryItem and history methods from platform SDK

adk-ui:
- Add listTasks to A2A JSON-RPC client
- Create fetchTasksForContext for server-side task fetching
- Add convertTasksToUIMessages for task-to-UI conversion
- Rewire AgentRun/PlatformContextProvider/MessagesProvider to use tasks
- Remove useListContextHistory, context history API functions and types

Closes #116

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Radek Ježek <radek.jezek@ibm.com>
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