Upload Agent Resources
POST /v1/sessions/{sessionId}/agent/files — uploadAgentFiles
import { client, Agent } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Agent.uploadAgentFiles({
path: {
sessionId: 'your-sessionId'
},
body: {
file: new File(['file content'], 'file.txt')
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.agent.upload_agent_files(
"your-session-id",
file=("file.txt", b"file content"),
)
print(result)
List Agent Resources
GET /v1/sessions/{sessionId}/agent/files — listAgentFiles
import { client, Agent } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Agent.listAgentFiles({
path: {
sessionId: 'your-sessionId'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.agent.list_agent_files(
"your-session-id",
)
print(result)
Pause Agent
POST /v1/sessions/{session_id}/agent/pause — pauseAgent
import { client, Agent } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Agent.pauseAgent({
path: {
session_id: 'your-session-id'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.agent.pause_agent(
"your-session-id",
)
print(result)
Resume Agent
POST /v1/sessions/{session_id}/agent/resume — resumeAgent
import { client, Agent } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Agent.resumeAgent({
path: {
session_id: 'your-session-id'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.agent.resume_agent(
"your-session-id",
)
print(result)
List Pending Human Interventions
GET /v1/sessions/pending-interventions — listPendingInterventions
import { client, Agent } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Agent.listPendingInterventions();
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.agent.list_pending_interventions()
print(result)
Get Requested Human Interventions
GET /v1/sessions/{session_id}/agent/requested-human-intervention — getRequestedHumanIntervention
import { client, Agent } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Agent.getRequestedHumanIntervention({
path: {
session_id: 'your-session-id'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.agent.get_requested_human_intervention(
"your-session-id",
)
print(result)
Respond to Human Intervention
POST /v1/sessions/{session_id}/agent/respond-to-human-intervention — respondToHumanIntervention
import { client, Agent } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Agent.respondToHumanIntervention({
path: {
session_id: 'your-session-id'
},
body: {
response: 'string'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.agent.respond_to_human_intervention(
"your-session-id",
response="string",
)
print(result)

