---
title: "Framework wrappers"
description: "Official Edge tool packages for LangChain, LlamaIndex, CrewAI and the Vercel AI SDK. Tool definitions are fetched from the MCP endpoint at runtime."
url: "https://edge.network/docs/agent/frameworks"
section: "Agent tooling"
---

# Framework wrappers

Building your own agent? Official packages expose the full Edge tool set as native tools for LangChain, LlamaIndex, CrewAI, and the Vercel AI SDK.

## How they work

Both packages expose the full [Edge tool set](/docs/agent/mcp-tools) and fetch tool definitions from the [MCP endpoint](/docs/agent/mcp) at runtime rather than bundling static copies. When Edge ships a new tool or refines a description, your agent picks it up on the next run without a package update. Arguments are validated against each tool's JSON Schema before anything is sent.

| Package | Registry | Frameworks |
|---|---|---|
| `edge-network-agent` | PyPI | LangChain, LlamaIndex, CrewAI (via optional extras) |
| `@edge-network/ai-tools` | npm | Vercel AI SDK (`generateText` / `streamText`) |

Authentication is the same everywhere: pass an [agent access code](/docs/agent/access-codes) explicitly or set the `EDGE_AGENT_CODE` environment variable.

## LangChain

```bash
pip install "edge-network-agent[langchain]"
```

```python
from edge_network_agent import EdgeAgentTools
from langchain.agents import create_react_agent

edge = EdgeAgentTools(agent_code="ea_live_...")  # or EDGE_AGENT_CODE env var
agent = create_react_agent(model, tools=edge.langchain_tools())

agent.invoke({"messages": [
    ("user", "Deploy ./dist as a static site on Edge and give me the URL")
]})
```

`langchain_tools()` returns `StructuredTool` instances with Pydantic argument models built from each tool's schema. Pass `include=["edge_discover", "edge_deploy_static_site"]` to expose a subset.

## LlamaIndex

```bash
pip install "edge-network-agent[llamaindex]"
```

```python
from edge_network_agent import EdgeAgentTools
from llama_index.core.agent import ReActAgent

edge = EdgeAgentTools()  # EDGE_AGENT_CODE env var
agent = ReActAgent.from_tools(edge.llamaindex_tools(), llm=llm)

agent.chat("What projects do I have on Edge, and are they healthy?")
```

`llamaindex_tools()` returns `FunctionTool` instances ready for any LlamaIndex agent.

## CrewAI

```bash
pip install "edge-network-agent[crewai]"
```

```python
from edge_network_agent import EdgeAgentTools
from crewai import Agent

edge = EdgeAgentTools()
devops = Agent(
    role="DevOps engineer",
    goal="Deploy and monitor the team's sites on Edge",
    tools=edge.crewai_tools(),
)
```

`crewai_tools()` returns `BaseTool` instances any crew member can use.

## Vercel AI SDK

```bash
npm install @edge-network/ai-tools ai
```

```js
import { generateText } from 'ai'
import { createEdgeTools, fetchStarterPrompt } from '@edge-network/ai-tools'

const tools = await createEdgeTools({ agentCode: 'ea_live_...' })

const { text } = await generateText({
  model,
  system: await fetchStarterPrompt(),
  tools,
  prompt: 'Deploy the ./dist folder as a static site and report the URL',
})
```

`createEdgeTools()` resolves to a tool map for `generateText` and `streamText`; `fetchStarterPrompt()` returns Edge's recommended system prompt.

## Without a framework

The Python package also works standalone. Call tools directly and pull the starter prompt:

```python
edge = EdgeAgentTools(agent_code="ea_live_...")

# Call any tool directly, no framework needed
result = edge.call(
    "edge_deploy_static_site",
    project="my-site",
    files=[...],
    dry_run=True,   # preview first
)

# The recommended system prompt for agents working with Edge
system = edge.starter_prompt()
```

## Next steps

- [MCP tool reference](/docs/agent/mcp-tools) — Every tool your agent gets, with parameters
- [Agent self-signup](/docs/agent/self-signup) — Let agents provision their own explore-tier account
