Skip to content
/ NexA4A Public

Nex Agent for Agent is a meta-agent system that automatically creates specialized AI agents based on natural language requirements.

License

Notifications You must be signed in to change notification settings

nex-agi/NexA4A

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Agent4Agent ๐Ÿค–โœจ

English | ไธญๆ–‡

A sophisticated meta-agent system that creates specialized AI agents automatically

Agent4Agent is an intelligent meta-agent built on the nexau framework that can analyze user requirements and automatically create specialized sub-agents and multi-agent frameworks with tailored capabilities, tools, and prompts.

Python 3.12+ UV Package Manager nexau Framework

๐ŸŽฏ What is Agent4Agent?

Agent4Agent is a meta-agent system that automatically creates specialized AI agents based on natural language requirements. Instead of manually configuring agents, you simply describe what you need, and Agent4Agent intelligently:

  • ๐Ÿง  Generates intelligent system prompts tailored to specific tasks
  • ๐Ÿ”ง Selects appropriate tools from 15+ built-in tools
  • โš™๏ธ Creates custom tools with complete implementation and tests when needed
  • ๐Ÿ“ฆ Packages complete agents ready for immediate use
  • ๐Ÿ—ƒ๏ธ Manages agent lifecycle with persistent storage and registry

๐Ÿ“‹ Current Capabilities

โœ… Level 1: Intelligent Prompt Generation

  • Agent Creatation: Create Agents follow nexau standard.
  • LLM-Powered Prompt Creation: Uses LLM to generate comprehensive system prompts

โœ… Level 2: Intelligent Tool Creation & Selection

  • Smart Tool Selection: LLM-powered analysis to choose optimal tools from 15+ built-in options
  • Custom Tool Generation: Automatically creates new tools with complete Python implementation
  • Comprehensive Testing: All custom tools include unit tests and integration validation
  • Tool Ecosystem: Seamless integration between built-in and generated tools

โœ… Level 3: Data Collection & Processing

  • Dataset Discovery & Download: Automatically search and download datasets from Hugging Face
  • Format Standardization: Convert various dataset formats into standardized SFT training format
  • Data Generation by Distillation: Generate high-quality training responses using teacher models

โ–ถ๏ธ ...

๐Ÿ—๏ธ Architecture

Project Structure

agent4agent/
โ”œโ”€โ”€ ๐Ÿ“„ agent4agent.py              # Main CLI interface
โ”œโ”€โ”€ ๐Ÿ“ src/                        # Core system
โ”‚   โ”œโ”€โ”€ ๐Ÿ”ง meta_agent_config.yaml  # MetaAgent configuration
โ”‚   โ”œโ”€โ”€ ๐Ÿค– subagents/              # Sub-agent systems
โ”‚   โ”‚   โ”œโ”€โ”€ AgentBuilder/          # The core agent creation system
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ config.yaml        # AgentBuilder configuration
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ tools/             # Specialized agent creation tools
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ SubAgentPrompter     # LLM-powered prompt generation
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ ToolSelector         # Intelligent tool selection
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ ToolGenerator        # Custom tool creation
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ SubAgentManager      # Agent lifecycle management
โ”‚   โ””โ”€โ”€ ๐Ÿ“ฆ created_subagents/      # Generated agents storage
โ”‚       โ”œโ”€โ”€ registry.yaml          # Agent registry database
โ”‚       โ””โ”€โ”€ [agent_name]/          # Individual agent directories
โ”‚           โ”œโ”€โ”€ config.yaml        # Agent configuration
โ”‚           โ”œโ”€โ”€ test_agent.py      # Agent validation tests
โ”‚           โ””โ”€โ”€ tools/             # Custom tools (if any)
โ”œโ”€โ”€ โš™๏ธ subagent_creator.py         # Agent creation orchestrator
โ”œโ”€โ”€ ๐Ÿƒ subagent_runner.py          # Agent execution system
โ””โ”€โ”€ ๐Ÿ“š nexau/                    # nexau framework (git submodule)

๐Ÿ› ๏ธ Installation & Setup

Prerequisites

  • Python 3.12+ (required for modern syntax features)
  • UV Package Manager (modern Python package management)
  • Git (for cloning with submodules)

