A general-purpose Agent framework centered on strict type safety and a modular tool system, supporting YAML declarative configuration, multi-Agent collaboration, and external tool pause/resume mechanisms.
NexAU (Agent Universe) is a general-purpose Agent framework developed by the nex-agi organization, written in Python (3.12+ required) under the Apache-2.0 license. The project is distinguished by its strict type safety culture (mypy + pyright dual checking, zero tolerance for Any and type: ignore) and modular architecture.
The core design revolves around the tool system: tools declare schemas via YAML and bind to Python implementations through the binding parameter, achieving decoupling of definition and implementation. Built-in tools include file operations, web search (Serper), shell execution, directory browsing, and todo management, with MCP protocol support for connecting external services. A unique external tool mechanism (kind: external) allows the Agent loop to pause and return pending calls to the caller for execution before resuming, enabling external systems like IDE plugins to drive Agent workflows.
The Agent architecture supports main-sub Agent mode and Agent Team multi-Agent collaboration. Agents can be defined via pure Python API or YAML declarative configuration, with the latter launchable via a single CLI command. The middleware/Hooks pipeline supports intercepting and modifying Agent behavior (preprocessing, caching, logging, Provider switching). System prompts support Jinja2 template rendering, and the Skills system is compatible with Claude Skills format for dynamic context injection. For observability, a built-in Langfuse Tracer adapter is provided. Session management (experimental) offers pluggable storage backends including SQL, JSONL, Memory, and Remote. The transport system (experimental) implements HTTP/SSE and stdio.
The project follows an RFC-driven development process, currently at v0.4.1 (12 releases, 413 commits). Typical use cases include code generation Agents, IDE plugin integration, and multi-Agent team collaboration.
Architecture Overview#
nexau/
├── archs/
│ ├── config/ # Configuration module
│ ├── llm/ # LLM aggregators (event streams, Providers)
│ ├── main_sub/ # Agent system (containers, executors, middleware)
│ ├── sandbox/ # Sandbox execution
│ ├── session/ # Session management (ORM, repositories, history persistence)
│ ├── tool/ # Tool system (definition, execution, binding)
│ │ └── builtin/ # Built-in tools
│ ├── tracer/ # Tracing system
│ │ └── adapters/langfuse/ # Langfuse adapter
│ └── transports/ # Transport system
├── cli/ # CLI tools
├── core/ # Core module
└── __init__.py # Exports Agent, AgentConfig, etc.
Installation & Quick Start#
# Install from GitHub Release
pip install git+ssh://git@github.com/nex-agi/NexAU.git@v0.4.1
# Install from source
git clone git@github.com:nex-agi/NexAU.git
cd NexAU
pip install uv
uv sync
After configuring a .env file:
dotenv run uv run examples/code_agent/start.py
# Or use CLI
./run-agent examples/code_agent/code_agent.yaml
Python API Example#
from nexau import Agent, AgentConfig, LLMConfig, Skill, Tool
agent_config = AgentConfig(
name="my_agent",
max_context_tokens=100000,
system_prompt="path/to/prompt.md",
system_prompt_type="jinja",
tool_call_mode="structured",
llm_config=LLMConfig(
temperature=0.7,
max_tokens=4096,
model="your-model",
base_url="your-base-url",
api_key="your-api-key",
api_type="openai_chat_completion",
),
tools=tools,
skills=skills,
middlewares=[...],
tracers=[...],
)
agent = Agent(config=agent_config)
agent.run("your task", context={...})
Pending Confirmations#
- Full LLM Provider list (known: OpenAI-compatible API and Claude)
- MCP integration implementation details
- Session storage backend database support (specific DB types for SQL backend)
- WebSocket/gRPC transport current implementation status
- Sandbox execution implementation specifics
- Web search backend replaceability (currently only Serper)