$npx -y skills add neo4j-contrib/neo4j-skills --skill neo4j-aura-agent-skillManages Neo4j Aura Agents via the v2beta1 REST API — create, list, get, update, delete,
| 1 | ## When to Use |
| 2 | - Creating or configuring an Aura Agent on an existing AuraDB instance |
| 3 | - Adding/updating tools (CypherTemplate, SimilaritySearch, Text2Cypher) to an agent |
| 4 | - Deploying an agent for external access (REST API endpoint or MCP server) |
| 5 | - Invoking an agent with natural language queries via REST API |
| 6 | - Listing, reading, or deleting existing agents in a project |
| 7 | |
| 8 | ## When NOT to Use |
| 9 | - **Creating/managing AuraDB instances** → `neo4j-aura-provisioning-skill` |
| 10 | - **Creating vector indexes** → `neo4j-vector-index-skill` |
| 11 | - **Running Cypher directly** → `neo4j-cypher-skill` |
| 12 | - **Building Aura Graph Analytics sessions** → `neo4j-aura-graph-analytics-skill` |
| 13 | |
| 14 | --- |
| 15 | |
| 16 | ## What are Aura Agents |
| 17 | |
| 18 | GraphRAG agents on top of AuraDB — answer natural language questions via three tool types: |
| 19 | |
| 20 | - **CypherTemplate** — parameterized queries for predictable lookups |
| 21 | - **SimilaritySearch** — vector similarity search over a VECTOR index |
| 22 | - **Text2Cypher** — natural language → Cypher for aggregations and discovery |
| 23 | |
| 24 | Expose your graph via natural language to users or apps without application code. Accessible as REST or MCP endpoint; single- and multi-turn. For full Cypher control, low-latency lookups, or direct writes — use `neo4j-cypher-skill` instead. |
| 25 | |
| 26 | --- |
| 27 | |
| 28 | ## Prerequisites |
| 29 | - Running AuraDB instance with knowledge graph loaded |
| 30 | - "Generative AI assistance" enabled in Organization settings |
| 31 | - "Aura Agent" toggled on in the project |
| 32 | - "Tool authentication" enabled at project/Security level |
| 33 | - Project admin access |
| 34 | - `AURA_CLIENT_ID` and `AURA_CLIENT_SECRET` from console.neo4j.io → Account Settings → API Credentials |
| 35 | - `AURA_ORG_ID`, `AURA_PROJECT_ID` — see Step 2; `AURA_INSTANCE_ID` — resolved interactively in Step 2 if not already set |
| 36 | - Python env: `uv sync` in skill directory (or `pip install neo4j neo4j-graphrag requests python-dotenv`) |
| 37 | - `.env` and `schema.json` in `.gitignore` |
| 38 | |
| 39 | --- |
| 40 | |
| 41 | ## Step 1 — Verify Auth |
| 42 | |
| 43 | Manual credential verification only — scripts call `get_token()` internally. |
| 44 | |
| 45 | ```bash |
| 46 | TOKEN=$(curl -s --request POST 'https://api.neo4j.io/oauth/token' \ |
| 47 | --user "${AURA_CLIENT_ID}:${AURA_CLIENT_SECRET}" \ |
| 48 | --header 'Content-Type: application/x-www-form-urlencoded' \ |
| 49 | --data-urlencode 'grant_type=client_credentials' \ |
| 50 | | jq -r '.access_token') |
| 51 | echo "Token: ${TOKEN:0:20}..." |
| 52 | ``` |
| 53 | |
| 54 | If blank token: verify `AURA_CLIENT_ID`/`AURA_CLIENT_SECRET` in `.env`. **Stop and report.** |
| 55 | Token TTL: 3600 s. Re-run on 401/403. |
| 56 | |
| 57 | --- |
| 58 | |
| 59 | ## Step 2 — Resolve Organization & Project IDs |
| 60 | |
| 61 | **From console URL** (fastest): open console.neo4j.io → navigate to a project. URL pattern: |
| 62 | `/organizations/{AURA_ORG_ID}/projects/{AURA_PROJECT_ID}` |
| 63 | |
| 64 | **Programmatic fallback**: |
| 65 | ```bash |
| 66 | curl -s https://api.neo4j.io/v1/tenants \ |
| 67 | -H "Authorization: Bearer $TOKEN" | jq '.data[] | {id, name}' |
| 68 | # tenant id maps to AURA_PROJECT_ID |
| 69 | ``` |
| 70 | |
| 71 | Set in `.env`: |
| 72 | ``` |
| 73 | AURA_ORG_ID=<organization-id> |
| 74 | AURA_PROJECT_ID=<project-id> |
| 75 | ``` |
| 76 | |
| 77 | **Check `AURA_INSTANCE_ID`** — if it is already set in `.env`, skip the rest of this step. |
| 78 | |
| 79 | If not set, list available instances and ask the user to choose: |
| 80 | |
| 81 | ```bash |
| 82 | curl -s "https://api.neo4j.io/v1/instances?tenantId=${AURA_PROJECT_ID}" \ |
| 83 | -H "Authorization: Bearer $TOKEN" \ |
| 84 | | jq '.data[] | {id, name, status, region, type}' |
| 85 | ``` |
| 86 | |
| 87 | Show output to user. Ask: **"Which instance should the agent connect to?"** Then write to `.env`: |
| 88 | |
| 89 | ``` |
| 90 | AURA_INSTANCE_ID=<chosen-instance-id> |
| 91 | NEO4J_URI=neo4j+s://<chosen-instance-id>.databases.neo4j.io |
| 92 | ``` |
| 93 | |
| 94 | If the list is empty: no AuraDB instances exist in this project — an Aura Agent cannot be created without one. **Stop and report.** |
| 95 | If `401`: re-run Step 1. If `404`: verify `AURA_PROJECT_ID`. **Stop and report.** |
| 96 | |
| 97 | --- |
| 98 | |
| 99 | ## Step 3 — List Existing Agents |
| 100 | |
| 101 | ```bash |
| 102 | uv run python3 scripts/manage_agent.py list # Linux/macOS |
| 103 | uv run python scripts\manage_agent.py list # Windows |
| 104 | ``` |
| 105 | |
| 106 | Output: agent IDs, names, enabled status, endpoint URLs. |
| 107 | |
| 108 | If `401`: re-run Step 1. If `404`: verify `AURA_ORG_ID`/`AURA_PROJECT_ID`. **Stop and report.** |
| 109 | |
| 110 | --- |
| 111 | |
| 112 | ## Step 4 — Fetch Graph Schema |
| 113 | |
| 114 | Requires `NEO4J_URI`, `NEO4J_USERNAME`, `NEO4J_PASSWORD` in `.env`. |
| 115 | |
| 116 | ```bash |
| 117 | uv run python3 scripts/fetch_schema.py # Linux/macOS |
| 118 | uv run python scripts\fetch_schema.py # Windows |
| 119 | ``` |
| 120 | |
| 121 | Saves `schema.json`. Output: node/rel-type counts, node labels + typed properties (with Aura ` |