neo4j-aura-agent-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

When to Use

适用场景

  • Creating or configuring an Aura Agent on an existing AuraDB instance
  • Adding/updating tools (CypherTemplate, SimilaritySearch, Text2Cypher) to an agent
  • Deploying an agent for external access (REST API endpoint or MCP server)
  • Invoking an agent with natural language queries via REST API
  • Listing, reading, or deleting existing agents in a project
  • 在现有AuraDB实例上创建或配置Aura Agent
  • 为代理添加/更新工具(CypherTemplate、SimilaritySearch、Text2Cypher)
  • 部署代理以供外部访问(REST API端点或MCP服务器)
  • 通过REST API使用自然语言查询调用代理
  • 列出、查看或删除项目中已有的代理

When NOT to Use

不适用场景

  • Creating/managing AuraDB instances
    neo4j-aura-provisioning-skill
  • Creating vector indexes
    neo4j-vector-index-skill
  • Running Cypher directly
    neo4j-cypher-skill
  • Building Aura Graph Analytics sessions
    neo4j-aura-graph-analytics-skill

  • 创建/管理AuraDB实例
    neo4j-aura-provisioning-skill
  • 创建向量索引
    neo4j-vector-index-skill
  • 直接运行Cypher
    neo4j-cypher-skill
  • 构建Aura图分析会话
    neo4j-aura-graph-analytics-skill

What are Aura Agents

什么是Aura Agents

GraphRAG agents on top of AuraDB — answer natural language questions via three tool types:
  • CypherTemplate — parameterized queries for predictable lookups
  • SimilaritySearch — vector similarity search over a VECTOR index
  • Text2Cypher — natural language → Cypher for aggregations and discovery
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.

基于AuraDB的GraphRAG代理——通过三种工具类型回答自然语言问题:
  • CypherTemplate — 用于可预测查询的参数化查询语句
  • SimilaritySearch — 在VECTOR索引上进行向量相似度搜索
  • Text2Cypher — 将自然语言转换为Cypher语句,用于聚合和发现
无需编写应用代码,即可通过自然语言向用户或应用暴露你的图数据。可作为REST或MCP端点访问;支持单轮和多轮交互。如果需要完全控制Cypher、低延迟查询或直接写入操作,请改用
neo4j-cypher-skill

Prerequisites

