For Agents
Browse shelves and books and simulate borrow and return actions on a sample Google library service. Useful as a learning aid and integration test target.
Use for: List all shelves in the library agent service, Get the details of a specific book, I want to borrow a book by resource name, Return a book that was previously borrowed
Not supported: Does not represent a real library catalog, support creating shelves or books, or persist user-specific state — use only as a sample for learning Google's API patterns or for integration tests.
The Library Agent API is Google's example library service exposing a small set of operations over shelves and books, intended for developers to learn the Google Cloud APIs design patterns. It supports listing shelves, listing or fetching individual books, and modeling borrow and return actions on a book. Because it is a sample API rather than a production service, it is most useful as a teaching tool, an integration test target, or a reference for Google's resource-oriented API conventions.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Library Agent API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Library Agent API.
List shelves available in the library service
List the books on a specific shelf
Fetch a single book by its resource name
Borrow a book using the books:borrow action
Return a borrowed book using the books:return action
Patterns agents use Library Agent API for, with concrete tasks.
★ Learning Google Cloud API design patterns
Developers exploring Google Cloud's resource-oriented API conventions use the Library Agent API to see hierarchical resource names like shelves/{shelf}/books/{book} and custom verb actions such as :borrow and :return in practice. The endpoints are stable and free to call, which makes the service a low-stakes sandbox for new SDK and tooling work.
List shelves with GET /v1/shelves, then list books on the first shelf and fetch one book by resource name.
Integration test target for SDKs and agents
Teams building SDKs, MCP servers, or agent frameworks need a real Google API target for end-to-end tests that does not risk production data. The Library Agent's borrow and return endpoints provide simple state changes that an integration suite can call safely on every CI run.
Borrow a book then return it and assert that the response state transitions correctly.
Demo data for educational tutorials
Workshops and onboarding sessions for Google Cloud APIs use the Library Agent service as the backing store for live coding demos. The shelves and books domain is intuitive enough that learners can focus on auth, pagination, and request shape rather than learning a complex service.
Walk a learner through GET /v1/shelves, GET /v1/{+parent}/books, and POST /v1/{+name}:borrow with explanations for each call.
Agent framework smoke tests through Jentic
An agent framework can use the Library Agent API through Jentic as a smoke test that validates the full search-load-execute flow without needing real customer credentials. The five operations cover list, get, and custom-verb actions, which exercises the most common Jentic discovery paths.
Run google_libraryagent_borrow_book with a known book resource name and verify the response includes state=BORROWED.
5 endpoints — the library agent api is google's example library service exposing a small set of operations over shelves and books, intended for developers to learn the google cloud apis design patterns.
METHOD
PATH
DESCRIPTION
/v1/shelves
List all shelves
/v1/{+parent}/books
List books on a shelf
/v1/{+name}
Get a single book by resource name
/v1/{+name}:borrow
Borrow a book
/v1/{+name}:return
Return a borrowed book
/v1/shelves
List all shelves
/v1/{+parent}/books
List books on a shelf
/v1/{+name}
Get a single book by resource name
/v1/{+name}:borrow
Borrow a book
/v1/{+name}:return
Return a borrowed book
Three things that make agents converge on Jentic-routed access.
Credential isolation
Google Cloud service account or user OAuth credentials are stored encrypted in the Jentic vault. The agent receives a short-lived access token at execution time and never sees the raw secret.
Intent-based discovery
Agents search Jentic for intents like 'list shelves' or 'borrow a book' and Jentic returns the matching v1 operation with the resource name template already documented.
Time to first call
Direct integration: 1-2 hours to wire OAuth and walk the resource hierarchy. Through Jentic: under 10 minutes — search, load, execute.
Alternatives and complements available in the Jentic catalogue.
Specific to using Library Agent API through Jentic.
What authentication does the Library Agent API use?
OAuth 2.0 with the https://www.googleapis.com/auth/cloud-platform scope, using a standard Google Cloud service account or user OAuth flow. Through Jentic the credential lives in the encrypted vault and the agent only ever sees a short-lived access token.
Is the Library Agent API a production service?
No. It is a Google sample API, designed to demonstrate Cloud API design patterns and serve as a learning and integration test target. Do not build production workflows on top of it; the data is shared and the service has no SLA.
What are the rate limits for the Library Agent API?
Google applies the default Cloud APIs project quota of 60 requests per minute. The service has no published per-endpoint limits because it is a sample, but standard 429 backoff still applies.
How do I borrow a book through Jentic?
Run jentic search 'borrow a book in the library agent service' to find POST /v1/{+name}:borrow, jentic load to fetch its parameters, then jentic execute with the book resource name like shelves/123/books/456. The response includes the new state field.
Can I create new shelves or books with this API?
No. The Library Agent v1 API only exposes list, get, borrow, and return. Shelves and books are seeded by Google and cannot be created or deleted through the API.
Is the Library Agent API free?
Yes. The service has no per-call pricing — only the standard Google Cloud project quota applies.
GET STARTED