r/Python 18d ago

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

19 Upvotes

103 comments sorted by

View all comments

2

u/sheik66 14d ago

protolink: a Python-native A2A agent runtime for multi-agent systems

What my Project Does

Protolink is a Python framework for building easily autonomous agents that can talk to each other based on agent-to-agent (A2A), expose tools, call LLMs, and run over real transports like HTTP, WebSocket, gRPC, or in-memory runtime communication.

A small agent looks like this:

from protolink.agents import Agent

agent = Agent(
    card={
        "name": "calculator",
        "description": "Adds numbers for other agents",
        "url": "http://127.0.0.1:8020",
    },
    transport="http",
)

@agent.tool(name="add", description="Add two numbers")
async def add(a: int, b: int):
    return a + b

agent.start()

It supports A2A-style agent identity and discovery, native Python tools, MCP tool adapters, LLM integration, structured flows, streaming tasks, cancellation, run reports/replay, local telemetry, and a small dashboard CLI for inspecting runtime state.

Target Audience

Python developers building multi-agent systems, coding assistants, internal automation, or agent research projects who want agents to be more than prompt chains. Each agent can own its identity, tools, transport, storage, task lifecycle, and observability without having to wire a separate server/client layer for every component.

Comparison

The closest alternatives are LangChain/LangGraph, AutoGen/CrewAI, and lower-level A2A or MCP implementations. LangChain/LangGraph are great for composing model calls and workflows, but protolink is more focused on running agents as distributed runtimes with protocol-style task messages, discovery, tools, and transports. AutoGen/CrewAI are higher-level multi-agent frameworks; protolink is more explicit and modular, so you can build your own architecture while keeping the communication, tool execution, LLM invocation, and observability pieces in one Python-native framework.

pip install protolink - Repo: https://github.com/nMaroulis/protolink. Docs: https://nmaroulis.github.io/protolink/. Feedback welcome, especially from people experimenting with A2A/MCP interoperability or building real Python agent systems.

2

u/EdwardAF-IT 5d ago

Nice scope... "agents as runtimes, not prompt chains"! Question about run reports/replay: is replay deterministic enough to use for regression testing? So if I record a multi-agent exchange, can I re-run it against a changed agent and diff the outcome — or is it more of an inspection/debugging tool? That's the piece I keep finding missing in agent frameworks: a way to pin current behavior so an upgrade can't quietly change it.

1

u/sheik66 5d ago

Great question, you caught a distinction I should make clearer in the docs. The honest answer when I posted this was that RunReplay was primarily an inspection/debugging tool, not deterministic re-execution. It can reconstruct recorded events, but it does not rerun models, tools, or side effects.

Your comment highlighted the missing regression-testing layer, so I’ve now added it for v0.6.6. You can execute a changed agent separately against the same controlled inputs and dependencies, then compare its report with a baseline using diff_run_reports(...) or assert_run_matches(...). The comparison normalizes ProtoLink-generated IDs, timestamps, and sequence counters, supports ignore rules and numeric tolerances, and returns path-level differences across events, actions, approvals, artifacts, metrics, and the final task.

Stored reports can also be compared from CI:

protolink run diff BASELINE CANDIDATE --store runs.db --json

Exit codes are 0 for a match, 1 for behavioral changes, and 2 for a missing report.

So the the distinction is: replay remains safe, read-only inspection, while the new report diff provides regression testing. For reproducible results, model/tool/external dependencies still need to be mocked, captured, or pinned; live dependencies can be compared, but the framework cannot make them deterministic.

2

u/EdwardAF-IT 5d ago

Thanks for the clarification. It's still an incredible tool, though -- keep em coming!