Skip to main content
Your LangGraph agent keeps its graph and its model. It gets its tools from your Invoke workspace over MCP, so every tool call goes through Invoke.

Before you start

In the console, open API and copy two things: the MCP endpoint and an Agent key. The key belongs to one agent, so every call your agent makes is recorded as that agent’s, and it can’t act as another.
1

Install

2

Write the agent

Save this as agent.py:
agent.py
create_agent from langchain builds a LangGraph agent. langchain-mcp-adapters turns your workspace’s tools into LangChain tools.
3

Run it

The agent uses Invoke’s own memory tools, so it works on a new workspace with nothing connected. You’ll see something like:

Give it a real tool

In the console, open Connectors and connect a tool: GitHub, Slack, Linear, Notion or any MCP server. Its tools appear to your agent on the next run, with names a model API accepts (a GitHub connector’s create_issue is listed as github_create_issue). Then ask for something that changes the world:
Read back what happened with the CLI:
Each write has a receipt that names your agent. If the agent claims a task first (invoke_claim_task), a retried write for that task is answered with its first receipt instead of running twice.

What happened

  • Your agent acted as itself. The key is its identity: Invoke records every call as that agent’s.
  • Every call was checked before it ran: the agent’s permissions, your workspace’s policies and its budget.
  • invoke_remember and invoke_recall are Invoke’s own memory. Notes an agent keeps across runs. Claiming a task again brings back its history and notes, and the workspace’s other agents can read them.

Other models

MODEL takes any LangChain model string. For Claude, pip install langchain-anthropic and set MODEL=anthropic:claude-opus-5-5.

Next steps

  • CLI: connect tools, then read receipts and the event log
  • Authentication: agent keys and account keys
  • Traces: read a run back stage by stage