An automated Software Engineering Agent that executes tasks assigned from Asana using OpenHands SDK.
This project integrates Asana with OpenHands SDK to create an autonomous SWE agent that:
- Listens for Asana task assignments via webhooks
- Spins up a Docker-sandboxed OpenHands agent runtime
- Executes the task (e.g., "update dependencies", "fix bug #123")
- Reports back to Asana with results and marks the task complete
- Docker
- Asana account with API access
- LLM API key (Anthropic, OpenAI, etc.)
- Public URL for webhooks (or ngrok for development)
cp .env.example .env
# Edit .env with your credentialsRequired environment variables:
ASANA_ACCESS_TOKEN- Your Asana Personal Access TokenASANA_AGENT_USER_GID- The GID of the "agent" user in AsanaASANA_WORKSPACE_GID- Your Asana workspace GIDASANA_PROJECT_GID- The GID of the Asana project to watchLLM_API_KEY- Your LLM provider API keyLLM_MODEL- Model to use (e.g.,anthropic/claude-sonnet-4-5-20250929)WEBHOOK_SECRET- Secret for webhook verificationGITHUB_TOKEN- (Optional) For repository access
cd docker && docker compose upWith the dev server running, register the Asana webhook:
docker exec -it asana-swe-agent-dev uv run python scripts/setup_webhooks.pydocker run -d \
--name asana-swe-agent \
--restart unless-stopped \
-p 8000:8000 \
-p 25000-25029:25000-25029 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /tmp/asana-swe-workspaces:/tmp/asana-swe-workspaces \
--env-file .env \
<docker-image-path>:latestasana-swe/
├── app/
│ ├── main.py # FastAPI application
│ ├── config.py # Configuration management
│ ├── asana/
│ │ ├── client.py # Asana API client
│ │ ├── webhooks.py # Webhook handlers
│ │ └── models.py # Pydantic models
│ ├── agent/
│ │ ├── executor.py # OpenHands agent executor
│ │ ├── task_parser.py # Parse Asana tasks into agent prompts
│ │ └── reporter.py # Report results back to Asana
│ └── utils/
│ └── logging.py # Logging configuration
├── scripts/
│ ├── setup_webhooks.py # Register Asana webhooks
│ └── find_asana_ids.py # Helper to find Asana GIDs
├── docker/
│ ├── Dockerfile
│ └── docker-compose.yml
├── .env.example
└── requirements.txt
- Ensure your server is publicly accessible
- Verify the webhook was registered successfully
- Check Docker is running and accessible
- Verify LLM API key is valid
- Check container logs:
docker logs asana-swe-agent-dev
- Verify the task is assigned to the correct agent user
- Check that the task is in the configured project
- Review server logs for errors
MIT License