> ## Documentation Index
> Fetch the complete documentation index at: https://forest-chore-open-api.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent SDK overview

> How Forest agents fit into your stack across supported languages.

A Forest agent is the lightweight backend that connects Forest to your data. It runs in your infrastructure, executes your business logic, and exposes your data and workflows to two consumers:

* **The Forest UI**, what your operations team uses daily.
* **AI agents** (Claude, Dust, Decagon, internal builds), via the built-in MCP server, with the same permissions and audit trail.

The agent is the substrate that makes Forest the operational layer for regulated work, not a thin wrapper around your database.

## Supported languages

<CardGroup cols={2}>
  <Card title="Node.js" icon="node-js" href="/reference/agent-api/nodejs">
    `@forestadmin/agent`, TypeScript-first, multi-datasource, plugin ecosystem. The most actively developed agent.

    **Features**: full TypeScript support with type inference, multi-datasource, plugin ecosystem, advanced customization API, Cloud and self-hosted deployment.
  </Card>

  <Card title="Ruby" icon="gem" href="/reference/agent-api/ruby">
    `forest_admin_agent`, ActiveRecord and Mongoid support, Rails integration.

    **Features**: ActiveRecord and Mongoid datasources, Rails integration, custom actions and fields, approval workflows.
  </Card>
</CardGroup>

## Architecture

All Forest agents follow the same architecture:

```
Your databases & APIs
       ↓
Forest Agent (your backend)
       ↓
Forest API
       ↓
   ┌────┴────┐
Forest UI   MCP server
                ↓
            AI agents
```

The agent is the only component with direct access to your data. Everything else, the UI, the API gateway, AI agents, talks to the agent over HTTPS.

## Core concepts

| Concept        | What it is                                                                                                |
| -------------- | --------------------------------------------------------------------------------------------------------- |
| Datasources    | Connections to your databases, APIs, or custom sources. Multiple per agent.                               |
| Collections    | Each table or model becomes a collection, what operators browse, search, and act on.                      |
| Customizations | Actions, computed fields, segments, relationships, hooks, plugins. Defined in code.                       |
| Hooks          | Intercept and modify CRUD operations to enforce business rules.                                           |
| MCP server     | Exposes your collections, actions, and workflows to AI agents under the same permissions and audit trail. |
| Authentication | Forest handles SSO, SAML, 2FA, SCIM provisioning, and role-based permissions.                             |

## Choosing an agent

| Agent                          | Best for                                                  | Deployment           |
| ------------------------------ | --------------------------------------------------------- | -------------------- |
| Node.js (`@forestadmin/agent`) | Modern apps, TypeScript projects, multi-datasource setups | Cloud or self-hosted |
| Ruby (`forest_admin_agent`)    | Rails applications                                        | Self-hosted          |

If you're starting fresh, the Node.js agent gets the most feature work. The Ruby agent is at parity for the core feature set and is the right choice for Rails-native teams.

## Migrating from a v1 agent?

If you're using a legacy agent (`forest-express-sequelize`, `forest-express-mongoose`, `forest-rails`, or `django-forestadmin` v1), the migration path is documented:

<CardGroup cols={2}>
  <Card title="Migration guide" icon="arrow-right-arrow-left" href="/guides/migration/from-v1/overview">
    Step-by-step migration from v1 to the current generation.
  </Card>

  <Card title="Legacy reference" icon="clock-rotate-left" href="/legacy/agents-overview">
    Reference for v1 agents, maintained for migration purposes only.
  </Card>
</CardGroup>

## Getting started

<Steps>
  <Step title="Choose your agent">
    Node.js or Ruby, pick the one that matches your stack.
  </Step>

  <Step title="Install the package">
    Add `@forestadmin/agent` (npm) or `forest_admin_agent` (gem) to your project.
  </Step>

  <Step title="Configure datasources">
    Connect your databases, APIs, or custom sources.
  </Step>

  <Step title="Add customizations">
    Build actions, computed fields, and segments in code.
  </Step>

  <Step title="Deploy">
    Run the agent in your infrastructure (self-hosted) or have Forest host it (Cloud).
  </Step>
</Steps>

## Next steps

<CardGroup cols={3}>
  <Card title="Node.js reference" href="/reference/agent-api/nodejs">
    Complete API reference for `@forestadmin/agent`.
  </Card>

  <Card title="Ruby reference" href="/reference/agent-api/ruby">
    Complete API reference for `forest_admin_agent`.
  </Card>

  <Card title="Quickstart" href="/get-started/quickstart">
    Get an agent running in 10 minutes.
  </Card>
</CardGroup>

## Need help?

<CardGroup cols={3}>
  <Card title="Documentation" href="/get-started/intro-to-forest-admin">
    Full docs portal.
  </Card>

  <Card title="Community" href="https://community.forestadmin.com">
    Ask the community.
  </Card>

  <Card title="Support" href="mailto:support@forestadmin.com">
    Reach the Forest team.
  </Card>
</CardGroup>
