fast_a2a_app 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,61 @@
1
+ """
2
+ fast_a2a_app — Drop-in A2A server and chat UI for any FastAPI application.
3
+
4
+ fast_a2a_app is framework-agnostic: it works with pydantic-ai, LangChain,
5
+ LlamaIndex, plain Anthropic/OpenAI API calls, or any custom logic that
6
+ can expose an ``async (str) -> str`` function or an async generator.
7
+
8
+ Typical usage::
9
+
10
+ from fastapi import FastAPI
11
+ from fast_a2a_app import a2a_ui, build_a2a_app, build_invoke, build_stream_invoke
12
+
13
+ app = FastAPI()
14
+
15
+ app.mount("/a2a", build_a2a_app(
16
+ invoke=build_invoke(my_agent_fn),
17
+ stream_invoke=build_stream_invoke(my_streaming_agent_fn),
18
+ agent_name="My Agent",
19
+ agent_description="Does cool things",
20
+ agent_version="1.0.0",
21
+ agent_url="http://localhost:8000/a2a/",
22
+ ))
23
+
24
+ app.mount("/", a2a_ui)
25
+
26
+ Call ``report_progress("step 2/5…")`` from anywhere inside your agent
27
+ (including tools) to push live status updates to the chat UI.
28
+ """
29
+ from .server import (
30
+ A2ATaskStore,
31
+ ConfigurableAgentExecutor,
32
+ ContextAwareRequestContextBuilder,
33
+ RedisTaskStore,
34
+ build_a2a_app,
35
+ build_invoke,
36
+ build_stream_invoke,
37
+ build_conversation_prefix,
38
+ ensure_context_marker,
39
+ report_progress,
40
+ )
41
+ from .ui import a2a_ui
42
+
43
+ __version__ = "0.1.0"
44
+
45
+ __all__ = [
46
+ # Server
47
+ "build_a2a_app",
48
+ "build_invoke",
49
+ "build_stream_invoke",
50
+ "build_conversation_prefix",
51
+ "ensure_context_marker",
52
+ "ConfigurableAgentExecutor",
53
+ "ContextAwareRequestContextBuilder",
54
+ "A2ATaskStore",
55
+ "RedisTaskStore",
56
+ "report_progress",
57
+ # UI
58
+ "a2a_ui",
59
+ # Meta
60
+ "__version__",
61
+ ]
fast_a2a_app/py.typed ADDED
File without changes
@@ -0,0 +1,29 @@
1
+ """fast_a2a_app.server — A2A protocol adapter."""
2
+ from .route import (
3
+ build_a2a_app,
4
+ build_invoke,
5
+ build_stream_invoke,
6
+ build_conversation_prefix,
7
+ ensure_context_marker,
8
+ ConfigurableAgentExecutor,
9
+ ContextAwareRequestContextBuilder,
10
+ )
11
+ from .task_store import A2ATaskStore, RedisTaskStore
12
+ from .utils import report_progress
13
+
14
+ __all__ = [
15
+ # App factory
16
+ "build_a2a_app",
17
+ # Invoke wrappers
18
+ "build_invoke",
19
+ "build_stream_invoke",
20
+ # Prompt helpers
21
+ "build_conversation_prefix",
22
+ "ensure_context_marker",
23
+ # Low-level
24
+ "ConfigurableAgentExecutor",
25
+ "ContextAwareRequestContextBuilder",
26
+ "A2ATaskStore",
27
+ "RedisTaskStore",
28
+ "report_progress",
29
+ ]