An AI browser agent that registers accounts, reads verification emails and fills in forms for you. It hands CAPTCHAs and security checks to a human instead of bypassing them. It can also be used by other AI assistants through MCP.
| | |
|---|---|
| Role | Sole designer and developer (architecture, backend, AI agent, browser automation, frontend, DevOps) |
| Built by | Brian Ouma (Yoo) |
| Type | Full-stack AI agent platform |
| Stack | Next.js 15 · TypeScript · Tailwind · Django 5 · Django REST Framework · Celery · Redis · PostgreSQL · Playwright · OpenRouter · Groq · MCP |
| Hosting | Vercel (frontend) · Render (API) · Docker on a VPS (browser worker) |
| Live demo | [add link] |
| Source code | [add link] |
The one-minute summary
Signing up for things on the internet is repetitive and invasive. Every site wants a name, an email and a password, a verification step, and often a CAPTCHA. Login Direct automates the boring part and keeps a human in charge of the sensitive part.
You paste a link. An AI agent opens a real browser, understands the page, invents a throwaway identity (or uses your saved details), fills the form, reads the verification email from a disposable mailbox, and stores the result in an encrypted vault. If it hits a CAPTCHA or any other check, it stops and shows you the live browser so you can finish that step yourself. It never tries to get around it.
It also fills in online forms (Google Forms, Microsoft Forms and others), asks you about anything it doesn't know and remembers the answers, and it exposes everything as an MCP server so assistants like Claude can register on a site and bring information back.
The problem
The solution
A security-first agent platform with a deliberately small and checkable surface:
- A real browser (Playwright) driven by an LLM that can only use an allowlist of validated tools.
- A structured view of each page (a list of labelled elements), not raw HTML.
- Disposable mailboxes with automatic extraction of verification links and codes.
- A human-in-the-loop live browser for anything the agent must not do itself.
- An encrypted vault, per-user isolation, quotas and an audit log.
- Two front doors for the same engine: a web app and an MCP server.
Key features
Registration agent
- Temporary mode: generated identity + disposable mailbox, credentials saved to an encrypted vault.
- Permanent mode: your own saved details and your own email (IMAP app password or Gmail read-only sign-in), reading only mail that arrives after the job starts.
- Verification link and one-time code extraction that picks the right link out of messy emails.
Forms
- Detects Google Forms, Microsoft Forms, Typeform, Jotform, Tally, Airtable and more.
- Reads the whole form first, asks the user about anything unclear, fills it, submits, and reports exactly what was submitted.
- Optional dedicated Google/Microsoft account with an encrypted, per-user saved session for forms that require a sign-in.
Human in the loop
- Live browser streamed to the user's screen. The user can click, type and scroll, then press "continue" and the agent resumes in the same browser.
- Question cards when the agent needs a detail, with an option to remember the answer.
Platform
- Job timeline with plain-language step details, retry/cancel/delete, and a badge showing which AI model handled the job.
- Settings for account type, saved details, email connection, connected accounts and MCP access.
- MCP server with API keys and a full OAuth 2.1 (PKCE + dynamic client registration) flow for Claude.ai custom connectors. An auth-method pre-check refuses social-only sites instead of creating anything.
Reliability
- OpenRouter free router first, automatic fallback to Groq, automatic Groq model discovery, retries on malformed tool calls, and a switch to another model when one keeps failing.
Architecture
``mermaid
graph TD
FE[Next.js frontend
Vercel] -->|REST + JWT| API[Django + DRF
Render]
CLAUDE[Claude / MCP clients] -->|MCP over HTTP
API key or OAuth| API
API --> DB[(PostgreSQL)]
API -->|enqueue| REDIS[(Redis)]
REDIS --> WORKER[Celery worker
Docker on VPS]
WORKER --> AGENT[Agent loop]
AGENT -->|tool calls| LLM[OpenRouter -> Groq fallback]
AGENT -->|allowlisted browser tools| PW[Playwright + Chromium]
AGENT -->|email tools| MAIL[Disposable mailbox / user's inbox]
PW -->|SSRF-guarded| SITE[Target website]
PW -. frames and input via Redis .-> FE
`
Design choices worth noting
- Modular monolith. One deployable backend with clear layers (
common, identities, email_service, browser, ai, ai_agent, registration, accounts, profiles, mcp_server). No premature microservices.
- Provider abstractions. AI providers and email providers sit behind interfaces, so swapping OpenRouter, Groq or mail.tm is a configuration change.
- A job state machine. Queued, opening site, analyzing, filling, waiting for email, verifying, completed, plus resumable "needs a human" and "waiting for your answer" states.
- Async by default. Browser work runs in Celery workers, never inside a web request.
- One code path. The REST API and the AI tools call the same service functions.
The AI security boundary
The agent can reach real code only through a tool registry. Each call is validated against a Pydantic schema, and anything unknown or malformed gets a structured error. There is no "run arbitrary code" tool because it doesn't exist, not because the prompt asks the model not to use one. Prompt injection from a page or an email can therefore only ever cause a call that is on the list and passes validation.
Engineering case studies
These are real problems hit while building and running the system, and how each was solved.
1. Making an LLM safe to put in front of a browser
Problem: A browser agent that follows instructions from web pages is a prompt-injection target.
Approach: The page is converted to a structured list of elements (labels, types, visibility) and hidden content is excluded. The tool surface is an allowlist with Pydantic validation, and the agent has no tool for bypassing verification, only tools that pause the job.
Result: Security rests on structure, not on the model behaving. Tests assert that unknown tools, bad arguments and injected instructions in tool results cannot reach application code.
2. SSRF when the user can drive the browser
Problem: Once users could control the browser through the live view, any request the page made, not just the agent's navigations, could target internal addresses.
Approach: URL validation resolves DNS and rejects private, link-local and cloud-metadata addresses. Validation is re-run on every redirect, and a Playwright route handler checks every request the browser makes.
Result: Verified with a real Chromium test that requests to an internal HTTP server are blocked.
3. Free LLMs are unreliable, so the AI layer has to be resilient
Problem: The free OpenRouter router hit its daily limit. The Groq fallback then failed in three different ways: a hard-coded model the key couldn't access (
404 model_not_found), a tool argument sent as null that Groq's server-side validation rejected, and a model that emitted malformed tool calls.
Approach:
- Groq's model is discovered from the API for the specific key, cached, and re-discovered on a 404.
- Optional tool arguments are declared nullable in the schema, and nulls are dropped before validation.
- Malformed tool-call errors are retried, and after repeated failures the provider switches to another model.
- Tool names were changed from
user__ask to user_ask, with tolerant decoding back to registry names.
Result: A failure at one provider now degrades the service instead of ending the job, and each fix has a test.
4. Long-running jobs and database connections
Problem: Jobs could outlast a database's idle timeout, so after minutes in a browser the next query hit a dead SSL connection.
Approach: A small
ensure_db_connection() helper checks connection health and reconnects. It's called after each LLM call and tool dispatch and while waiting for a human, and it's careful not to touch connections inside a transaction.
Result: Long jobs and long human waits finish without connection errors.
5. Human-in-the-loop that actually keeps the browser alive
Problem: The first design closed the browser when a CAPTCHA appeared, then reopened and re-navigated, losing state.
Approach: The worker holds the browser open and streams screenshots through Redis while the user's clicks, typing and scrolling flow back as input events. The user presses continue, and the agent resumes in the same page. A cap on wait time and per-event validation keep it bounded.
Result: CAPTCHA and verification steps feel like a short hand-off rather than a restart.
6. An agent that asks, remembers and fills forms
Problem: Forms need personal data the system may not have, and guessing is unacceptable.
Approach: A blocking
user.ask tool puts the job into a "waiting for your answer" state, the UI shows a question card, and answers can be saved as encrypted profile entries. Page inspection was extended to understand radio groups, checkboxes and required markers, and form jobs finish with a structured "what was submitted" report.
Result: Forms are filled with real, user-approved data, and the user sees exactly what was sent.
7. Connecting accounts without exposing passwords
Problem: Some forms require a Google or Microsoft sign-in, and the model must never see the password.
Approach: A server-side sign-in routine types credentials into the page; the model only calls
account.sign_in` and sees success or failure. The resulting browser session is stored encrypted per user and loaded only into that user's own job browser. Challenges such as 2-step verification pause the job and hand over to the live view.
Result: Tests prove a user's job only ever receives their own session and that the password never appears in tool output.
8. Becoming an MCP server (and a claude.ai connector)
Problem: Other AI clients should be able to use the agent, but claude.ai custom connectors use OAuth rather than static keys.
Approach: A stateless JSON-RPC MCP endpoint (WSGI friendly), API keys stored as SHA-256 hashes, and a full OAuth 2.1 flow: protected-resource and authorization-server metadata, dynamic client registration, PKCE-only authorization, single-use codes, short-lived access tokens and rotating refresh tokens. An auth-method pre-check rejects social-only sites before anything is created.
Result: One engine, two interfaces, and revoking a token in Settings disconnects the client.
9. Debugging in production-like conditions
A few of the less glamorous fixes that made the system dependable: async-ORM errors caused by Playwright's event loop, mailbox local-part generation, resume step numbering collisions, test-order pollution from cached throttles, and a regex-in-a-JS-string escape bug caught by real-browser testing. Each is covered by a regression test.
Testing and quality
- 300+ automated tests (pytest) across the API, agent loop, dispatcher security, email extraction, OAuth, MCP, SSRF protection and sign-in flows.
- Real-browser tests against Chromium for the SSRF guard, page inspection and the sign-in helpers.
- Type-checked and linted frontend (TypeScript and ESLint) with a production build.
- Honest documentation: what is verified, what is not, and why.
Security summary
SSRF guard · encrypted secrets (Fernet) · owner-scoped queries (404 not 403) · allowlisted tools · prompt-injection resistant page view · per-user quotas and throttles · hashed API keys · PKCE-only OAuth · audit log · credential scrubbing on expiry.
Limitations (stated openly)
- CAPTCHAs, phone and ID verification need a human, by design.
- Some sites reject disposable email domains.
- Very complex multi-page forms can exceed the agent's step budget.
- Free LLM tiers are rate-limited and less reliable at tool use than paid models.
- Google and Microsoft may refuse automated sign-in from server IPs; challenges are completed in the live browser.
- The worker handles one browser job at a time by default.
Responsible use
Built for legitimate privacy and convenience: signing up for services with open registration, testing authorised sites and filling in forms the user is entitled to submit. It cannot and will not defeat security or identity checks, and administrators can block or human-gate domains.
What I learned
- Put the safety in the structure, not in the prompt. An allowlisted, validated tool surface is more trustworthy than instructions to "be careful".
- Treat LLM providers as unreliable infrastructure. Fallbacks, discovery, retries and tolerant parsing matter as much as the prompt.
- Human-in-the-loop is a feature, not a failure. A good hand-off beats a clever bypass.
- Long-running work exposes everything. Timeouts, idle connections, event loops and state recovery all show up the moment a job lasts minutes.
- Be honest about limits. Documenting what isn't verified earns more trust than claiming everything works.
Possible next steps
- Stronger or paid model option per user, with cost tracking.
- Additional email providers and custom domains.
- Scheduled and bulk-but-bounded form submissions with per-site approval.
- Webhook or notification when a job needs the user's attention.
- Admin dashboard for domain policy and usage.
