Agi Inc Bubble
AGI Agent integration for browser automation and task execution
Quick Start
import { AGIIncBubble } from '@bubblelab/bubble-core';
import { CredentialType } from '@bubblelab/shared-schemas';
const result = await new AGIIncBubble({
operation: 'create_session',
credentials: {
[CredentialType.AGI_API_KEY]: process.env.AGI_API_KEY as string,
},
}).action();
Operation Details
create_session
- Input Schema
- Output Schema
operation'create_session' required- Create a new agent session with a browser environment
agent_name'agi-0' | 'agi-0-fast'- Agent model to use
webhook_urlstring- URL to receive webhook notifications for session events
restore_from_session_idstring- Restore session from a specific session snapshot
restore_default_environment_from_user_idstring- Restore from user default environment snapshot
enable_memory_snapshotboolean- Enable memory snapshots for faster restoration
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'create_session' requiredokboolean required- Whether the API call was successful
session_idstring- Created session ID
vnc_urlstring- URL to view the browser
agent_namestring- Agent model being used
status'initializing' | 'ready' | 'running' | 'paused' | 'completed' | 'error' | 'terminated'- Session status
created_atstring- Creation timestamp
errorstring required- Error message if operation failed
successboolean required- Whether the operation was successful
list_sessions
- Input Schema
- Output Schema
operation'list_sessions' required- Get all sessions for the authenticated user
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'list_sessions' requiredokboolean required- Whether the API call was successful
sessionsobject[]- Array of sessions
errorstring required- Error message if operation failed
successboolean required- Whether the operation was successful
get_session
- Input Schema
- Output Schema
operation'get_session' required- Get details for a specific session
session_idstring required- The UUID of the session to retrieve
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'get_session' requiredokboolean required- Whether the API call was successful
sessionobject- Session details
errorstring required- Error message if operation failed
successboolean required- Whether the operation was successful
delete_session
- Input Schema
- Output Schema
operation'delete_session' required- Delete a specific session and cleanup resources
session_idstring required- The UUID of the session to delete
save_snapshot_mode'none' | 'memory' | 'filesystem'- Snapshot mode when deleting
save_as_defaultboolean- Set snapshot as user default environment
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'delete_session' requiredokboolean required- Whether the API call was successful
deletedboolean- Whether session was deleted
messagestring- Result message
errorstring required- Error message if operation failed
successboolean required- Whether the operation was successful
delete_all_sessions
- Input Schema
- Output Schema
operation'delete_all_sessions' required- Delete all sessions for the authenticated user
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'delete_all_sessions' requiredokboolean required- Whether the API call was successful
deletedboolean- Whether sessions were deleted
messagestring- Result message
errorstring required- Error message if operation failed
successboolean required- Whether the operation was successful
send_message
- Input Schema
- Output Schema
operation'send_message' required- Send a message to the agent to start a task or respond
session_idstring required- The UUID of the session
messagestring required- The message text to send to the agent
start_urlstring- Optional starting URL for the agent to navigate to
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'send_message' requiredokboolean required- Whether the API call was successful
messagestring- Confirmation message
errorstring required- Error message if operation failed
successboolean required- Whether the operation was successful
get_status
- Input Schema
- Output Schema
operation'get_status' required- Get the current execution status of a session
session_idstring required- The UUID of the session
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'get_status' requiredokboolean required- Whether the API call was successful
status'running' | 'waiting_for_input' | 'finished' | 'error'- Current execution status
errorstring required- Error message if operation failed
successboolean required- Whether the operation was successful
get_messages
- Input Schema
- Output Schema
operation'get_messages' required- Poll for messages and updates from the agent
session_idstring required- The UUID of the session
after_idnumber- Return only messages with ID greater than this value
sanitizeboolean- Filter out system messages and internal prompts
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'get_messages' requiredokboolean required- Whether the API call was successful
messagesobject[]- Array of messages
status'running' | 'waiting_for_input' | 'finished' | 'error'- Current execution status
has_agentboolean- Whether agent is connected
errorstring required- Error message if operation failed
successboolean required- Whether the operation was successful
pause_session
- Input Schema
- Output Schema
operation'pause_session' required- Temporarily pause task execution
session_idstring required- The UUID of the session to pause
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'pause_session' requiredokboolean required- Whether the API call was successful
messagestring- Result message
errorstring required- Error message if operation failed
successboolean required- Whether the operation was successful
resume_session
- Input Schema
- Output Schema
operation'resume_session' required- Resume a paused task
session_idstring required- The UUID of the session to resume
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'resume_session' requiredokboolean required- Whether the API call was successful
messagestring- Result message
errorstring required- Error message if operation failed
successboolean required- Whether the operation was successful
cancel_session
- Input Schema
- Output Schema
operation'cancel_session' required- Cancel the current task execution
session_idstring required- The UUID of the session to cancel
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'cancel_session' requiredokboolean required- Whether the API call was successful
messagestring- Result message
errorstring required- Error message if operation failed
successboolean required- Whether the operation was successful
navigate
- Input Schema
- Output Schema
operation'navigate' required- Navigate the browser to a specific URL
session_idstring required- The UUID of the session
urlstring required- Absolute URL to navigate to
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'navigate' requiredokboolean required- Whether the API call was successful
current_urlstring- Current URL after navigation
errorstring required- Error message if operation failed
successboolean required- Whether the operation was successful
get_screenshot
- Input Schema
- Output Schema
operation'get_screenshot' required- Capture a screenshot of the current browser state
session_idstring required- The UUID of the session
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'get_screenshot' requiredokboolean required- Whether the API call was successful
screenshotstring- Base64-encoded JPEG image as data URL
urlstring- Current page URL
titlestring- Current page title
errorstring required- Error message if operation failed
successboolean required- Whether the operation was successful