Meko for Pydantic AI

Meko gives your Pydantic AI agents memory. What one agent learns is available to every other one that uses your datapack. The framework’s built-in MCP client is the integration.

Over MCP, Meko provides Pydantic AI with:

Agent-scoped memory

What your agent learns persists beyond the session and is readable via every AI tool you connect to.

A shared knowledge base

Documents and promoted conclusions are searchable by all agents and teammates with access to the datapack.

A trace of every read and write

Each conversation is stored with its reasoning, so you can see what an agent did and why.

Your Pydantic MCP client is the integration point

The built-in client connects directly, so your dependency list stays as it is.

Operations covering memory, conversations, knowledge base, datapacks, artifacts, and observability are available for you. Your agent can request them mid-reasoning, and your code calls the same endpoint directly when an operation must happen every time.

How Meko Benefits Pydantic AI

Add memory with zero new dependencies

MCPToolset is built into the framework. It takes Meko’s URL and your API key header and plugs straight into Agent(toolsets=[…]).

Use one connection for two jobs

The same MCP connection backs the deterministic steps (search before reasoning, log and remember after) and serves as a live toolset that the agent can reach mid-reasoning.

Save important steps and conclusions

Saving a memory is an explicit call, stored with its reasoning. Your code decides what persists.

Continue context with other agents

The datapack a pydantic-ai agent writes to is the same one that Claude Code, Cursor, or a LangGraph app reads from. Switching frameworks keeps everything your agents know.

Connecting Meko in Pydantic AI

1. Install the framework: pip install pydantic-ai

2. Register Meko as a toolset:

import asyncio
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPToolset

meko = MCPToolset(
    "https://mcp.mekodata.ai/mcp",
    headers={
        "Authorization": "Bearer <your-api-key>",
        "User-Agent": "meko-pydantic-ai/1.0",
    },
)

agent = Agent("anthropic:claude-opus-5", toolsets=[meko])

async def main():
    async with agent:
        result = await agent.run("What did we decide about the migration?")
        print(result.output)

asyncio.run(main())

3. Run the agent. All of Meko’s tools are available to it, and your code can call the same endpoint directly for guaranteed recall and logging.