Skip to content

Add PydanticAI integration example #4

@creatorrmode-lead

Description

@creatorrmode-lead

What needs to be done

Add an example showing how to use AVP trust tools with PydanticAI. PydanticAI is a popular agent framework by the Pydantic team — we don't have an example for it yet.

Template to follow

Use examples/openai_example.py as the pattern:

  1. Register an agent on AVP
  2. Define AVP tools as PydanticAI tools
  3. Agent checks reputation before acting
  4. Log result as attestation

Where to put it

examples/pydantic_ai_example.py

Key AVP methods to use

from agentveil import AVPAgent

agent = AVPAgent.create("https://agentveil.dev", name="pydantic_agent")
agent.register(display_name="PydanticAI Agent", capabilities=["analysis"], provider="openai")
agent.get_reputation(did)
agent.can_trust(did, min_tier="basic")
agent.attest(to_did=did, outcome="positive", context="analysis_task")

Prerequisites

pip install agentveil pydantic-ai

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions