from meshai import MeshAI
from meshai.integrations.pydantic_ai import track_pydantic_ai
from pydantic_ai import Agent
client = MeshAI(api_key="msh_...", agent_name="my-pydantic-agent")
client.register(framework="pydantic-ai")
# Enable global tracking
track_pydantic_ai(client)
# Run your agents as normal
agent = Agent("openai:gpt-4o", system_prompt="You are a helpful assistant")
# Both async and sync are tracked
result = agent.run_sync("What is AI governance?")
print(result.data)
# Model and tokens tracked automatically