前提条件

  • Running AuraDB instance with knowledge graph loaded
  • "Generative AI assistance" enabled in Organization settings
  • "Aura Agent" toggled on in the project
  • "Tool authentication" enabled at project/Security level
  • Project admin access
  • AURA_CLIENT_ID
    and
    AURA_CLIENT_SECRET
    from console.neo4j.io → Account Settings → API Credentials
  • AURA_ORG_ID
    ,
    AURA_PROJECT_ID
    — see Step 2;
    AURA_INSTANCE_ID
    — resolved interactively in Step 2 if not already set
  • Python env:
    uv sync
    in skill directory (or
    pip install neo4j neo4j-graphrag requests python-dotenv
    )
  • .env
    and
    schema.json
    in
    .gitignore

  • 运行中的AuraDB实例,且已加载知识图谱
  • 组织设置中已启用“生成式AI辅助”
  • 项目中已开启“Aura Agent”开关
  • 项目/安全级别已启用“工具认证”
  • 项目管理员权限
  • 从console.neo4j.io → 账户设置 → API凭证获取
    AURA_CLIENT_ID
    AURA_CLIENT_SECRET
  • AURA_ORG_ID
    AURA_PROJECT_ID
    — 参见步骤2;
    AURA_INSTANCE_ID
    — 如果未预先设置,将在步骤2中交互式确定
  • Python环境:在skill目录中执行
    uv sync
    (或执行
    pip install neo4j neo4j-graphrag requests python-dotenv
  • .env
    schema.json
    已添加到
    .gitignore

Step 1 — Verify Auth

步骤1 — 验证认证

Manual credential verification only — scripts call
get_token()
internally.
bash
TOKEN=$(curl -s --request POST 'https://api.neo4j.io/oauth/token' \
  --user "${AURA_CLIENT_ID}:${AURA_CLIENT_SECRET}" \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'grant_type=client_credentials' \
  | jq -r '.access_token')
echo "Token: ${TOKEN:0:20}..."
If blank token: verify
AURA_CLIENT_ID
/
AURA_CLIENT_SECRET
in
.env
. Stop and report. Token TTL: 3600 s. Re-run on 401/403.

仅需手动验证凭证——脚本内部会调用
get_token()
bash
TOKEN=$(curl -s --request POST 'https://api.neo4j.io/oauth/token' \
  --user "${AURA_CLIENT_ID}:${AURA_CLIENT_SECRET}" \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'grant_type=client_credentials' \
  | jq -r '.access_token')
echo "Token: ${TOKEN:0:20}..."
如果返回空令牌:检查
.env
中的
AURA_CLIENT_ID
/
AURA_CLIENT_SECRET
停止操作并上报。 令牌有效期:3600秒。遇到401/403错误时重新执行此步骤。

Step 2 — Resolve Organization & Project IDs

步骤2 — 确定组织与项目ID

From console URL (fastest): open console.neo4j.io → navigate to a project. URL pattern:
/organizations/{AURA_ORG_ID}/projects/{AURA_PROJECT_ID}
Programmatic fallback:
bash
curl -s https://api.neo4j.io/v1/tenants \
  -H "Authorization: Bearer $TOKEN" | jq '.data[] | {id, name}'
从控制台URL获取(最快方式):打开console.neo4j.io → 导航至某个项目。URL格式:
/organizations/{AURA_ORG_ID}/projects/{AURA_PROJECT_ID}
程序化备选方案
bash
curl -s https://api.neo4j.io/v1/tenants \
  -H "Authorization: Bearer $TOKEN" | jq '.data[] | {id, name}'

tenant id maps to AURA_PROJECT_ID

tenant id对应AURA_PROJECT_ID


Set in `.env`:
AURA_ORG_ID=<organization-id> AURA_PROJECT_ID=<project-id>

**Check `AURA_INSTANCE_ID`** — if it is already set in `.env`, skip the rest of this step.

If not set, list available instances and ask the user to choose:

```bash
curl -s "https://api.neo4j.io/v1/instances?tenantId=${AURA_PROJECT_ID}" \
  -H "Authorization: Bearer $TOKEN" \
  | jq '.data[] | {id, name, status, region, type}'
Show output to user. Ask: "Which instance should the agent connect to?" Then write to
.env
:
AURA_INSTANCE_ID=<chosen-instance-id>
NEO4J_URI=neo4j+s://<chosen-instance-id>.databases.neo4j.io
If the list is empty: no AuraDB instances exist in this project — an Aura Agent cannot be created without one. Stop and report. If
401
: re-run Step 1. If
404
: verify
AURA_PROJECT_ID
. Stop and report.


在`.env`中设置:
AURA_ORG_ID=<organization-id> AURA_PROJECT_ID=<project-id>

**检查`AURA_INSTANCE_ID`** — 如果已在`.env`中设置,跳过此步骤剩余部分。

如果未设置,列出可用实例并让用户选择:

```bash
curl -s "https://api.neo4j.io/v1/instances?tenantId=${AURA_PROJECT_ID}" \
  -H "Authorization: Bearer $TOKEN" \
  | jq '.data[] | {id, name, status, region, type}'
将输出展示给用户。询问:“代理应连接到哪个实例?” 然后写入
.env
AURA_INSTANCE_ID=<chosen-instance-id>
NEO4J_URI=neo4j+s://<chosen-instance-id>.databases.neo4j.io
如果实例列表为空:此项目中不存在AuraDB实例——没有AuraDB实例无法创建Aura Agent。停止操作并上报。 如果返回
401
:重新执行步骤1。如果返回
404
:验证
AURA_PROJECT_ID
停止操作并上报。

Step 3 — List Existing Agents

步骤3 — 列出已有的代理

bash
uv run python3 scripts/manage_agent.py list   # Linux/macOS
uv run python scripts\manage_agent.py list    # Windows
Output: agent IDs, names, enabled status, endpoint URLs.
If
401
: re-run Step 1. If
404
: verify
AURA_ORG_ID
/
AURA_PROJECT_ID
. Stop and report.

bash
uv run python3 scripts/manage_agent.py list   # Linux/macOS
uv run python scripts\manage_agent.py list    # Windows
输出:代理ID、名称、启用状态、端点URL。
如果返回
401
:重新执行步骤1。如果返回
404
:验证
AURA_ORG_ID
/
AURA_PROJECT_ID
停止操作并上报。

Step 4 — Fetch Graph Schema

步骤4 — 获取图模式

Requires
NEO4J_URI
,
NEO4J_USERNAME
,
NEO4J_PASSWORD
in
.env
.
bash
uv run python3 scripts/fetch_schema.py   # Linux/macOS
uv run python scripts\fetch_schema.py    # Windows
Saves
schema.json
. Output: node/rel-type counts, node labels + typed properties (with Aura
data_type
), relationship patterns, VECTOR indexes.
Data gate — script exits with error and does NOT write
schema.json
if:
  • fewer than 2 nodes, OR
  • zero relationship types
If gate fails: load data into the database before proceeding. Stop and report. If
ServiceUnavailable
: check
NEO4J_URI
uses
neo4j+s://
; instance must be
running
. Stop and report. If
neo4j-graphrag not found
:
uv add neo4j-graphrag
. Stop and report.
Read
schema.json
before Step 5.

需要在
.env
中设置
NEO4J_URI
NEO4J_USERNAME
NEO4J_PASSWORD
bash
uv run python3 scripts/fetch_schema.py   # Linux/macOS
uv run python scripts\fetch_schema.py    # Windows
保存为
schema.json
。输出:节点/关系类型数量、节点标签+带类型的属性(包含Aura
data_type
)、关系模式、VECTOR索引。
数据校验 — 如果满足以下条件,脚本会报错退出且不会写入
schema.json
  • 节点数量少于2个,或
  • 关系类型数量为0
如果校验失败:先向数据库加载数据,再继续操作。停止操作并上报。 如果返回
ServiceUnavailable
:检查
NEO4J_URI
是否使用
neo4j+s://
;实例必须处于
running
状态。停止操作并上报。 如果提示
neo4j-graphrag not found
:执行
uv add neo4j-graphrag
停止操作并上报。
在步骤5之前阅读
schema.json

Step 5 — Discover Use Cases

步骤5 — 确定使用场景

Before designing tools, read references/authoring-guide.md.
Ask the user these questions. Do NOT guess tool types or parameters.
  1. "What questions should this agent answer?"
  2. "Which nodes or relationships matter most?" — match against
    schema.json → node_props
  3. "Do users search by a specific property value?" → CypherTemplate
  4. "Any counting, grouping, or date-range questions?" → Text2Cypher
  5. "Search for semantically similar text?" → check
    schema.json → metadata → vector_index
    • No VECTOR index found: inform user; skip SimilaritySearch; delegate to
      neo4j-vector-index-skill
      first
    • VECTOR index found: ask the user — "Which embedding provider and model should be used? What output dimension?" See supported models in
      references/REFERENCE.md → Embedding Provider Options
      . Do NOT guess or default.
Tool selection:
Use CaseTool
Lookup by specific property value
cypherTemplate
Semantic text search
similaritySearch
Aggregation, counting, open-ended
text2cypher
CypherTemplate parameters: for each parameter, read
aura_data_type
from
schema.json → node_props
or
rel_props
and use it as
data_type
. If the property has
low_cardinality: true
, the parameter
description
MUST list the valid values — copy them from the
values
array in
schema.json
. Example:
"description": "Agreement type to filter by. Valid values: \"Distributor Agreement\", \"License Agreement\", \"NDA\""
. Properties with
has_fulltext_index: true
are especially likely to be filter targets and must include valid values when low cardinality.
SimilaritySearch configuration — ask the user for all three before drafting the tool config:
FieldWhat to askSource
provider
"openai" or "vertexai"?User confirms
model
Which model?User picks from
references/REFERENCE.md → Embedding Provider Options
dimension
What output dimension?Required if model is configurable (see table); fixed models use the table value
index
: use
name
from
schema.json → metadata → vector_index
where
state = ONLINE
.
dimension
must match
vector.dimensions
in the same index entry.
Signals inventory: for each label or relationship that appears in a tool or the user's stated questions, write a signal block in the system prompt. See
references/authoring-guide.md → Signals inventory
for the template and rules.
Draft config JSON → show to user for review → confirm → proceed to Step 6.

在设计工具之前,请阅读references/authoring-guide.md
向用户询问以下问题。请勿猜测工具类型或参数。
  1. “此代理应回答哪些问题?”
  2. “哪些节点或关系最为重要?” — 与
    schema.json → node_props
    匹配
  3. “用户是否按特定属性值进行搜索?” → 使用CypherTemplate
  4. “是否有计数、分组或日期范围相关的问题?” → 使用Text2Cypher
  5. “是否需要搜索语义相似的文本?” → 检查
    schema.json → metadata → vector_index
    • 未找到VECTOR索引:告知用户;跳过SimilaritySearch;先使用
      neo4j-vector-index-skill
      创建索引
    • 找到VECTOR索引:询问用户 — “应使用哪个嵌入提供商和模型?输出维度是多少?” 参见
      references/REFERENCE.md → Embedding Provider Options
      中的支持模型。请勿猜测或使用默认值。
工具选择:
使用场景工具
按特定属性值查询
cypherTemplate
语义文本搜索
similaritySearch
聚合、计数、开放式问题
text2cypher
CypherTemplate参数:对于每个参数,从
schema.json → node_props
rel_props
中读取
aura_data_type
并将其用作
data_type
。如果属性的
low_cardinality: true
,参数的
description
必须列出有效值——从
schema.json
values
数组中复制。示例:
"description": "要筛选的协议类型。有效值:\"Distributor Agreement\", \"License Agreement\", \"NDA\""
。带有
has_fulltext_index: true
的属性尤其适合作为筛选目标,且当基数较低时必须包含有效值。
SimilaritySearch配置 — 在起草工具配置之前,向用户询问以下三项:
字段询问内容来源
provider
使用“openai”还是“vertexai”?用户确认
model
使用哪个模型?用户从
references/REFERENCE.md → Embedding Provider Options
中选择
dimension
输出维度是多少?如果模型可配置则必填(参见表格);固定模型使用表格中的值
index
:使用
schema.json → metadata → vector_index
state = ONLINE
name
dimension
必须与同一索引条目中的
vector.dimensions
匹配。
信号清单:对于工具或用户提出的问题中出现的每个标签或关系,在系统提示中写入一个信号块。模板和规则参见
references/authoring-guide.md → Signals inventory
起草配置JSON → 展示给用户审核 → 确认 → 进入步骤6。

Step 6 — Create Agent

步骤6 — 创建代理

Minimum required config:
json
{
  "name": "My Agent",
  "description": "Answers questions about the graph",
  "dbid": "<AURA_INSTANCE_ID>",
  "is_private": false,
  "tools": [
    {
      "type": "text2cypher",
      "name": "Query Graph",
      "description": "Translates natural language questions into Cypher queries"
    }
  ]
}
Show config to user and confirm before running:
bash
uv run python3 scripts/manage_agent.py create --config agent-config.json
Response includes
id
(save as
AURA_AGENT_ID
),
endpoint_link
,
mcp_endpoint_link
.

最小必填配置:
json
{
  "name": "My Agent",
  "description": "Answers questions about the graph",
  "dbid": "<AURA_INSTANCE_ID>",
  "is_private": false,
  "tools": [
    {
      "type": "text2cypher",
      "name": "Query Graph",
      "description": "Translates natural language questions into Cypher queries"
    }
  ]
}
运行前展示配置并获得用户确认:
bash
uv run python3 scripts/manage_agent.py create --config agent-config.json
响应包含
id
(保存为
AURA_AGENT_ID
)、
endpoint_link
mcp_endpoint_link

Step 7 — Invoke Agent (Test)

步骤7 — 调用代理(测试)

bash
uv run python3 scripts/invoke_agent.py --agent-id "$AURA_AGENT_ID" "What can you help me with?"
--raw
prints full JSON including reasoning chain and token usage.
Direct curl (uses token from Step 1):
bash
curl -s -X POST \
  "https://api.neo4j.io/v2beta1/organizations/${AURA_ORG_ID}/projects/${AURA_PROJECT_ID}/agents/${AURA_AGENT_ID}/invoke" \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"input": "What can you help me with?"}'

