Identifying at which point chains & agents fail is hard, iterating on the point of failure is even harder, and seeing how the fix works across different inputs is almost impossible.

Prompt IDE

For this purpose, we developed the Prompt IDE (PIDE) which is a purpose-built code editor allowing you to quickly iterate on chains & agents across many inputs. If you are building with chains or agents, book a meeting to be part of our private alpha!

Your Own Code Editor

You can iterate on your chains & agents much faster by using a local cache. This will allow you to make changes to your code & prompts without waiting for all previous, valid LLM responses. Simply add these two lines to the beginning your code and start a local redis cache:

from parea import init, RedisCache

init(cache=RedisCache())

Above will use the default redis cache at localhost:6379 with no password. You can also specify your redis database by:

from parea import init, RedisCache

cache = RedisCache(
    host=os.getenv("REDIS_HOST", "localhost"),  # default value
    port=int(os.getenv("REDIS_PORT", 6379)),    # default value
    password=os.getenv("REDIS_PASSWORT", None)  # default value
)
init(cache=cache)                               # default value

If you set cache = None for init, no cache will be used.