Creates a new HerokuMiaAgent instance.
Optional
fields: HerokuMiaAgentFieldsOptional configuration options for the Heroku Mia Agent
// Basic usage with defaults
const agent = new HerokuMiaAgent();
// With custom configuration
const agent = new HerokuMiaAgent({
model: "claude-3-7-sonnet",
temperature: 0.3,
maxTokensPerRequest: 2000,
tools: [
{
type: "heroku_tool",
name: "dyno_run_command",
runtime_params: {
target_app_name: "my-app",
tool_params: {
cmd: "date",
description: "Gets the current date and time on the server.",
parameters: { type: "object", properties: {} },
},
},
}
}
],
apiKey: "your-api-key",
apiUrl: "https://us.inference.heroku.com"
});
Protected
modelProtected
Optional
temperatureProtected
Optional
maxProtected
Optional
stopProtected
Optional
topProtected
Optional
toolsProtected
Optional
apiProtected
Optional
apiProtected
Optional
maxProtected
Optional
timeoutProtected
Optional
streamingProtected
Optional
streamProtected
Optional
additionalStatic
lc_Returns the LangChain identifier for this agent class.
The string "HerokuMiaAgent"
Returns the LLM type identifier for this agent.
The string "HerokuMiaAgent"
Internal
Get the parameters used to invoke the agent.
This method combines constructor parameters with runtime options to create the final request parameters for the Heroku Agent API. Runtime options take precedence over constructor parameters.
Optional
options: Partial<HerokuMiaAgentCallOptions>Optional runtime parameters that override constructor defaults
Combined parameters for the agent API request
Optional
runManager: CallbackManagerForLLMRunOptional
runManager: CallbackManagerForLLMRun
HerokuMiaAgent - Heroku Managed Inference Agent Integration
A LangChain-compatible chat model that interfaces with Heroku's Managed Inference Agent API. This class provides access to intelligent agents that can execute tools and perform complex multi-step reasoning tasks. Agents have access to Heroku-specific tools like app management, database operations, and can integrate with external services via MCP (Model Context Protocol).
Unlike the basic HerokuMia model, agents are designed for autonomous task execution with built-in tool calling capabilities and advanced reasoning patterns.
Example
Example
Example
See