Registry / llm-agents / fasta2a

fasta2a

JSON →
library0.6.1pypypi✓ verified 27d ago

Fasta2a (current version 0.6.0) is a Python library that converts an AI Agent into an A2A (Agent-to-Agent) server. It facilitates communication between AI agents by implementing the A2A protocol, allowing agents to expose their capabilities and interact programmatically. The library is relatively new but actively developed, with releases occurring every few months as the protocol specification evolves.

pip install fasta2a
INSTALL
IMPORT
SIG · FASTA2A
F
fasta2a
llm-agentspythonv0.6.1
Install
3.9s avg
Import
852ms
Disk
29MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.6.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.882s · 31.2MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 3.9s · import 0.822s · 31MB
29MB installed
● package 29MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Broker
✓ from fasta2a import Broker
✗ from fasta2a.app import Fasta2aApp
FastA2A
✓ from fasta2a import FastA2A
Worker
✓ from fasta2a import Worker

This quickstart demonstrates how to create a basic Fasta2a application by initializing `Fasta2aApp` and defining an asynchronous message handler using the `@app.handle_message()` decorator. The handler processes `AgentMessage` objects and returns `AgentResponse` objects, optionally including `ToolCall`s. The example also shows how to run the application using `uvicorn`.

import uvicorn from fasta2a.app import Fasta2aApp from fasta2a.schema import AgentMessage, AgentResponse, ToolCall app = Fasta2aApp() @app.handle_message() async def my_agent_handler(message: AgentMessage) -> AgentResponse: """Handles incoming AgentMessage and returns an AgentResponse.""" print(f"Received message: {message.body}") if message.body == "hello": return AgentResponse(body="world") elif message.body == "call_tool": return AgentResponse( body="I am calling a hypothetical tool!", toolCalls=[ ToolCall( name="my_example_tool", arguments={"param1": "value1", "param2": 123} ) ] ) return AgentResponse(body=f"Unknown message: {message.body}") # To run this application, save it as, e.g., `main.py` # and execute from your terminal: # uvicorn main:app --host 0.0.0.0 --port 8000 # Then you can interact with it using an A2A client.
Debug
Known issues
breakingThe A2A protocol version support changes between `fasta2a` releases. For example, `v0.6.0` introduced support for `protocolVersion 0.3.0`. Older versions of `fasta2a` may not be compatible with newer protocol versions, and vice-versa, leading to parsing errors or unexpected agent behavior.
fix
Always check the release notes for the supported A2A protocol version for your `fasta2a` library version. Upgrade `fasta2a` to match the desired protocol version, or ensure your client/agent adheres to the protocol version supported by your `fasta2a` server.
affects: <0.6.0
gotchaThe core A2A schemas (`AgentMessage`, `AgentResponse`, `ToolCall`, `StreamMessageResponse`, etc.) are actively evolving as the protocol matures. Code relying on specific schema fields or structures might require updates with new `fasta2a` releases.
fix
Regularly review the `fasta2a` changelog and schema definitions when upgrading. Be prepared to adapt your agent logic and data models to new schema versions to maintain compatibility.
affects: All versions
gotchaFasta2a applications are ASGI applications and must be run with a compatible ASGI server (e.g., `uvicorn`) to be accessible. Simply running the Python script will define the application object but will not serve it over HTTP.
fix
To run your `fasta2a` application, use the command `uvicorn your_module_name:app --host 0.0.0.0 --port 8000` (replacing `your_module_name` with your script's filename). Do not attempt to run it directly as `python your_module_name.py`.
affects: All versions
Upgrade
Version history
0.6.1latest on PyPI · released May 15, 2026
Audit
Dependencies
fastapirequiredCore web framework for the ASGI application.
uvicornrequiredASGI server for running the application.
pydanticrequiredData validation and settings management.
pydantic-settingsrequiredSettings management for FastAPI applications.
anyiorequiredAsynchronous I/O primitives.
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
fasta2a — pip install fasta2a · libregistry