bash
uv run python3 scripts/invoke_agent.py --agent-id "$AURA_AGENT_ID" "What can you help me with?"
--raw
参数会打印完整JSON,包括推理链和令牌使用情况。
直接使用curl调用(使用步骤1中的令牌):
bash
curl -s -X POST \
  "https://api.neo4j.io/v2beta1/organizations/${AURA_ORG_ID}/projects/${AURA_PROJECT_ID}/agents/${AURA_AGENT_ID}/invoke" \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"input": "What can you help me with?"}'

Step 8 — Update Agent (Partial PATCH)

步骤8 — 更新代理(部分PATCH)

Create patch JSON with only the fields to change:
json
{ "system_prompt": "Updated instructions.", "is_mcp_enabled": true }
Show to user and confirm before running:
bash
uv run python3 scripts/manage_agent.py update --agent-id "$AURA_AGENT_ID" --config patch.json

创建仅包含需修改字段的补丁JSON:
json
{ "system_prompt": "Updated instructions.", "is_mcp_enabled": true }
运行前展示给用户并获得确认:
bash
uv run python3 scripts/manage_agent.py update --agent-id "$AURA_AGENT_ID" --config patch.json

Step 9 — Delete Agent

步骤9 — 删除代理

IRREVERSIBLE. Configuration permanently removed.
Show to user and wait for explicit confirmation before running:
bash
uv run python3 scripts/manage_agent.py delete --agent-id "$AURA_AGENT_ID"
Returns 202 Accepted.

