# Working with agents across inFlow

Choose the right agent, understand its access, and hand off website and business workflows with clear verification.

## Choose the right kind of agent

| Agent | Where it works | Access today |
| --- | --- | --- |
| External coding agent | Your website repository | Temporary ik_ key: explicitly granted form setup and CRM preparation, approved domains, and scoped reads |
| Dashboard assistant | Signed-in inFlow dashboard | Registered business operations allowed by your membership and feature access |
| Visitor chat agent | Public website chat widget | Visitor conversations and lead capture; not general dashboard administration |

> **Warning:** Integration keys authorize only their explicitly selected grants. The CRM API supports basic lead/client/project/task preparation and pipeline preview/apply; it does not expose the dashboard assistant API, publication, deletion, task completion, outbound sends, or billing. Read the [CRM integration API](/docs/crm-integration-api) and discover the live capability manifest before acting.

## Understand the business boundary

An organization contains businesses. Leads, forms, clients, projects, and other assets belong to a business. A key may explicitly grant access to several businesses, but each operation targets one business. Discover the granted businesses, map each website or portfolio to its business ID, and send X-Business-Id on subsequent integration requests. Never infer the business from a person's name or reuse an ID from another business.

## Connect a website

1. Open **Forms** in the intended business. Create a draft yourself or use **Connect your coding agent** to issue a temporary integration key.
2. Choose only the businesses, forms, and exact domains needed. Keep reading existing customer leads off unless the task requires it.
3. Save the secret in a gitignored local .inflow.env. Give the agent the [Website integration guide](/docs/agent-integration) and [Integration API reference](/docs/integration-api).
4. Have the agent prepare the draft and website integration, then return the business/form mapping and any remaining checks for review.
5. Review and publish the form in the dashboard. Have the agent test the actual website with clearly labeled synthetic contact details and verify the exact submission.
6. Revoke the key when finished. The website uses its business's public pk_ key; it never deploys the temporary ik_ secret.

## Prepare a lead pipeline

Begin with the business's current lead stages and field definitions. Decide which captured answers belong in contact details, custom fields, or notes. Build and test the form, then inspect the resulting lead in the dashboard. Pipeline configuration and CRM preparation can use explicit CRM grants through the [CRM integration API](/docs/crm-integration-api), intersected with current issuer permissions. Form-only keys cannot make those changes. See [Managing leads](/docs/leads).

```text
In the selected business, inspect the current lead stages and relevant fields.
Propose a pipeline for coding enquiries without changing records yet.
Identify required form answers and how they map to lead data.
List anything that needs a dashboard action or broader API access.
After approval, perform supported changes and report the saved IDs and checks.
```

## Prepare projects and work

The dashboard assistant has operations for contacts, projects, scope groups and line items, project notes, expenses, and tasks. Availability depends on your permissions and feature access. Resolve the intended client and project before changing them, ask for clarification when names match several records, and inspect existing work before creating duplicates. Internal operation names are not external endpoints; use the scoped CRM routes and their live schemas for supported external preparation. See [Clients and projects](/docs/clients-projects) and [Using the AI assistant](/docs/ai-assistant).

```text
In this business, find the client and check for an existing project first.
Draft a project plan with scope groups, deliverables, and a task sequence.
Call out missing prices, dates, owners, or dependencies instead of guessing.
After I approve the plan, create the supported records and read them back.
Report what was saved, what failed, and what still needs a decision.
```

## Delegate with a shared handoff

Several agents can research different parts of a setup, but coordinate writes. Assign a single writer for each business and asset, give reviewers the same documentation and explicit task boundaries, and keep credentials out of reports. Planning in parallel does not imply permission to publish, message customers, or change unrelated records.

| Handoff field | Include |
| --- | --- |
| Goal and business | Desired outcome, business ID/slug, website or repository |
| Access | Credential type, expiry and granted scope; never the secret itself |
| Targets | Existing form/client/project IDs and how they were resolved |
| Changes | What was proposed, what was actually saved, and returned IDs |
| Verification | Readback, synthetic test results, remaining failures and unknowns |
| Next action | Human review/publish steps, missing access, or unsupported operations |

## Recover without creating duplicates

1. If a write times out, inspect current state before retrying; it may already have saved.
2. For a revision conflict, fetch the current form and reconcile changes before updating it.
3. For 401 or 403, check key expiry, revocation, selected business, grants, and the issuer's current permissions. Do not switch to a more privileged credential automatically.
4. For rate limiting, respect Retry-After. Report unsupported operations instead of guessing endpoint paths.

## One documentation source

These articles are shared by public docs and dashboard Help. An agent can fetch the same content as Markdown by appending .md to an article URL. Start with [the complete Markdown index](/docs/index.md), then load only the topics needed for the task. Runtime permissions and live form schemas remain authoritative when they differ from examples.
