# Build an agent

Your agent calls an app as usual. When an approval is missing, the SDK asks the person through a node, waits for their
passkey, and tries again.

## In Python

```python
import os

from allowedby import Agent

agent = Agent(os.environ.get("ALLOWEDBY_NODE", "https://demo.allowedby.com"), tell=print)  # tell: show it to the person
app = os.environ.get("APP_URL", "https://notes.demo.allowedby.com")
status, notes = agent.call("GET", app + "/notes", action="notes:read")
print(status, notes)
```

`tell` receives the approval link and a short code. Show both to the person: they check that the page shows the same
code. Full details are in the [Python guide](https://docs.allowedby.com/sdk/python#agents).

## In JavaScript

The same agent, in Node.js, is in the [JavaScript guide](https://docs.allowedby.com/sdk/js#agents).

## In an agent framework

| Framework | Python | JavaScript |
|---|---|---|
| MCP server | [Yes](https://docs.allowedby.com/sdk/python#agents) | [Yes](https://docs.allowedby.com/sdk/js#agents) |
| LangChain | [Yes](https://docs.allowedby.com/sdk/python#agents) | [Yes](https://docs.allowedby.com/sdk/js#agents) |
| OpenAI Agents SDK | [Yes](https://docs.allowedby.com/sdk/python#agents) | [Yes](https://docs.allowedby.com/sdk/js#agents) |
| Vercel AI SDK | | [Yes](https://docs.allowedby.com/sdk/js#agents) |

Each one becomes a tool that pauses while the person decides.

## What a good agent does

- **Asks for the least.** One resource, one action, a limit on the amount.
- **Shows the code.** A person who sees the code in two places cannot be sent to another request.
- **Takes no for an answer.** After a refusal, it does not ask again for the same action.
- **Keeps approvals.** A standing approval is reused, so that the person is not asked twice.
