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).
  • list_resources → enumerate what the agent has already provisioned.

MongoDB, Redis/cache, NATS queue, and heartbeat-monitor tools are on the roadmap, gated on the corresponding backend endpoints landing. They live on the feature/full-api branch.

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.2.0.tar.gz (7.5 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.2.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langchain_instanode-0.2.0.tar.gz
  • Upload date:
  • Size: 7.5 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.2.0.tar.gz
Algorithm Hash digest
SHA256 59f944a867416e350f903864871ebbc7ec09f726af6edcd173b015c8a67fd680
MD5 cf2ae87081164b664c5112a855ff30b9
BLAKE2b-256 2a7b3bc8ca49abc7c24b9ddccd584105a8520f81af18df5b6f164083c75a8c59

See more details on using hashes here.

File details

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

File metadata

  • Download URL: langchain_instanode-0.2.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1add349df6f14d714af4c6853cab8a83ef98190f3296b15fb9fc334fc384c6dd
MD5 d9c30c00e147a7a04a3d0fd60de6e243
BLAKE2b-256 dc9246cbd606a4c208f23830c4af32cf90f4b905f08c59c9ec07122a966d2c14

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