此操作不可撤销。配置将被永久移除。
运行前展示给用户并等待明确确认:
bash
uv run python3 scripts/manage_agent.py delete --agent-id "$AURA_AGENT_ID"
返回202 Accepted.

Tool Configuration

工具配置

CypherTemplate

CypherTemplate

Pre-defined parameterized queries for repeated, predictable lookups.
json
{
  "type": "cypherTemplate",
  "name": "<descriptive name>",
  "description": "<what it looks up and when to use it>",
  "enabled": true,
  "config": {
    "template": "MATCH (n:Label {prop: $param}) RETURN n",
    "parameters": [
      {
        "name": "param",
        "data_type": "<string|integer|number|boolean — from schema.json aura_data_type>",
        "description": "<what the parameter represents. If low_cardinality=true in schema.json, append: Valid values: \"val1\", \"val2\", ...>"
      }
    ]
  }
}
Low-cardinality rule: if
schema.json → node_props[Label][prop].low_cardinality
is
true
, the
description
field must end with the exact values from
schema.json → node_props[Label][prop].values
. This applies to relationship properties in
rel_props
too.
用于重复、可预测查询的预定义参数化查询语句。
json
{
  "type": "cypherTemplate",
  "name": "<descriptive name>",
  "description": "<what it looks up and when to use it>",
  "enabled": true,
  "config": {
    "template": "MATCH (n:Label {prop: $param}) RETURN n",
    "parameters": [
      {
        "name": "param",
        "data_type": "<string|integer|number|boolean — from schema.json aura_data_type>",
        "description": "<what the parameter represents. If low_cardinality=true in schema.json, append: Valid values: \"val1\", \"val2\", ...>"
      }
    ]
  }
}
低基数规则:如果
schema.json → node_props[Label][prop].low_cardinality
true
description
字段必须以
schema.json → node_props[Label][prop].values
中的精确值结尾。此规则同样适用于
rel_props
中的关系属性。

