crewai - 💡(How to fix) Fix [FEATURE]Add native FrappeTool for ERPNext and Frappe Framework integration [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
crewAIInc/crewAI#4657Fetched 2026-04-08 00:40:52
View on GitHub
Comments
2
Participants
2
Timeline
10
Reactions
0
Timeline (top)
mentioned ×4subscribed ×3commented ×2labeled ×1
RAW_BUFFERClick to expand / collapse

Feature Area

Integration with external tools

Is your feature request related to a an existing bug? Please link it here.

NA

Describe the solution you'd like

I would like to see a native @frappe added to the crewai-tools library. This tool will allow agents to interact with any site running on the Frappe Framework or ERPNext via its REST API.

The tool should support:

get_doc: Fetching complete details of a specific DocType record.

get_list: Searching for records using standard Frappe filters.

create_doc / update_doc: Enabling agents to log new data or update existing statuses in the ERP.

execute_method: Triggering whitelisted server-side functions for complex business logic.

Proposed Parameters:

site_url: The base URL of the site.

api_key: For secure authentication.

api_secret: For secure authentication.

This integration will enable autonomous agents to manage real-world enterprise workflows, such as inventory updates, HR tasks, or specialised industry apps

Describe alternatives you've considered

No response

Additional context

No response

Willingness to Contribute

Yes, I'd be happy to submit a pull request

extent analysis

Fix Plan

To integrate the Frappe Framework or ERPNext with the crewai-tools library, we will create a native @frappe tool. Here are the steps:

  • Create a new JavaScript class FrappeTool that will handle the interactions with the Frappe Framework or ERPNext REST API.
  • Implement the following methods:
    • getDoc: Fetches complete details of a specific DocType record.
    • getList: Searches for records using standard Frappe filters.
    • createDoc / updateDoc: Enables agents to log new data or update existing statuses in the ERP.
    • executeMethod: Triggers whitelisted server-side functions for complex business logic.

Example Code

class FrappeTool {
  constructor(siteUrl, apiKey, apiSecret) {
    this.siteUrl = siteUrl;
    this.apiKey = apiKey;
    this.apiSecret = apiSecret;
  }

  async getDoc(doctype, name) {
    const url = `${this.siteUrl}/api/resource/${doctype}/${name}`;
    const auth = `key: ${this.apiKey}, secret: ${this.apiSecret}`;
    const response = await fetch(url, {
      method: 'GET',
      headers: {
        'Authorization': auth
      }
    });
    return await response.json();
  }

  async getList(doctype, filters) {
    const url = `${this.siteUrl}/api/resource/${doctype}`;
    const auth = `key: ${this.apiKey}, secret: ${this.apiSecret}`;
    const response = await fetch(url, {
      method: 'GET',
      headers: {
        'Authorization': auth
      },
      params: filters
    });
    return await response.json();
  }

  async createDoc(doctype, data) {
    const url = `${this.siteUrl}/api/resource/${doctype}`;
    const auth = `key: ${this.apiKey}, secret: ${this.apiSecret}`;
    const response = await fetch(url, {
      method: 'POST',
      headers: {
        'Authorization': auth,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify(data)
    });
    return await response.json();
  }

  async updateDoc(doctype, name, data) {
    const url = `${this.siteUrl}/api/resource/${doctype}/${name}`;
    const auth = `key: ${this.apiKey}, secret: ${this.apiSecret}`;
    const response = await fetch(url, {
      method: 'PUT',
      headers: {
        'Authorization': auth,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify(data)
    });
    return await response.json();
  }

  async executeMethod(method, data) {
    const url = `${this.siteUrl}/api/method/${method}`;
    const auth = `key: ${this.apiKey}, secret: ${this.apiSecret}`;
    const

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING