Skip to main content

LangChain tools for instanode.dev — let AI agents provision ephemeral Postgres databases and webhook receivers

Project description

langchain-instanode

LangChain tools for instanode.dev — let your LangChain agents provision ephemeral Postgres databases and webhook receivers mid-task with a single tool call. No Docker, no account needed for the free tier.

pip install langchain-instanode

Why

Most LangChain agents that need storage hit a friction wall: they either burn hundreds of tokens generating boilerplate Docker/setup code, or they silently give up and go stateless. langchain-instanode exposes four tools that let an agent skip all of that and just get a database.

  • provision_postgres → a postgres:// DSN (pgvector pre-installed for RAG).
  • provision_webhook → an HTTPS receiver URL (good for GitHub/Stripe/Slack flows).
  • provision_mongo → a mongodb:// URI.
  • list_resources → enumerate what the agent has already provisioned.

Free tier: anonymous, 24h TTL, 10 MB / 2 connections. Paid tier (set INSTANODE_API_KEY): permanent, 500 MB / 5 connections, higher provisioning limits.

Usage

from langchain_instanode import get_instanode_tools
from langchain_anthropic import ChatAnthropic
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_core.prompts import ChatPromptTemplate

llm = ChatAnthropic(model="claude-sonnet-4-6")
tools = get_instanode_tools()

prompt = ChatPromptTemplate.from_messages([
    ("system",
     "You are a helpful coding assistant. When you need a database or webhook, "
     "call the instanode tools instead of writing setup boilerplate."),
    ("placeholder", "{chat_history}"),
    ("human", "{input}"),
    ("placeholder", "{agent_scratchpad}"),
])

agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools, verbose=True)

executor.invoke({"input":
    "Stand up a Postgres DB, create a `notes` table with (id, body), and "
    "insert one row."
})

The agent will call provision_postgres, get back a DSN, run its SQL against the live database, and report the result — all inside one turn.

Scoped tool set

If you want the agent to only have webhook powers (not database provisioning):

tools = get_instanode_tools(include=["provision_webhook"])

Using a paid-tier token

tools = get_instanode_tools(api_key="sk_...")

Or set INSTANODE_API_KEY in the environment.

Dependency graph

langchain-instanode
  ├── instanode        (the HTTP SDK — pure stdlib, no deps)
  ├── langchain-core   (BaseTool + pydantic schemas)
  └── pydantic>=2      (args_schema for structured tool calls)

Related

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_instanode-0.1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_instanode-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file langchain_instanode-0.1.0.tar.gz.

File metadata

  • Download URL: langchain_instanode-0.1.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for langchain_instanode-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6a7f763a1f04bf425cbccdb1f59685c66f5d2308d5d4bbda99f85940696a5e8c
MD5 3ff9cf449c38e23c0c479dc863b15fb0
BLAKE2b-256 f185c577cccdfaa9c5ea480ed7bc7df28f63d7923ae2fa5a8a7cb681fce492b4

See more details on using hashes here.

File details

Details for the file langchain_instanode-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: langchain_instanode-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for langchain_instanode-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c81a418a6e0b446e58ac228118066e5cbd1e99a8e5edaa80c600e1a6862f0e9c
MD5 1bf37bce7f5ee44754c28ec8d403f8fa
BLAKE2b-256 0c9d01461011226a9b97837deb4aa83b5d5b56833850381da6c9ae4ba8f0e6a7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page