SimilaritySearch

SimilaritySearch

Requires a VECTOR index (
state = ONLINE
). Get index name from
schema.json → metadata → vector_index
.
json
{
  "type": "similaritySearch",
  "name": "<descriptive name>",
  "description": "<what text it searches and when to use it>",
  "enabled": true,
  "config": {
    "provider": "openai",
    "model": "text-embedding-3-small",
    "index": "<name from schema.json metadata.vector_index[state=ONLINE].name>",
    "top_k": 5,
    "dimension": "<vector.dimensions from schema.json metadata.vector_index options.indexConfig>",
    "post_processing_cypher": "<optional: Cypher to enrich similarity results with related nodes>"
  }
}
provider
/
model
combinations: see references/REFERENCE.md.
需要VECTOR索引(
state = ONLINE
)。从
schema.json → metadata → vector_index
获取索引名称。
json
{
  "type": "similaritySearch",
  "name": "<descriptive name>",
  "description": "<what text it searches and when to use it>",
  "enabled": true,
  "config": {
    "provider": "openai",
    "model": "text-embedding-3-small",
    "index": "<name from schema.json metadata.vector_index[state=ONLINE].name>",
    "top_k": 5,
    "dimension": "<vector.dimensions from schema.json metadata.vector_index options.indexConfig>",
    "post_processing_cypher": "<optional: Cypher to enrich similarity results with related nodes>"
  }
}
provider
/
model
组合:参见references/REFERENCE.md

