# Error adding and searching short\_term and entities memory

**URL:** <https://community.crewai.com/t/error-adding-and-searching-short-term-and-entities-memory/2408>\
**Category:** CrewAI Community Support\
**Tags:** crewai, memory\
**Created:** [January 2, 2025, 1:49pm UTC](https://community.crewai.com/t/error-adding-and-searching-short-term-and-entities-memory/2408 "2025-01-02T13:49:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Surakshith](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@Surakshith](https://community.crewai.com/u/Surakshith)\
**Post date:** [January 2, 2025, 1:49pm UTC](https://community.crewai.com/t/error-adding-and-searching-short-term-and-entities-memory/2408/1 "2025-01-02T13:49:20Z")

</div>

Hi, I am trying to use the crewai’s in-built memory feature but it is giving me an error while adding and searching.

Crewai version: 0.86.0  
OS: Windows 11  
pyhton: 3.12.6

```
    @crew
def crew(self) -> Crew:
    return Crew(
        agents=self.agents,
        tasks=self.tasks,
        manager_llm=LLM(temperature=0, model="claude-3-haiku-20240307"),
        process=Process.hierarchical,
        memory=True,
        verbose=True
    )

ERROR:root:Error during short_term save: APIStatusError. __init__ () missing 2 required keyword-only arguments: 'response' and 'body'
ERROR:root:Error during entities save: APIStatusError. __init__ () missing 2 required keyword-only arguments: 'response' and 'body'
ERROR:root:Error during entities save: APIStatusError. __init__ () missing 2 required keyword-only arguments: 'response' and 'body'
ERROR:root:Error during entities save: APIStatusError. __init__ () missing 2 required keyword-only arguments: 'response' and 'body' 

ERROR:root:Error during short_term search: APIStatusError. __init__ () missing 2 required keyword-only arguments: 'response' and 'body'
ERROR:root:Error during entities search: APIStatusError. __init__ () missing 2 required keyword-only arguments: 'response' and 'body'

```

---

<div class="post-metadata">

**Author:** ![tonykipkemboi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/tonykipkemboi/32/4070_2.png) [@tonykipkemboi](https://community.crewai.com/u/tonykipkemboi)\
**Post date:** [January 2, 2025, 4:43pm UTC](https://community.crewai.com/t/error-adding-and-searching-short-term-and-entities-memory/2408/2 "2025-01-02T16:43:37Z")

</div>

Can you share more of your code? Also if you could add the full error message.

---

<div class="post-metadata">

**Author:** ![Surakshith](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@Surakshith](https://community.crewai.com/u/Surakshith)\
**Post date:** [January 2, 2025, 4:54pm UTC](https://community.crewai.com/t/error-adding-and-searching-short-term-and-entities-memory/2408/3 "2025-01-02T16:54:10Z")

</div>

Kindly find my code for the tasks below.

```
import os

from crewai import Agent,Crew,Process,Task,LLM
from crewai.project import CrewBase, agent, crew, task

from src.types import Summaries, ActionItems, FollowUps, Ideas

@CrewBase
class Insights:

    agents_config = 'config/agents.yaml'
    tasks_config = 'config/tasks.yaml'

    @agent
    def meeting_summarizer(self) -> Agent:
        return Agent(
            config=self.agents_config['meeting_summarizer'],
            verbose=True
        )

    @agent
    def meeting_note_taker(self ) -> Agent:
        return Agent(
            config=self.agents_config['meeting_note_taker'],
            verbose=True
        )

    @agent
    def meeting_analyzer(self ) -> Agent:
        return Agent(
            config=self.agents_config['meeting_analyzer'],
            verbose=True,
        )

    @agent
    def meeting_follower(self ) -> Agent:
        return Agent(
            config=self.agents_config['meeting_follower'],
            verbose=True
        )

    @agent
    def meeting_ideas(self) -> Agent:
        return Agent(
            config=self.agents_config['meeting_ideas'],
            verbose=True
        )

    @task
    def summarize_meeting(self) -> Task:
        return Task(
            config=self.tasks_config['summarize_meeting'],
            output_json=Summaries,
            #async_execution=True,
        )

    @task
    def analyze_notes(self) -> Task:
        return Task(
            config=self.tasks_config['analyze_notes'],
            #async_execution=True
        )

    @task
    def analyze_action_items(self) -> Task:
        return Task(
            config=self.tasks_config['analyze_action_items'],
            output_json=ActionItems,
            #async_execution=True
        )

    @task
    def analyze_followup(self) -> Task:
        return Task(
            config=self.tasks_config['analyze_followup'],
            output_json=FollowUps,
            #async_execution=True
        )

    @task
    def analyze_ideas(self) -> Task:
        return Task(
            config=self.tasks_config['analyze_ideas'],
            output_json=Ideas,
        )

    @crew
    def crew(self) -> Crew:
        return Crew(
            agents=self.agents,
            tasks=self.tasks,
            manager_llm=LLM(temperature=0, model="claude-3-haiku-20240307"),
            process=Process.hierarchical,
            memory=True,
            verbose=True
        )

```

I do not get any more errors. I receive below before a task starts

```
    ERROR:root:Error during short_term search: APIStatusError. __init__ () missing 2 required keyword-only arguments: 'response' and 'body'
    ERROR:root:Error during entities search: APIStatusError. __init__ () missing 2 required keyword-only arguments: 'response' and 'body'

```

I receive below after a task has completed

```
ERROR:root:Error during short_term save: APIStatusError. __init__ () missing 2 required keyword-only arguments: 'response' and 'body'
ERROR:root:Error during entities save: APIStatusError. __init__ () missing 2 required keyword-only arguments: 'response' and 'body'

```

---

<div class="post-metadata">

**Author:** ![Surakshith](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@Surakshith](https://community.crewai.com/u/Surakshith)\
**Post date:** [January 6, 2025, 11:47am UTC](https://community.crewai.com/t/error-adding-and-searching-short-term-and-entities-memory/2408/4 "2025-01-06T11:47:27Z")

</div>

This issue has been reported in the Github as well. I tried with the latest version 0.95.0 but it made no difference.

> <https://github.com/crewAIInc/crewAI/issues/1669>
>
> \### Description
> 
> Started getting this error regarding rag with the latest versio…n 0.83.0
> 
> \### Steps to Reproduce
> 
> Just using the default crew configuration with memory=True.
> 
> \### Expected behavior
> 
> no errors
> 
> \### Screenshots/Code snippets
> 
> \`\`\`
> return Crew(
> agents=agents,
> tasks=tasks,
> manager\_agent=create\_manager\_agent(),
> process=Process.sequential,
> memory=True,
> verbose=crewai\_verbose,
> \*\*kwargs
> )
> \`\`\`
> 
> \### Operating System
> 
> Ubuntu 20.04
> 
> \### Python Version
> 
> 3.10
> 
> \### crewAI Version
> 
> 0.83.0
> 
> \### crewAI Tools Version
> 
> 0.14.0
> 
> \### Virtual Environment
> 
> Conda
> 
> \### Evidence
> 
> \`\`\`
> 2024-11-27 10:42:36,152 - 13765931008 - rag\_storage.py-rag\_storage:118 - ERROR: Error during short\_term search: APIStatusError.\_\_init\_\_() missing 2 required keyword-only arguments: 'response' and 'body'
> 2024-11-27 10:42:36,457 - 13765931008 - rag\_storage.py-rag\_storage:118 - ERROR: Error during entities search: APIStatusError.\_\_init\_\_() missing 2 required keyword-only arguments: 'response' and 'body'
> \`\`\`
> 
> \### Possible Solution
> 
> Not sure currently 
> 
> \### Additional context
> 
> Nothing else

---

<div class="post-metadata">

**Author:** ![Surakshith](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@Surakshith](https://community.crewai.com/u/Surakshith)\
**Post date:** [January 7, 2025, 11:50am UTC](https://community.crewai.com/t/error-adding-and-searching-short-term-and-entities-memory/2408/5 "2025-01-07T11:50:21Z")

</div>

I have successfully resolved the issue I was encountering.

The resolution involved adding credits to my OpenAI account. Following this, both short-term and entity memory functionalities began to operate as expected.

I was aware Crewai memory, by default, used OpenAI embeddings. However, the documentation did not explicitly state the requirement of OpenAI credits for the memory feature to function correctly.

I am now able to observe data being populated within both my entity and short-term memory.

It would be beneficial if Crewai could return a low credit error more explicitly when this is the root cause of an issue.

---

<div class="post-metadata">

**Author:** ![tonykipkemboi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/tonykipkemboi/32/4070_2.png) [@tonykipkemboi](https://community.crewai.com/u/tonykipkemboi)\
**Post date:** [January 7, 2025, 3:07pm UTC](https://community.crewai.com/t/error-adding-and-searching-short-term-and-entities-memory/2408/6 "2025-01-07T15:07:15Z")

</div>

Really good idea on returning the exception error. Will relay.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex025/uploads/crewai/original/1X/ecda97e72f77c7100e0a761444b1c991925cc789.png) [@system](https://community.crewai.com/u/system)\
**Post date:** [January 8, 2025, 3:08pm UTC](https://community.crewai.com/t/error-adding-and-searching-short-term-and-entities-memory/2408/7 "2025-01-08T15:08:06Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
