WhoBuilt

Building Agentic Applications w/ Heroku Managed Inference and Agents

Jun 27, 2025· 53 min· 563 views·Watch on YouTube

Speakers

Julián Duque, principal developer advocate at Heroku, and Anush Dsouza, product manager for Heroku AI, lead an AI Engineer workshop on building agentic applications with Heroku Managed Inference and Agents.

Heroku’s approach to building with AI

Anush Dsouza frames Heroku AI around making AI applications easier to build, operate, and scale. The offering combines a curated set of models, an agent control loop, tools, and Heroku’s trusted compute. Developers can add inference to an app with the `heroku ai:models:create` CLI command.

Provision inference and make a first request

Julián Duque shows how to provision a model through the Heroku dashboard and use the app’s inference URL, key, and model ID to make requests. The workshop demonstrates basic chat completions and streaming responses, including rendering streamed Markdown in a Jupyter notebook. Heroku’s endpoint supports the OpenAI specification, with some parameters still unsupported.

Run tools through the Agents endpoint

Duque and Dsouza demonstrate tools for dyno commands, read-only PostgreSQL queries, document conversion, and code execution in Python, Node, Ruby, and Go. The endpoint streams responses while tools run on Heroku dynos that scale back to zero. Examples include calculating a Fibonacci number and fetching the Euclidean algorithm from Wikipedia before running it in Python.

Connect agents to application data

Duque explains how to attach an app to a PostgreSQL follower, which is read-only, so agent queries cannot alter the primary database. The agent retrieves the schema before generating SQL, then answers questions about solar energy production and consumption over the last 30 days. Adding Python code execution lets it generate a chart from the results.

Deploy MCP tools and use them remotely

Duque shows how to attach an MCP server such as Brave Search to the Agents endpoint and call its web search tool. He also demonstrates deploying a Perplexity MCP to Heroku and connecting to the app’s MCP endpoint from an external client. At the time of the workshop, that endpoint used server-sent events and bearer-token authentication.

Takeaways

  • Provision inference as an app resource, then use its URL, key, and model ID to connect through an SDK or HTTP request.
  • Use streaming when a response depends on tools that may take time to run.
  • Retrieve a database schema before asking an agent to generate queries, and use read-only access for safer analysis.
  • Combine tools to handle multi-step tasks, such as fetching a reference implementation and executing it.
  • Expose MCP tools to Heroku agents or connect to them remotely through the MCP endpoint.

Mentioned in this talk

Search inside this talk

What was claimed 13

  • works at
    Senior Product Manager (front-end and developer tools; Heroku AI)
    “I work as a product manager for Heroku AI.”
    YouTube
    Verified2 sources· Talk, Web· archived
  • works at
    Principal Developer Advocate
    “I'm a principal developer advocate at Heroku”
    YouTube
    Verified2 sources· Talk, Web· archived
  • launched
    “our recent product announcement at Heroku: Heroku Managed Inference and Agents”
    YouTube
    Unverified1 source· Talk
  • integrates with
    Managed Inference integrates with MCP
    “For these agent extensions, we’re using the Model Context Protocol.”
    YouTube
    Unverified1 source· Talk
  • feature
    Heroku: Dynos can run MCP servers and scale to zero
    “standard I/O MCP servers that run in Heroku’s trusted compute and can scale to zero”
    YouTube
    Unverified1 source· Talk
  • feature
    Managed Inference: Offers Claude 3.5, Claude 3.7, Claude 4, Cohere Embed, and Stable Image Ultra model options
    “We support text-to-text models from Anthropic Claude 3.5, 3.7, and 4; Cohere Embed for embeddings; and Stable Image Ultra for image generation.”
    YouTube
    Unverified1 source· Talk
  • feature
    Managed Inference: Supports code execution, database access, document conversion, and dyno commands
    “code execution agents, database access agents, document conversion, and commands executed on a dyno”
    YouTube
    Unverified1 source· Talk
  • feature
    Managed Inference: Provides model inference and agent tool execution in Heroku infrastructure
    “This endpoint runs the agent in Heroku infrastructure, on our dynos”
    YouTube
    Unverified1 source· Talk
  • feature
    Managed Inference: Supports streamed agent responses
    “all responses are streamed”
    YouTube
    Unverified1 source· Talk
  • feature
    Postgres: Database followers used with the maintained tools are read-only
    “Followers on Heroku are read-only for security reasons.”
    YouTube
    Unverified1 source· Talk
  • integrates with
    “we have an MCP Brave Search server”
    YouTube
    Unverified1 source· Talk
  • integrates with
    “I deploy this MCP to my space, and then I attach it to my application.”
    YouTube
    Unverified1 source· Talk
  • feature
    Managed Inference: Chat completions endpoint is 95% compatible with the OpenAI API
    “It’s 95% compatible; we’re working to bring it to 99%.”
    YouTube
    Unverified1 source· Talk

Related talks