pip install 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.
import anyprompt # Automatically starts at http://localhost:2400
That's it! Visit http://localhost:2400 in your browser to see your captured prompts.
Library | Status |
---|---|
browser-use | ✅ Supported |
langchain | ✅ Supported |
openai | ✅ Supported |
anthropic | ✅ Supported |
requests | ✅ Supported |
httpx | ✅ Supported |
aiohttp | ✅ Supported |
urllib | ✅ Supported |
http.client | ✅ Supported |
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())
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)
- Runs locally on your machine
- No data sent to external servers
- All prompts stored locally in your project directory
Contributions are welcome! Please feel free to submit a Pull Request.