1. Clone Repository with Submodules

git clone --recurse-submodules https://github.com/nex-agi/NexA4A.git
cd NexA4A

# If already cloned without submodules:
git submodule init && git submodule update

2. Install Dependencies

# Install all dependencies including nexau framework
uv sync

3. Environment Configuration

Copy the example environment file and configure your settings:

cp .env.example .env

4. Verify Installation

uv run agent4agent.py

๐ŸŽฎ Usage Guide

Interactive Mode (Recommended)

Start Agent4Agent in interactive mode for the best user experience:

uv run agent4agent.py interactive

This launches a beautiful, menu-driven interface with multi-turn conversation support:

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                     ๐Ÿค– Agent4Agent CLI                      โ”‚
โ”‚                                                             โ”‚
โ”‚            Create and Manage Specialized Sub-Agents         โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Welcome to the Agent4Agent Interactive Mode!
This mode allows you to create and use specialized sub-agents interactively.
Use arrow keys to edit, Ctrl+C to exit gracefully.

MAIN MENU
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
1. ๐Ÿ”ง  Create a new sub-agent
2. ๐Ÿš€  Use an existing sub-agent
3. ๐Ÿ“‹  List all sub-agents
4. ๐Ÿ—‘๏ธ  Delete a sub-agent
5. ๐Ÿ—๏ธ  Build a multi-agent framework
6. ๐ŸŽฏ  Use an existing framework
7. ๐Ÿ“š  List all frameworks
8. ๐Ÿ”ฅ  Delete a framework
9. ๐Ÿšช  Exit
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Select an option (1-9) [1]:

๐Ÿ’ก Example Use Cases

All examples use Interactive Mode with multi-turn conversations:

๐Ÿค— Creating a Hugging Face Model Downloader

uv run agent4agent.py interactive

โ†’ Select "1. ๐Ÿ”ง Create a new sub-agent"
โ†’ Agent name: hf_model_downloader
โ†’ Agent Requirements: Help me create a huggingface model downloader agent. Its function is to find suitable models on huggingface based on user requirements and download them locally. You can use huggingface's API, the API token is in .env's 'HF_READ_KEY'.

๐Ÿš€ Using the Created Agent

โ†’ Select "2. ๐Ÿš€ Use an existing sub-agent"
โ†’ Choose: "1. hf_model_downloader"
โ†’ Task Description: Help me download a qwen 0.5b model to local_data/hf_models

๐Ÿ’ป Command Usage

1. Agent Commands

For power users who prefer command-line operations (all commands now support multi-turn interactions):

๐Ÿ”จ Create Specialized Agents

uv run agent4agent.py create \
  --requirements "..." \
  --name "..."

๐Ÿš€ Use Created Agents

uv run agent4agent.py use \
  --agent data_analyst \
  --query "..."

๐Ÿ“‹ Manage Agents

# List all created agents
uv run agent4agent.py list

# Delete an agent (registry only)
uv run agent4agent.py delete --agent data_analyst

# Delete an agent completely (registry + files)
uv run agent4agent.py delete --agent data_analyst --complete

2. Session Commands

Manage your multi-turn conversation sessions:

๐Ÿ“š Session Management

# List all saved sessions
uv run agent4agent.py session list

# Resume a previous conversation
uv run agent4agent.py session resume session_abc12345

# Delete a specific session
uv run agent4agent.py session delete session_abc12345

# Clean up old sessions (older than 30 days)
uv run agent4agent.py session clean --days 30

โš™๏ธ Advanced Configuration

LLM Configuration Options

# Custom LLM settings in agent configs
llm_config:
  model: "${LLM_MODEL}"
  base_url: "${LLM_BASE_URL}"
  api_key: "${LLM_API_KEY}"
  temperature: 0.6
  max_tokens: 16000

Dynamic Context Injection

Agents automatically receive runtime context:

**๐Ÿ“ RUNTIME CONTEXT**:
๐Ÿ  PROJECT ROOT: /path/to/agent4agent
๐Ÿ“… CURRENT DATE: 2025-08-12

About

Nex Agent for Agent is a meta-agent system that automatically creates specialized AI agents based on natural language requirements.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages