AS AgentScopeAPI 手册 / API Reference

AgentEntityRepository

public interface AgentEntityRepository extends JpaRepository<AgentEntity, Long>
源码Source io/agentscope/builder/web/persistence/jpa/AgentEntityRepository.java:23–30

定义智能体 Entity 仓库契约的接口。位于 io.agentscope.builder.web.persistence.jpa 包,实现 JpaRepository<AgentEntity, Long>。核心成员包括 findByOwnerIdOrderByCreatedAtAsc、findByOwnerIdAndAgentId。

Spring Data repository for AgentEntity.

方法摘要Method Summary

方法Method说明Description
public List<AgentEntity> findByOwnerIdOrderByCreatedAtAsc(String ownerId)
查找 `findByOwnerIdOrderByCreatedAtAsc`。
All agent definitions owned by `ownerId`, oldest first.
public Optional<AgentEntity> findByOwnerIdAndAgentId(String ownerId, String agentId)
查找通过所有者标识和智能体标识。
Single definition lookup by the `(ownerId, agentId)` pair.

方法详情Method Detail

findByOwnerIdOrderByCreatedAtAsc

public List<AgentEntity> findByOwnerIdOrderByCreatedAtAsc(String ownerId)

查找 findByOwnerIdOrderByCreatedAtAsc。

All agent definitions owned by ownerId, oldest first.

参数Parameters
名称Name类型Type说明Description
ownerIdString所有者标识(类型 `String`)。The owner id.
返回Returns List<AgentEntity>
返回列出。Returns list.
源码Source io/agentscope/builder/web/persistence/jpa/AgentEntityRepository.java:26

findByOwnerIdAndAgentId

public Optional<AgentEntity> findByOwnerIdAndAgentId(String ownerId, String agentId)

查找通过所有者标识和智能体标识。

Single definition lookup by the (ownerId, agentId) pair.

参数Parameters
名称Name类型Type说明Description
ownerIdString所有者标识(类型 `String`)。The owner id.
agentIdString智能体标识(类型 `String`)。The agent id.
返回Returns Optional<AgentEntity>
返回可选。Returns optional.
源码Source io/agentscope/builder/web/persistence/jpa/AgentEntityRepository.java:29
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.