Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .releaserc.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions .well-known/agent-card.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 8 additions & 16 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This agent is built using the Agent Definition Language (ADL) and provides A2A c



**System Prompt**: You are an expert Playwright browser automation assistant. Your primary role is to help users automate web browser tasks efficiently and reliably.
**System Prompt**: You are an expert Playwright browser automation assistant with the ability to create downloadable artifacts. Your primary role is to help users automate web browser tasks efficiently and reliably.

Your core capabilities include:
1. **Web Navigation**: Navigate to URLs, handle redirects, and manage page loads
Expand All @@ -41,6 +41,7 @@ Your core capabilities include:
6. **JavaScript Execution**: Run custom scripts in the browser context
7. **Authentication Handling**: Manage various authentication methods
8. **Synchronization**: Wait for specific conditions and handle dynamic content
9. **Artifact Creation**: Create downloadable files for screenshots, extracted data, and CSV exports

Key expertise areas:
- Modern web technologies (SPA, dynamic content, AJAX)
Expand All @@ -63,6 +64,11 @@ When helping users:
- Provide clear explanations of automation steps
- Optimize for speed while maintaining reliability

**IMPORTANT - Artifact Creation**:
When users request screenshots, the take_screenshot tool automatically creates downloadable artifacts. The screenshot will be available via a download URL returned in the response.

For data extraction, you can use the create_artifact tool to save extracted data as downloadable files (JSON/CSV/TXT).

Your automation solutions should be maintainable, efficient, and production-ready.


Expand All @@ -75,7 +81,7 @@ Your automation solutions should be maintainable, efficient, and production-read
## Skills


This agent provides 9 skills:
This agent provides 8 skills:


### navigate_to_url
Expand Down Expand Up @@ -134,13 +140,6 @@ This agent provides 9 skills:
- **Output Schema**: Defined in agent configuration


### write_to_csv
- **Description**: Write structured data to CSV files with support for custom headers and file paths
- **Tags**: export, csv, data, file
- **Input Schema**: Defined in agent configuration
- **Output Schema**: Defined in agent configuration




## Server Configuration
Expand Down Expand Up @@ -246,11 +245,6 @@ curl -X POST http://localhost:8080/skills/wait_for_condition \
-H "Content-Type: application/json" \
-d '{"input": "your_input_here"}'

# Execute write_to_csv skill
curl -X POST http://localhost:8080/skills/write_to_csv \
-H "Content-Type: application/json" \
-d '{"input": "your_input_here"}'


