A sophisticated AI agent toolkit supporting multiple AI providers with tool calling capabilities, enterprise state management, HITL, Graph routing, LangChain support, and structured outputs.
Project description
nixagent
A generic, multipurpose nixagent library in Python. This framework is completely agnostic to specific use cases and architectures, serving as a robust foundation for building autonomous, collaborative AI agents that can manage their own context, interface with each other, and securely use external tools.
๐ Quick Start
Installation
pip install -r requirements.txt
Command Line Usage
First, set up your environment configuration by copying .env.example to .env and adding your API keys.
# Ask a question directly
python app.py "What files are in the current directory?"
# Interactive mode
python app.py
# With custom settings
python app.py "Analyze the code structure" --no-save
Python Library Usage
from nixagent import Agent
# Initialize the core agent
agent = Agent(
name="MainAgent",
system_prompt="You are a highly capable AI assistant that uses available tools to accomplish goals."
)
result = agent.run(user_prompt="List all Python files in the project")
print(result)
โจ Features
- ๐ Standardized API Interface: Uses pure
requestsfollowing the OpenAI native JSON structure. Compatible with OpenAI, Vertex, Local LLMs (via Ollama/vLLM), Groq, and more. - ๐ค Autonomous Agents: Agents maintain independent conversation histories and automatically delegate sub-tasks when needed.
- ๐ Model Context Protocol (MCP): Dynamic tool extension via MCP Servers via
.mcp.json. - ๐ ๏ธ Rich Built-In Tools: Deep system-level tools covering regex-based file searching, exact content mapping, disk manipulation, and secure subprocess execution.
- ๐ฃ๏ธ Inter-Agent Collaboration: Support for multiple sub-agents operating concurrently under the same framework via
.register_collaborator(agent).
๐ฆ Project Structure
framework/
โโโ app.py # Main CLI application
โโโ nixagent/ # Core Framework Mechanics
โ โโโ __init__.py # Library exports
โ โโโ agent.py # Core contextual autonomous Agent
โ โโโ llm.py # Central HTTP-based LLM orchestration
โ โโโ logger.py # Central system execution logger
โ โโโ mcp.py # Model Context Protocol definition and bindings
โ โโโ providers/ # LLM Vendor specific HTTP adapters
โ โ โโโ openai.py
โ โ โโโ anthropic.py
โ โ โโโ gemini.py
โ โ โโโ vertex.py
โ โโโ tools/ # Default Native Tools
โ โโโ __init__.py # Tool bindings & descriptions
โ โโโ cmd.py # Subprocess shell extensions
โ โโโ fs.py # File system native operations
โโโ mcp.json # Model Context Protocol Server mapping
โโโ docs/ # Additional Documentation
โโโ requirements.txt # Python dependencies
โโโ .env # Operational mapping variables
โโโ README.md # This file
โ๏ธ Configuration
Create a .env file in your project root:
# LLM Provider (openai, anthropic, gemini, or vertex)
PROVIDER=openai
# OpenAI Configuration
OPENAI_API_KEY=your_api_key_here
OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_MODEL=gpt-4o
# Anthropic Configuration
ANTHROPIC_API_KEY=your_anthropic_api_key_here
ANTHROPIC_BASE_URL=https://api.anthropic.com/v1
ANTHROPIC_MODEL=claude-3-opus-20240229
# Gemini Configuration
GEMINI_API_KEY=your_gemini_api_key_here
GEMINI_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai
GEMINI_MODEL=gemini-2.5-flash
# Vertex AI Configuration
VERTEX_API_KEY=your_vertex_api_key_here
VERTEX_BASE_URL=https://aiplatform.googleapis.com/v1
VERTEX_MODEL=gemini-2.5-flash-lite
# Tool and Processing Configuration
MAX_ITERATIONS=25
# Logging Configuration
LOG_LEVEL=INFO
LOG_FILE=agent.log # (Optional) Route all agent tool execution traces to this file instead of stdout
๐ Using MCP Servers
Add server definitions to your mcp.json file in the root directory:
{
"mcpServers": {
"sqlite": {
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "./database.db"],
"active": true
}
}
}
The framework's MCPManager automatically bootstraps all active MCP servers, parses their schemas, and loads their tools natively alongside standard tools upon Agent initialization.
๐ค Collaborative Agents
Agents can securely establish communication networks.
from nixagent import Agent
research_agent = Agent("Researcher", "You perform file system research.")
writer_agent = Agent("Writer", "You answer questions accurately.")
writer_agent.register_collaborator(research_agent)
writer_agent.run("Ask the Researcher to find all text files and read them to me.")
๐ค AI Skill
nixagent is available as an installable AI coding agent skill โ giving your AI assistant full knowledge of the framework, its API, and usage patterns.
Install the Skill
npx skills add technicalheist/nixagent
This installs the skill into your project's agent directories (Cursor, Copilot, Cline, Antigravity, and more) so your AI assistant can immediately understand and use nixagent without extra explanation.
What's Included
The skill (skills/nixagent/SKILL.md) contains:
- Full installation & environment setup guide
- Documentation for all 7 core features
- Provider-specific usage (OpenAI, Anthropic, Gemini, Vertex)
- Code reference examples in
skills/nixagent/examples/
Find the Skill
| GitHub | technicalheist/nixagent โบ skills/nixagent |
| Skill Registry | skills.sh |
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nixagent-1.21.tar.gz.
File metadata
- Download URL: nixagent-1.21.tar.gz
- Upload date:
- Size: 36.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
376a78447aecca25425d04621d7811928a615878670cbf41dd11c6356f235bc0
|
|
| MD5 |
4443fa4ff59abc2b129d914f9aa15a0f
|
|
| BLAKE2b-256 |
4ad6b3092f4d9a2ab07dd3ebeea39abaf4db9534b32bf8e24ac04da16a689756
|
File details
Details for the file nixagent-1.21-py3-none-any.whl.
File metadata
- Download URL: nixagent-1.21-py3-none-any.whl
- Upload date:
- Size: 40.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f63886a0a963da2a416a10d1c912576c3d9b113f66fd27849d3c347811ea8562
|
|
| MD5 |
62c5ae26291cb934ca11e2b85aec0cef
|
|
| BLAKE2b-256 |
c155e314be9a497740a3d474472be661f4219e5ab6b6bd791a14495986bae083
|