Text2Cypher

Text2Cypher

Natural language → Cypher. Use as fallback for aggregation and discovery.
json
{
  "type": "text2cypher",
  "name": "<descriptive name>",
  "description": "<what questions it handles — and explicitly what it should NOT handle>",
  "enabled": true
}

自然语言转Cypher。用作聚合和发现场景的备选方案。
json
{
  "type": "text2cypher",
  "name": "<descriptive name>",
  "description": "<what questions it handles — and explicitly what it should NOT handle>",
  "enabled": true
}

Common Errors

常见错误

ErrorCauseFix
401 Unauthorized
Token expiredRe-run Step 1
403 Forbidden
on create
Not a project adminRequest admin access
400 Bad Request
Invalid tool config or missing required fieldCheck
type
spelling:
cypherTemplate
,
similaritySearch
,
text2cypher
404 Not Found
Wrong org/project/agent IDRe-run
list
to verify IDs
400
on create with SimilaritySearch
Vector index missingCreate index first — use
neo4j-vector-index-skill
Agent returns no results
top_k
too low or index empty
Increase
top_k
; verify index is populated

错误原因修复方案
401 Unauthorized
令牌过期重新执行步骤1
创建时返回
403 Forbidden
非项目管理员请求管理员权限
400 Bad Request
工具配置无效或缺少必填字段检查
type
拼写:
cypherTemplate
,
similaritySearch
,
text2cypher
404 Not Found
组织/项目/代理ID错误重新执行
list
命令验证ID
使用SimilaritySearch创建时返回
400
缺少向量索引先创建索引——使用
neo4j-vector-index-skill
代理无结果返回
top_k
值过低或索引为空
增大
top_k
;验证索引已填充数据

Scripts

脚本

All scripts load credentials from
.env
automatically. Run with
uv run python3 <script>
.
ScriptPurpose
scripts/fetch_schema.py
Fetch graph schema from AuraDB; save to
schema.json
scripts/manage_agent.py
CRUD: list, create, get, update, delete agents
scripts/invoke_agent.py
Send a natural language query to an agent
fetch_schema.py parameters:
ParameterTypeRequiredDefault
NEO4J_URI
envYes
NEO4J_USERNAME
envNo
neo4j
NEO4J_PASSWORD
envYes
NEO4J_DATABASE
envNo
neo4j
manage_agent.py parameters:
ParameterTypeRequiredEnv fallback
AURA_CLIENT_ID
envYes
AURA_CLIENT_SECRET
envYes
--org-id
argNo
AURA_ORG_ID
--project-id
argNo
AURA_PROJECT_ID
--agent-id
argget/update/delete
AURA_AGENT_ID
--config
argcreate/update
invoke_agent.py parameters:
ParameterTypeRequiredEnv fallback
AURA_CLIENT_ID
envYes
AURA_CLIENT_SECRET
envYes
--org-id
argNo
AURA_ORG_ID
--project-id
argNo
AURA_PROJECT_ID
--agent-id
argYes
AURA_AGENT_ID
query
positionalYes
--raw
flagNo