```

Expand Down Expand Up @@ -298,8 +292,6 @@ docker run -p 8080:8080 browser-agent

│ └── wait_for_condition.go # Wait for specific conditions before proceeding with automation

│ └── write_to_csv.go # Write structured data to CSV files with support for custom headers and file paths

├── .well-known/ # Agent configuration
│ └── agent-card.json # Agent metadata
├── go.mod # Go module definition
Expand Down
5 changes: 2 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ browser-agent is an A2A (Agent-to-Agent) server implementing the [A2A Protocol](

### ADL-Generated Structure

The codebase is generated using ADL CLI 0.23.2 and follows a strict generation pattern:
The codebase is generated using ADL CLI 0.23.6 and follows a strict generation pattern:
- **Generated Files**: Marked with `DO NOT EDIT` headers - manual changes will be overwritten
- **Configuration Source**: `agent.yaml` - defines agent capabilities, skills, and metadata
- **Server Implementation**: Built on the ADK (Agent Development Kit) framework from `github.com/inference-gateway/adk`
Expand Down Expand Up @@ -82,7 +82,6 @@ The following skills are currently defined:
- **execute_script**: Execute custom JavaScript code in the browser context
- **handle_authentication**: Handle various authentication scenarios including basic auth, OAuth, and custom login forms
- **wait_for_condition**: Wait for specific conditions before proceeding with automation
- **write_to_csv**: Write structured data to CSV files with support for custom headers and file paths

To modify skills:
1. Update `agent.yaml` with skill definitions
Expand Down Expand Up @@ -118,7 +117,7 @@ Activate with: `flox activate` (if Flox is installed)

- **Generated Files**: Never manually edit files with "DO NOT EDIT" headers
- **Configuration Changes**: Always modify `agent.yaml` and regenerate
- **ADL Version**: Ensure ADL CLI 0.23.2 or compatible version for regeneration
- **ADL Version**: Ensure ADL CLI 0.23.6 or compatible version for regeneration
- **Port Configuration**: Default 8080, configurable via `A2A_PORT` or `A2A_SERVER_PORT`

## Debugging Tips
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ docker run -p 8080:8080 browser-agent
| `execute_script` | Execute custom JavaScript code in the browser context |args, return_value, script |
| `handle_authentication` | Handle various authentication scenarios including basic auth, OAuth, and custom login forms |login_url, password, password_selector, submit_selector, type, username, username_selector |
| `wait_for_condition` | Wait for specific conditions before proceeding with automation |condition, custom_function, selector, state, timeout |
| `write_to_csv` | Write structured data to CSV files with support for custom headers and file paths |append, data, filename, headers, include_headers |

## Configuration

Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 11 additions & 43 deletions agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,50 +310,12 @@ spec:
inject:
- logger
- playwright
- id: write_to_csv
name: write_to_csv
description: Write structured data to CSV files with support for custom headers and file paths
tags:
- export
- csv
- data
- file
schema:
type: object
properties:
data:
type: array
items:
type: object
description: Array of objects to write to CSV, each object represents a row
filename:
type: string
description: Name of the CSV file (without path, will be saved to configured data directory)
headers:
type: array
items:
type: string
description: Custom column headers for the CSV file (optional, will use object keys if not provided)
append:
type: boolean
description: Whether to append to existing file or create new file
default: false
include_headers:
type: boolean
description: Whether to include headers in the CSV output
default: true
required:
- data
- filename
inject:
- logger
- playwright
agent:
provider: ""
model: ""
systemPrompt: |
You are an expert Playwright browser automation assistant. Your primary role is to help users automate web browser tasks efficiently and reliably.
You are an expert Playwright browser automation assistant with the ability to create downloadable artifacts. Your primary role is to help users automate web browser tasks efficiently and reliably.

Your core capabilities include:
1. **Web Navigation**: Navigate to URLs, handle redirects, and manage page loads
2. **Element Interaction**: Click buttons, fill forms, select dropdowns, and interact with any web element
Expand All @@ -363,7 +325,8 @@ spec:
6. **JavaScript Execution**: Run custom scripts in the browser context
7. **Authentication Handling**: Manage various authentication methods
8. **Synchronization**: Wait for specific conditions and handle dynamic content

9. **Artifact Creation**: Create downloadable files for screenshots, extracted data, and CSV exports

Key expertise areas:
- Modern web technologies (SPA, dynamic content, AJAX)
- Selector strategies (CSS, XPath, text, accessibility)
Expand All @@ -375,7 +338,7 @@ spec:
- File uploads and downloads
- Network interception and modification
- Mobile and responsive testing

When helping users:
- Always use robust selectors that won't break easily
- Implement proper wait strategies for dynamic content
Expand All @@ -384,7 +347,12 @@ spec:
- Consider accessibility and best practices
- Provide clear explanations of automation steps
- Optimize for speed while maintaining reliability


**IMPORTANT - Artifact Creation**:
When users request screenshots, the take_screenshot tool automatically creates downloadable artifacts. The screenshot will be available via a download URL returned in the response.

For data extraction, you can use the create_artifact tool to save extracted data as downloadable files (JSON/CSV/TXT).

Your automation solutions should be maintainable, efficient, and production-ready.
services:
playwright:
Expand Down
2 changes: 1 addition & 1 deletion config/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions example/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ services:
A2A_AGENT_CLIENT_MAX_CHAT_COMPLETION_ITERATIONS: 20
A2A_AGENT_CLIENT_MAX_TOKENS: 4096
A2A_AGENT_CLIENT_TEMPERATURE: 0.7
A2A_AGENT_CLIENT_TOOLS_CREATE_ARTIFACT: true
A2A_CAPABILITIES_STREAMING: true
A2A_CAPABILITIES_PUSH_NOTIFICATIONS: false
A2A_CAPABILITIES_STATE_TRANSITION_HISTORY: false
Expand Down
2 changes: 1 addition & 1 deletion go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/logger/logger.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 28 additions & 14 deletions main.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading