Underthesea - Vietnamese Agentic AI Toolkit
Zero-dependency multi-provider AI agent framework with built-in Vietnamese NLP capabilities.
- Source repo
- undertheseanlp/underthesea
- Stars
- ★ 1.8k
- Last updated
- 6d ago underthesea-v9.5.0
- FARS reviewed
- Nov 08, 2026
- License
- Apache-2.0
- Primary language
- Python
- FA score
- 47/100 · Major gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformOpenAI API · Claude API
- Cost
- Free software; you pay for model usage
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- Developers needing to integrate multiple LLM providers (OpenAI, Anthropic, etc.) with easy switching.
- Not a fit if
- Users who need providers other than OpenAI, Azure, Anthropic, or Gemini
- Long-running multi-session users unwilling to manage progress files
- Website
- undertheseanlp.com ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-26latest release underthesea-v9.5.0 (2026-05-17)+0.6 ★/day over 7 days
- Source review
- 47/100 · Major gaps 2 safety controls not found
What does this agent do, and when should you use it?
Underthesea is an open-source Agentic AI toolkit that bundles Vietnamese natural language processing modules. It offers AI agent functionality with no external dependencies, communicating with major LLM providers using only Python's standard library (urllib and json). The toolkit includes an Agent class, multi-session support via Session, and Tool calling. It provides 12 built-in tools like calculator, web search, and file I/O. Agents can be exposed over the A2A protocol with AgentCard and an optional chat UI. Additionally, it includes a full Vietnamese NLP pipeline: word segmentation, POS tagging, NER, sentiment analysis, and more. All agent calls are automatically traced to local files.
This repository implements a Python library for building and running AI agents. It supports configuring multiple providers (OpenAI, Azure OpenAI, Anthropic, Gemini) via environment variables or API keys. The Agent class handles LLM API communication, tool calling, and streaming. The Session class enables long-running agents with context reset and task handoff. Agents can be served over the A2A protocol (JSON-RPC over HTTP+SSE) with an optional web UI. It also provides a suite of Vietnamese NLP functions such as word_tokenize, pos_tag, ner, sentiment, and more, directly usable in Python code.
- Developers needing to integrate multiple LLM providers (OpenAI, Anthropic, etc.) with easy switching.
- Teams building long-running multi-session agents, e.g., research assistants that retain context over time.
- Organizations wanting to expose agents as HTTP services for async requests via the A2A protocol.
- Developers preferring a lightweight agent library with zero external dependencies, using only Python stdlib.
- Researchers and developers working with Vietnamese text, leveraging pre-built NLP functions for segmentation, NER, and sentiment.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Environment variables
OPENAI_API_KEYANTHROPIC_API_KEY- Runtime
- Python 3.10
How do you install or deploy this agent?
Install via pip: pip install underthesea. Supports Python 3.10 to 3.14. For server features, install the extra: pip install 'underthesea[agent-server]' (adds uvicorn, starlette, and httpx).
How do you use this agent?
Set environment variables (e.g., OPENAI_API_KEY or ANTHROPIC_API_KEY) or pass API keys directly. Then create an Agent and call it:
from underthesea.agent import Agent, LLM
agent = Agent(name="assistant", provider=LLM())
agent("Hello!")For streaming, use agent.stream(). To enable tools, define functions and wrap with Tool, passing to Agent. For multi-session, create a Session and run tasks.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
FARS trust-control audit
- confirmation before acting — Turn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
- rollback or recovery path — Back up first, or work on a git branch or snapshot, so its changes can be undone.
What are this agent's strengths and limitations?
- Zero external dependencies, using only Python standard library, reducing install footprint.
- Support for multiple major LLM providers with easy switching.
- Built-in A2A protocol serving for integration with existing systems.
- Integrated Vietnamese NLP capabilities, ideal for Vietnamese-language applications.
- Automatic tracing for debugging and monitoring.
- Only supports the specified providers; does not support others like Cohere.
- A2A server requires additional dependencies (agent-server extra).
- Multi-session requires manual progress file management.
- Advanced features like Langfuse tracing require extra installation.
- Documentation may be sparse; relies on README and NLP.md.
How does this agent compare with similar options?
Compared to Anthropic's harness patterns it provides similar long-running agent features but focuses on multi-provider support and NLP integration.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Underthesea - Vietnamese Agentic AI Toolkit This agent | 47 · Major gaps | Library / SDKFree + model costs | ★ 1.8k | 6d ago | Python | OpenAI API · Claude API |
| Sprix SAGE Router | 68 · Some gaps | CLIFree | ★ 3.6k | 3mo ago | Python | — |
| OpenCrabs Terminal Agent | 62 · Some gaps | CLIFree + model costs | ★ 1k | today | Rust | ChatGPT · Codex · OpenAI API · Claude API |
| Aser | 32 · Major gaps | FrameworkFree + model costs | ★ 471 | 1mo ago | Python | OpenAI API |
How does FollowAgents rate this agent?
Why each dimension lost points
The code provides a tool-call iteration limit, a concurrency switch, and tool-error recovery, giving users some control. However, the README lists shell, Python execution, and file I/O among the default tools; the supplied material shows no permission sandbox or per-call confirmation, so least privilege, confirmation, and external-effect controls are weak. Code writes calls and input/output to local traces by default, with environment-variable options to disable tracing or change its directory, but no redaction or retention policy is shown. The README describes requests to several LLM services and optional Langfuse tracing. The dependency manifest identifies base and optional dependencies, but no security review or lockfile is shown. No tool-operation rollback guidance appears. Repository and author metadata provide some attribution, but publisher identity is unknown under the prompt, so maintainer identity cannot be confirmed.
The Agent has an iteration limit, tool-argument parsing errors, and configurable exception recovery; the CLI reports missing Claude, a missing app directory, and runtime exceptions. The README says the toolkit has been agentic since v9.3.0, while pyproject.toml lists version 9.5.0 and still describes the package as a Vietnamese NLP Toolkit. A CI comment says other Agent tests target an older API and are still being migrated, indicating product-positioning and API migration inconsistencies. The base Agent's standard-library provider claim and the server's listed optional dependencies help explain ordinary installation, but failure cases are not comprehensively documented.
The README is aimed at Python developers and covers several model providers, tool calls, streaming, multi-session work, tracing, and A2A serving. Use cases are reasonably clear. Capability boundaries are thin: default tools include shell, Python execution, and file I/O, but the material does not explain their permissions, isolation, or when to enable them. Agent use is mainly through explicit Python calls or the CLI. The stated Python 3.10–3.14 support, environment-variable setup, and optional ASGI dependencies show some environment fit; the CLI web app also invokes npm to install frontend and backend dependencies.
The README organizes installation, Agent features, architecture, and NLP capabilities, with quick-start examples and instructions for optional server dependencies. It has several Agent examples, but no FAQ or safety guide for default tools is shown. The supplied license is Apache License 2.0. CLI documentation records the chat command rename, but package version, the README's stated Agent starting version, and project description are not fully aligned. No clear Agent changelog or maintenance-responsibility statement is present.
Examples show directly usable string replies, streamed chunks, tool calls, and multi-session workflows; local tracing also records calls. Multi-provider support and combining Vietnamese NLP with tools provide practical value, and the base Agent adds no LLM SDK dependency. However, shell, Python execution, and file tools may require substantial review and operational controls; the material does not quantify costs or explain permission-management and production tradeoffs.
The README gives concrete descriptions of providers, trace location, configuration, and server routes, while the code supports parts of the tracing, parallel-tool, and error-handling claims. CI shows tests for the server adapter but explicitly says other Agent tests still target an older API and are being migrated, so broader feature claims have only partial corroboration in the supplied sources. Documentation generally distinguishes examples from feature descriptions, but performance, reliability, and security claims lack supporting evidence.
- Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
- Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
- Default tools include shell, Python execution, and file I/O; inspect their implementations and access to data and system resources before enabling them.
- Agent calls are written to local traces by default, and inputs or outputs may contain sensitive content; account for this behavior when assessing data-handling requirements.
- The README, package metadata, and CI comments show version-positioning and API-migration inconsistencies. This assessment did not execute the code or tests.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
underthesea-v9.5.0 v9.5.0 — A2A Agent Server
Release notes excerpt
Highlights - A2A-compatible HTTP server adapter (underthesea.agent.server) — wraps any Agent so it speaks JSON-RPC 2.0 message/stream over HTTP with SSE streaming, plus a discoverable AgentCard and an optional bundled chat UI ([#1016](https://github.com/undertheseanlp/underthesea/pull/1016)) - make_app(agent, path=...) returns a raw ASGI callable — no web framework dep at the library level; plug into uvicorn / hypercorn / daphne / granian - serve(agent, ui=True) — one-line uvicorn entrypoint with bundled chat UI at {path}/ui …View on GitHub ↗ -
underthesea-v9.4.0 v9.4.0 — Agent Tracing
Release notes excerpt
What's New Agent Tracing ([#1003](https://github.com/undertheseanlp/underthesea/pull/1003)) Every agent call is now automatically traced — like Claude Code. - LocalTracer: auto-saves JSON traces to ~/.underthesea/traces/ with datetime-prefixed filenames, console output with timing and token usage - LangfuseTracer: sends traces to Langfuse v4 with full hierarchy (agent → generation → tool), token usage, and cost tracking - @trace decorator: wrap any function to create traces; nested decorated functions become child spans automatically via contextvars …View on GitHub ↗ -
v9.3.0 underthesea v9.3.0
Release notes excerpt
Highlights Agentic AI — underthesea now ships a multi-provider agent harness with zero external LLM SDK dependencies. Agent harness (#988) - Multi-provider support: OpenAI, Azure OpenAI, Anthropic, Gemini — each provider is a standalone class using raw HTTP (urllib + json) - Zero external dependencies: no openai, anthropic, or google-genai packages required - LLM auto-detect: automatically selects provider from env vars (Azure > OpenAI > Anthropic > Gemini) - Streaming: Agent.stream() + chat_stream() across all providers via SSE …View on GitHub ↗
FAQ
Does it support Azure OpenAI?
How to enable streaming?
Can I use it without network?
How to add custom tools?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.