所有脚本会自动从
.env
加载凭证。使用
uv run python3 <script>
运行。
脚本用途
scripts/fetch_schema.py
从AuraDB获取图模式;保存为
schema.json
scripts/manage_agent.py
CRUD操作:列出、创建、获取、更新、删除代理
scripts/invoke_agent.py
向代理发送自然语言查询
fetch_schema.py参数:
参数类型必填默认值
NEO4J_URI
环境变量
NEO4J_USERNAME
环境变量
neo4j
NEO4J_PASSWORD
环境变量
NEO4J_DATABASE
环境变量
neo4j
manage_agent.py参数:
参数类型必填环境变量备选值
AURA_CLIENT_ID
环境变量
AURA_CLIENT_SECRET
环境变量
--org-id
参数
AURA_ORG_ID
--project-id
参数
AURA_PROJECT_ID
--agent-id
参数get/update/delete操作必填
AURA_AGENT_ID
--config
参数create/update操作必填
invoke_agent.py参数:
参数类型必填环境变量备选值
AURA_CLIENT_ID
环境变量
AURA_CLIENT_SECRET
环境变量
--org-id
参数
AURA_ORG_ID
--project-id
参数
AURA_PROJECT_ID
--agent-id
参数
AURA_AGENT_ID
query
位置参数
--raw
标志参数

Checklist

检查清单

  • AuraDB instance
    running
    , knowledge graph loaded
  • "Generative AI assistance" + "Aura Agent" enabled in org/project settings
  • .env
    populated:
    AURA_CLIENT_ID
    ,
    AURA_CLIENT_SECRET
    ,
    AURA_ORG_ID
    ,
    AURA_PROJECT_ID
    ,
    AURA_INSTANCE_ID
    ,
    NEO4J_URI
    ,
    NEO4J_PASSWORD
  • .env
    and
    schema.json
    in
    .gitignore
  • Auth verified (Step 1)
  • Org/Project IDs confirmed (Step 2)
  • API connectivity confirmed via
    list
    (Step 3)
  • schema.json
    fetched and reviewed (Step 4) — data gate passed (≥2 nodes, ≥1 rel type)
  • Use cases confirmed with user (Step 5)
  • CypherTemplate
    data_type
    taken from
    schema.json aura_data_type
  • SimilaritySearch
    index
    from
    schema.json metadata.vector_index
    (state=ONLINE)
  • Agent config shown to user and confirmed (Step 6)
  • Required fields present:
    name
    ,
    description
    ,
    dbid
    ,
    is_private
    ,
    tools
    (min 1)
  • AURA_AGENT_ID
    saved from create response
  • Agent invoked and response verified (Step 7)
  • Update/Delete confirmed by user before execution
  • AuraDB实例处于
    running
    状态,且已加载知识图谱
  • 组织/项目设置中已启用“生成式AI辅助”+“Aura Agent”
  • .env
    已填充:
    AURA_CLIENT_ID
    ,
    AURA_CLIENT_SECRET
    ,
    AURA_ORG_ID
    ,
    AURA_PROJECT_ID
    ,
    AURA_INSTANCE_ID
    ,
    NEO4J_URI
    ,
    NEO4J_PASSWORD
  • .env
    schema.json
    已添加到
    .gitignore
  • 已完成认证验证(步骤1)
  • 已确认组织/项目ID(步骤2)
  • 通过
    list
    命令确认API连通性(步骤3)
  • 已获取并查看
    schema.json
    (步骤4)——通过数据校验(≥2个节点,≥1种关系类型)
  • 已与用户确认使用场景(步骤5)
  • CypherTemplate的
    data_type
    取自
    schema.json aura_data_type
  • SimilaritySearch的
    index
    取自
    schema.json metadata.vector_index
    (state=ONLINE)
  • 已向用户展示代理配置并获得确认(步骤6)
  • 必填字段齐全:
    name
    ,
    description
    ,
    dbid
    ,
    is_private
    ,
    tools
    (至少1个)
  • 已从创建响应中保存
    AURA_AGENT_ID
  • 已调用代理并验证响应(步骤7)
  • 更新/删除操作已获得用户确认后执行