← 所有集成集成 · AWS

Jev in Amazon Bedrock

Jev isn't a Bedrock foundation model — it returns typed decisions, not tokens — so you wire it in as an action group: a small Lambda your agent calls that POSTs the situation to Jev and hands back one calibrated answer. The jev-bedrock starter deploys the whole thing — Lambda, permissions, and the OpenAPI schema — with one sam deploy.

每个示例都需要一个 jv_live_ key。在 pricing 页领一个,导出为 JEV_API_KEY,就可以开始了。 获取 key →

Amazon Bedrock's model APIs (InvokeModel, Converse) expect a generative model — send messages, stream tokens. Jev takes state plus a set of typed questions and returns typed values with calibrated confidence in one pass, so it doesn't fit that contract. The clean, supported way to use it is an action group: your agent calls a Lambda, the Lambda calls Jev, and the typed decision comes back for the agent to branch on. Everything below bills through the hosted gateway with your jv_live_ key.

Deploy the action group

The jev-bedrock starter is a SAM template that stands up the Lambda, its IAM role, and the Bedrock invoke permission in one command. Clone it, pass your key, deploy:

git clone https://github.com/codaaiteam/jev-bedrock
cd jev-bedrock
sam build
sam deploy --guided --parameter-overrides JevApiKey=jv_live_your_key

sam deploy prints a FunctionArn output — that's the Lambda ARN you attach to your agent.

Attach it to your agent

The OpenAPI schema is the piece people miss

A Bedrock action group needs both a Lambda and an OpenAPI schema so the agent knows how to call it. The starter ships openapi.yaml with a single decide operation that takes a state string — upload it when you add the action group. Without it the agent can't invoke your Lambda.

Make it your decision

The answer space is yours and lives in the Lambda (src/handler.py), not in the agent — so the model can't invent an option. Edit the questions, or set the QUESTIONS_JSON env var. Each typed answer comes back under answers, with a calibrated confidence to threshold on:

"questions": {
  "queue":  { "type": "choice", "criteria": { "billing": "…", "technical": "…", "abuse": "…", "sales": "…" } },
  "urgent": { "type": "noul", "instructions": "Needs a human within the hour?" }
}
// answers.queue.choice → one of your criteria keys
// answers.urgent.noul  → a calibrated 0–1 probability
// answers.<q>.confidence → threshold this for a safe fallback

Why an action group, not a proxied model

Keep your generative model on Bedrock for text; put the small, bounded decisions on Jev. Each decision is sub-cent and ~70–500ms, returns one of your defined options (never a hallucinated label), and can't emit invalid output — so it's cheap and safe to put one in front of every expensive model call. Pin a Jev model version so your confidence thresholds stay stable as models update.

常见问题

Is Jev a foundation model in Amazon Bedrock?

No. Jev isn't in the Bedrock model catalog and there's no InvokeModel or Converse path for it — it returns typed decisions, not tokens. You call it as an action group: a Lambda inside your Bedrock agent POSTs to Jev and returns the typed decision. The jev-bedrock starter deploys that Lambda for you.

What does the jev-bedrock starter deploy?

A SAM template that creates the jev-decision Lambda, its IAM role, and a resource permission letting the Bedrock agents service invoke it — plus the openapi.yaml schema you attach to the action group. Run sam deploy with your jv_live_ key and you get a FunctionArn to wire into your agent.

Why do I need an OpenAPI schema?

A Bedrock action group is defined by an OpenAPI schema plus a Lambda — the schema tells the agent what operation exists and what parameters to send. The starter includes openapi.yaml with a single decide operation that takes a state string; upload it when you add the action group.

Does this bill through my Jev account?

Yes. By default the Lambda calls the hosted gateway https://jevtypesafeai.com/api/v1/decide with your jv_live_ key, so every decision is billed to your Jev account — per input token, output free. Point JEV_URL at your own gateway if you route Jev through one.

Can I use it with Bedrock AgentCore?

Yes — it's an external tool either way. Give your agent an action group backed by the jev-decision Lambda; your generative model stays on Bedrock and only the typed decision call goes out to Jev.

How do I change what it decides?

Edit DEFAULT_QUESTIONS in src/handler.py, or set the QUESTIONS_JSON env var. Use type choice for routing/classification, score for an ordered rating, and noul for a calibrated yes/no. The answer keys you define are the only ones that can come back.

另见:Jev on AWS Bedrock (full guide) · Jev MCP server · Jev for AI agents · How to use the Jev API

接入前先试试 Jev

在浏览器里跑一次真实、类型化的决策 —— 免费、无需注册 —— 然后把你的 key 填进上面的示例。

▶ 免费试用 Jev获取 API key →
Use Jev in Amazon Bedrock — decision action group (SAM starter) · Jev by TypeSafe AI