On-demand Scout service (replaces the nightly aggregator): - FastAPI agent-mesh service; card name "matchmaking-service" (HTTP /a2a/tasks + Redis-stream worker matching the sibling-service pattern) - run_search: parallel multi-board sweep (Naukri/blackfalcondata + Foundit + LinkedIn), city-filtered at the board, cheapest-per-result first - per-board adapters + normalizers -> ScoutJob with rich read-only details and offsite apply links; recall mode + MVQ guard - result cache for dev replay ($0); per-board cost knobs; retry-on-5xx - research/: engine design, board cost economics, India-actor shortlist, POC
41 lines
1.2 KiB
Python
41 lines
1.2 KiB
Python
"""
|
|
verify.py — the smallest possible proof that browser-use works end to end.
|
|
|
|
It confirms three things are wired up correctly:
|
|
1. The browser launches and is driven by browser-use.
|
|
2. Your OpenAI key (from .env) reaches the LLM.
|
|
3. The agent can read a real page and report back.
|
|
|
|
This does NOT log into anything or apply to any job — it's a hello-world.
|
|
|
|
Run:
|
|
source venv/bin/activate
|
|
python verify.py
|
|
"""
|
|
import asyncio
|
|
import os
|
|
|
|
from dotenv import load_dotenv
|
|
from browser_use import Agent, ChatOpenAI
|
|
|
|
load_dotenv() # pulls OPENAI_API_KEY out of the .env file next to this script
|
|
|
|
# HEADLESS=0 in the env -> you SEE a Chrome window open and the agent drive it.
|
|
# Default here is headless (no window) so it runs cleanly in any terminal.
|
|
HEADLESS = os.environ.get("HEADLESS", "1") != "0"
|
|
|
|
|
|
async def main():
|
|
agent = Agent(
|
|
task="Go to https://example.com and tell me the main heading (the big H1 text) on the page.",
|
|
llm=ChatOpenAI(model="gpt-4o-mini"), # cheap model — this is just a smoke test
|
|
)
|
|
history = await agent.run(max_steps=6)
|
|
print("\n========== RESULT ==========")
|
|
print(history.final_result())
|
|
print("============================")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main())
|