Bedrock AgentCore
AWS Bedrock AgentCore tools for code interpretation and browser automation
Bedrock AgentCore
AWS Bedrock AgentCore provides code interpretation and browser automation capabilities.
Installation
npm install praisonai-tsCode Interpreter
Execute Python code in a sandboxed environment:
import { Agent, bedrockCodeInterpreter } from 'praisonai-ts';
const codeInterpreter = bedrockCodeInterpreter({
// Optional configuration
});
const agent = new Agent({
name: 'CodeAgent',
instructions: 'You help with data analysis using Python code.',
tools: [codeInterpreter],
});
const response = await agent.chat('Calculate the factorial of 10');Browser Tools
Navigate
import { bedrockBrowserNavigate } from 'praisonai-ts';
const navigate = bedrockBrowserNavigate();
const agent = new Agent({
name: 'BrowserAgent',
instructions: 'You help navigate websites.',
tools: [navigate],
});Click
import { bedrockBrowserClick } from 'praisonai-ts';
const click = bedrockBrowserClick();Fill Form
import { bedrockBrowserFill } from 'praisonai-ts';
const fill = bedrockBrowserFill();Configuration
interface CodeInterpreterConfig {
timeout?: number; // Execution timeout in ms
maxMemory?: number; // Max memory in MB
}
interface BrowserConfig {
headless?: boolean; // Run in headless mode
timeout?: number; // Navigation timeout
}Environment Variables
| Variable | Required | Description |
|---|---|---|
AWS_ACCESS_KEY_ID | Yes | AWS access key |
AWS_SECRET_ACCESS_KEY | Yes | AWS secret key |
AWS_REGION | Yes | AWS region |