Underthesea is an open-source Agentic AI toolkit with Vietnamese NLP capabilities and multi-provider agent support. It exposes an A2A server, streaming, and tool-calling features via Python modules.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
Underthesea is an Open-source Agentic AI Toolkit that provides multi-provider AI Agent support and built-in Vietnamese NLP capabilities. It offers modules for agent management, tools, tracing, and an A2A server for JSON-RPC over HTTP+SSE.
How it works
The toolkit includes an Agent class that can be instantiated with a provider (OpenAI, AzureOpenAI, Anthropic, Gemini or LLM-detected). It supports streaming responses, tool invocation, and multi-session handling. It also includes a server component that can expose an Agent over the A2A protocol via a raw ASGI app, with optional bundled UI. Tracing facilities log agent calls locally or via Langfuse.
Getting started
$ pip install underthesea
from underthesea.agent import Agent, LLM
agent = Agent(name="assistant", provider=LLM())
agent("Hello!")
Providers examples:
from underthesea.agent import Agent, OpenAI, AzureOpenAI, Anthropic, Gemini, LLM
# OpenAI
agent = Agent(name="bot", provider=OpenAI(api_key="sk-..."))
# Azure OpenAI
agent = Agent(name="bot", provider=AzureOpenAI(
api_key="...",
endpoint="https://my.openai.azure.com",
deployment="gpt-4",
))
Streaming:
for chunk in agent.stream("Explain what an AI agent is"):
print(chunk, end="", flush=True)
Tool calling:
from underthesea.agent import Agent, Tool, OpenAI
def get_weather(location: str) -> dict:
return {"location": location, "temp": 25, "condition": "sunny"}
agent = Agent(
name="assistant",
provider=OpenAI(),
tools=[Tool(get_weather)],
instruction="You are a helpful assistant.",
)
agent("What's the weather in Hanoi?")
Default tools and multi-session examples are also provided in the README.
Serving (A2A):
$ pip install 'underthesea[agent-server]'
from underthesea.agent import Agent, Tool
from underthesea.agent.server import serve
def add(a: int, b: int) -> int:
return a + b
agent = Agent(name="MathAgent", instruction="...", tools=[Tool(add)])
serve(agent, port=8000, path="/a2a/math", ui=True)
Application endpoints include UI and Agent Card discovery URLs.
Getting started (continued)
If you need a custom ASGI app:
from underthesea.agent.server import make_app
app = make_app(agent, path="/a2a/math")
Recent releases
- underthesea-v9.5.0 v9.5.0 — A2A Agent Server (2026-05-17): A2A-compatible HTTP server adapter wraps any Agent to speak JSON-RPC 2.0 message/stream over HTTP with SSE streaming, plus a discoverable AgentCard.
- underthesea-v9.3.0 v9.3.0 (2026-04-11): Agent harness with multi-provider support and zero external LLM SDK dependencies.
- underthesea-v9.4.0 v9.4.0 (2026-04-11): Agent Tracing with LocalTracer auto-saving JSON traces.
- underthesea-core-v3.3.0 (2026-02-07): Adds pure Rust FastText inference for supervised text classification and model format support (.bin, .ftz).
Traction
GitHub stars: 1800 Forks: 310 Open issues: 46
Behind the repo
Not included in the provided facts.
Caveats
License: Apache-2.0. Created: 2017-03-01. Last push: 2026-08-04. Language: Python. Hosted under the undertheseanlp organization with multiple modules and optional extras (agent-server).






