# Build with AI frameworks

Give your agent access to a customer's connected systems through an application-controlled tool. Choose a framework, verify its wiring without a model, then discover and read one record from a sandbox connection.

## Choose your framework

| Framework | Start here | Example behavior |
| --- | --- | --- |
| OpenAI Agents SDK | [Function tool guide](/guides/openai-agents) | Registers an argument-free tool and invokes it through the SDK |
| Vercel AI SDK | [Server-side tool guide](/guides/vercel-ai-sdk) | Uses the MCP client behind a bounded AI SDK tool |
| LangChain | [MCP adapter guide](/guides/langchain-mcp) | Discovers the input schema and wraps one invoice read |
| LangGraph | [Graph guide](/guides/langgraph) | Runs one read node followed by an explicit end state |
| CrewAI | [Crew tool guide](/guides/crewai) | Provides a BaseTool with sync and async entry points |
| Pydantic AI | [Typed tool guide](/guides/pydantic-ai) | Registers a context-free tool with server-bound identity |

[Download the examples](https://github.com/apideck-io/developer-docs/tree/Gdewilde/use-case-driven/examples/ai-frameworks). Python examples pin dependencies per script, so CrewAI's MCP dependencies do not conflict with the other frameworks. The Node example has its own package lock. See the [verification record](https://github.com/apideck-io/developer-docs/blob/Gdewilde/use-case-driven/examples/ai-frameworks/VERIFICATION.md) for tested versions and limits.

## Pick the right integration surface

**Apideck MCP** executes operations against connected systems. The examples use its dynamic tools to discover an operation, inspect the input schema and execute one bounded read. The application supplies credentials and fixes the customer and connector.

**[Documentation MCP](/mcp#docs-mcp)** retrieves documentation. It needs no Apideck key and does not call Apideck MCP on your behalf. An agent can use both servers, configured separately.

**[REST and SDKs](/sdks)** are useful when your application already knows the operation. Wrap a specific SDK call as a framework tool and keep the same tenant and execution controls. MCP is not required to use an agent framework with Apideck.

## Verify one layer at a time

1. Run the offline example. A `fixture` result verifies tool or graph wiring without an API key or LLM call.
2. [Connect one customer with Vault](/guides/vault) and check the connector's supported operations.
3. Run `--discover` to check remote tool discovery and the operation's input schema. This does not verify ledger access.
4. Run `--read` explicitly to fetch at most one invoice and inspect the matching request in [Logs](/logs).
5. Add a configured model, then test its tool choice, stopping behavior and recovery separately.

An offline pass is not a live integration certification. A successful empty page is not proof that the intended account was selected. The new examples do not have scored model benchmark results.

## Keep control in your application

Resolve the consumer from your authenticated user. Keep the key, application ID, consumer ID and service ID in server configuration. The model receives an argument-free tool and a sanitized count, not credentials or invoice data.

Use the MCP server's read scope and identity lock. The discovery `scope` filter only selects search results. The examples also enforce a one-attempt budget, including failed reads, and do not retry automatically. A process restart resets this in-memory budget; durable workers need persistent request state.

For writes, design a separate tool with validation, authorization, approval and uncertain-outcome recovery. Do not turn the invoice reader into a general `execute_tool` interface. See [security and data handling](/guides/security-and-data-handling) and [MCP recovery](/guides/mcp-verification-and-recovery).

## Frequently asked questions

### Does a framework determine which model I can use?

The framework and model are separate choices. Configure a model supported by your framework and account, then verify that it can use the tool schema. The deterministic examples do not require a model.

### Do I need an A2A endpoint?

No. A2A is for communication between agents. It is a separate integration from giving an agent tools through MCP or REST. These examples do not implement an A2A service.

### Can I build more than accounting agents?

Yes. The first check uses invoices to keep the result small and verifiable. For CRM, HRIS or another API, select a supported operation, inspect its schema and create a bounded tool for that task. Start from the relevant [API reference](/apis).
