Repository navigation
Conversation
lrahmani
requested review from
Alejandro-Morales,
Archento,
jrriehl and
qati
as code owners
November 5, 2026 16:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Type contract for Verified Actions — the metadata that Agentverse attaches to
ChatMessageto prove which tool calls an agent made while processing a user request.Why
Multiple components need to agree on the same data shape:
ChatMessagereference_idandsession_idDefining the types in
uagents-coremakes it the single source of truth, same ascards.What is in the module
Four action types — one per category of side effect, using inheritance from a shared base (
_ToolActionBase):typediscriminatorWebAction"web"url,method,status_codeLlmAction"llm"api_url,model,input_tokens,output_tokensMcpAction"mcp"server_url,tool_nameIntegrationAction"integration"integration,tool_nameToolAction— discriminated union of the four, routed bytype.VerifiedActions— aggregate:session_id(AEVS hash-chain anchor) + ordered list ofToolAction.Two helpers:
create_verified_actions_content(data) → MetadataContent— serializes forChatMessageextract_verified_actions(content) → VerifiedActions | None— deserializes, returnsNoneif not a match or validation failsvalidate_tool_action(raw_dict) → ToolAction | None— validates a single raw dict (e.g. from the VM queue) without raising.Design decisions
extra="ignore"on all models for forward compatibility — old code can parse payloads from newer versions (unknown fields silently dropped)VERIFIED_ACTIONS_VERSIONagainst the metadata value to detect outdated agentsaction.urlnotaction.data.url), cleaner construction, Pydantic discriminated union handles dispatchIntegrationActionnaming follows team agreement:integration= external service (Slack, Google Calendar),tool_name= specific callableHow it will be used