Skip to content

EthicsGPT/anyprompt

Repository files navigation

📦
anyprompt
PyPI version Python versions License: MIT

anyprompt


Installation

pip install anyprompt

What is anyprompt?

anyprompt is a lightweight tool that automatically captures and visualizes LLM prompts in your Python projects. With a single import, you get a beautiful web interface to inspect all communications with AI providers.

Quick Start

Just import and go!

import anyprompt  # Automatically starts at http://localhost:2400

That's it! Visit http://localhost:2400 in your browser to see your captured prompts.

Compatibility

Library Status
browser-use ✅ Supported
langchain ✅ Supported
openai ✅ Supported
anthropic ✅ Supported
requests ✅ Supported
httpx ✅ Supported
aiohttp ✅ Supported
urllib ✅ Supported
http.client ✅ Supported

Examples

browser-use

import anyprompt
# This automatically starts the anyprompt server at http://localhost:2400
# Then, use browser-use as normal!

from langchain_openai import ChatOpenAI
from browser_use import Agent
import asyncio

async def main():
    agent = Agent(
        task="Compare the price of gpt-4o and DeepSeek-V3",
        llm=ChatOpenAI(model="gpt-4o"),
    )
    await agent.run()

asyncio.run(main())

LangChain

import anyprompt
# This automatically starts the anyprompt server at http://localhost:2400
# Then, use browser-use as normal!

from langchain_openai import ChatOpenAI
from langchain.schema import HumanMessage

# Initialize the LLM
llm = ChatOpenAI(model="gpt-3.5-turbo")

# Make a call - anyprompt will automatically capture it
response = llm.invoke([HumanMessage(content="What's the capital of France?")])
print(response.content)

Privacy & Security

  • Runs locally on your machine
  • No data sent to external servers
  • All prompts stored locally in your project directory

⭐ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published