Nutaan ERP AI Agent SDK - Autonomous AI agent for ERPNext/Frappe with 14 built-in tools
Project description
Nutaan ERP AI Agent SDK
Autonomous AI agent for ERPNext/Frappe automation with 14 built-in tools.
Core SDK for autonomous AI agent functionality. This package provides:
- Agent Management: Create and manage AI agents with Google Gemini
- 14 Built-in Tools: Navigate, create documents, fill forms, and more
- LangChain Integration: Built on LangChain for robust agent orchestration
- Intent Engine: Smart clarification for vague requests
- Action Tracking: Automatic session tracking and reporting
- Context Building: Utilities for ERPNext/Frappe context
Installation
From PyPI (Recommended)
pip install nutaan-erp
For Development (Local)
pip install -e /path/to/nutaan-erp/sdk
For Production (Git)
pip install git+https://github.com/tecosys/nutaan-erp.git#subdirectory=sdk
Quick Start
from nutaan_erp import AgentManager, AgentConfig
# Create configuration
config = AgentConfig(
api_key="your-gemini-api-key",
model_name="gemini-2.0-flash-exp",
temperature=0.1,
max_tokens=4000
)
# Create agent manager
manager = AgentManager(config)
# Build context (example for Frappe/ERPNext)
from nutaan_erp.utils import build_frappe_context
context = build_frappe_context(
user="john@example.com",
current_path="/app/sales-order",
roles=["Sales User", "Sales Manager"],
user_full_name="John Doe"
)
# Execute agent
result = manager.execute(
message="Create a new Sales Order for customer ABC Corp",
context=context,
history=[]
)
print(result)
Features
Tools
The SDK includes 14 tools:
navigate- Navigate to doctypes/formscreate_doc- Create new documentsset_field- Set form field valuesclick_button- Click buttons on pageanalyze_screen- Analyze current page statescroll_page- Scroll page up/downadd_table_row- Add rows to child tablesset_table_field- Set child table field valuesget_field_value- Get field valuesselect_option- Select dropdown optionsget_validation_errors- Check validation errorssearch_doctype- Search for records in a DocTypeget_doctype_list- Get list of available recordsvalidate_doctype_exists- Check if a specific record exists
Configuration
config = AgentConfig(
api_key="...", # Required
model_name="...", # Default: gemini-2.0-flash-exp
temperature=0.1, # Default: 0.1
max_tokens=4000, # Default: 4000
max_iterations=10, # Default: 10
timeout=300 # Default: 300 seconds
)
Architecture
nutaan_erp/
├── core/
│ ├── agent.py # AgentManager
│ ├── config.py # AgentConfig
│ └── tools.py # Tool definitions
├── integrations/
│ └── langchain.py # LangChain wrapper
└── utils/
└── context.py # Context building
Requirements
- Python >= 3.8
- langchain >= 0.3.0
- langchain-google-genai >= 2.0.0
- langchain-core >= 0.3.0
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nutaan_erp-1.0.2.tar.gz
(24.3 kB
view details)
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 nutaan_erp-1.0.2.tar.gz.
File metadata
- Download URL: nutaan_erp-1.0.2.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ce78997bc9952fed59eeb1eda589f5bc9f345948b7d7a03f593d370cd1e3458
|
|
| MD5 |
141ef86648d5455ba61d5c5be3459d26
|
|
| BLAKE2b-256 |
202bbf5b8402f53820f9e8cd054c825b89db4f34da1dbf42c1539263926d8248
|
File details
Details for the file nutaan_erp-1.0.2-py3-none-any.whl.
File metadata
- Download URL: nutaan_erp-1.0.2-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e87b71cd4c1bb4ab3668a93801b6cd50d90e940e4fedd979f3bd23890c86267b
|
|
| MD5 |
5860416c30cc47c03ccd0d63382dfa44
|
|
| BLAKE2b-256 |
f97bc5e51b781532769de866f2128e061a82c3a4bb47ba3e43cbf8dbf1799e58
|