> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tinyfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Fill Out and Submit a Form, Including a Job Application

> Complete a multi-step form behind a login wall, with credentials in Vault instead of the goal

> [!NOTE]
>
> **Capability:** Vault credentials

Use this when the form itself needs real data — a name, an address, a resume field — and the
site it's on needs a login first. Put the login credentials in Vault, not in the goal text: the
agent never sees the password, and it isn't left sitting in your run history as plain text.

**1. Connect your vault**

Connect a supported password manager once. See
[Connect Your Vault](https://docs.tinyfish.ai/vault-setup.md) for the setup flow.

**2. Run the agent with vault access and the form goal together**

```python Python theme={null}
from tinyfish import TinyFish

client = TinyFish()

run = client.agent.run(
    url="https://jobs.example.com/careers/senior-engineer",
    goal="""Log in, then apply to this job:
        - First name: "John"
        - Last name: "Doe"
        - Email: "john@example.com"
        - Upload the resume already on file for this profile
        - Answer "Are you authorized to work in this country?" with "Yes"
        Submit the application and return the confirmation number.
    """,
    use_vault=True,
)

print(run.result)
```

```typescript TypeScript theme={null}
import { TinyFish } from "@tiny-fish/sdk";

const client = new TinyFish();

const run = await client.agent.run({
  url: "https://jobs.example.com/careers/senior-engineer",
  goal: `Log in, then apply to this job:
    - First name: "John"
    - Last name: "Doe"
    - Email: "john@example.com"
    - Upload the resume already on file for this profile
    - Answer "Are you authorized to work in this country?" with "Yes"
    Submit the application and return the confirmation number.
  `,
  use_vault: true,
});

console.log(run.result);
```

The agent logs in with the Vault-stored credential first, then works through the form fields
in the goal. Nothing sensitive needs to appear in the goal text itself — only the form data
that isn't secret.

**Output:**

```json theme={null}
{
  "status": "COMPLETED",
  "result": {
    "success": true,
    "confirmation_number": "APP-2026-48213"
  }
}
```

## Multi-Step Forms

A form that spans several pages — personal info, then details, then a review step — works the
same way: describe every step in one goal, and the agent carries state across the whole flow.

```python Python theme={null}
run = client.agent.run(
    url="https://jobs.example.com/careers/senior-engineer",
    goal="""Log in, then complete the multi-step application:

        Step 1 (Personal Info):
        - First name: "John"
        - Last name: "Doe"
        - Email: "john@example.com"
        - Click "Next"

        Step 2 (Experience):
        - Years of experience: "5"
        - Current title: "Software Engineer"
        - Click "Next"

        Step 3 (Review):
        - Confirm the details shown are correct
        - Click "Submit Application"

        Extract the confirmation number from the success page.
    """,
    use_vault=True,
)
```

## Common Mistakes

> [accordion] Putting the password in the goal instead of Vault
>
> Writing `"log in with password XYZ"` in the goal works, but the password then sits in plain
> text in your run history. Use `use_vault: true` with a connected credential instead — see
> [Scrape Content Behind a Login Using Vault](https://docs.tinyfish.ai/agent/how-to/vault-login.md) for the setup, same
> mechanism, different task.

> [accordion] use\_vault is true but login never fires
>
> The credential's domain has to match the site the agent navigates to. Full matching rules:
> [Vault Credentials Troubleshooting](https://docs.tinyfish.ai/key-concepts/credentials.md#troubleshooting).

> [accordion] Vague field instructions
>
> "Fill in my info" doesn't tell the agent what your info is. Spell out every field value
> explicitly, the same way the [Goal Prompting Guide](https://docs.tinyfish.ai/prompting-guide.md) recommends for any task.

## Related

> [card] [Scrape Content Behind a Login Using Vault](https://docs.tinyfish.ai/agent/how-to/vault-login.md)
>
> The same Vault mechanism, for reading instead of submitting

> [card] [Vault Credentials](https://docs.tinyfish.ai/key-concepts/credentials.md)
>
> Domain matching, security model, and troubleshooting

> [card] [Build a Google Form With a Browser Context Profile](https://docs.tinyfish.ai/agent/how-to/create-google-form-with-profile.md)
>
> A saved-session alternative when Vault isn't the right fit

> [card] [Goal Prompting Guide](https://docs.tinyfish.ai/prompting-guide.md)
>
> Write goals that succeed on the first try


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.