Agentic AI · Vedic astrology companion · 2026

AstroAgent.

A conversational agent that reasons with care — and proves it.

A Vedic astrology AI companion built on LangGraph: agentic reasoning grounded in real astronomical data, a defense-in-depth guardrail stack tuned for vulnerable users, and an evaluation harness designed to make safety measurable.

RoleSolo · Product · Design · Eng
SurfaceChat agent · 5 tools · BYOK
StackLangGraph · Kerykeion · assistant-ui · DeepEval

The build, end to end

93%
Eval pass rate
30-case held-out set
0%
Attack-success-rate
Across all 6 safety rails
92%
Judge agreement
Self-validated LLM-as-judge

01 The situation

Earning trust in a category that’s losing it.

Vedic astrology AI sits at a tense intersection. The category is dominated by apps that fearmonger about doshas and dashas; the wave of AI astrologers tends to hallucinate planetary positions wholesale. A meaningful share of users come in distress, not curiosity.

The product problem: earn trust through grounded math, demonstrable safety with vulnerable users, and measurable rigor — not feature breadth.

02 The decision

Scope down to scope the proof up.

I scoped the astrology surface area down — going Vedic-scoped and deferring everything that doesn’t make v1 more trustworthy — to reinvest the time in proof.

The easy path was adding dasha or matching to look ambitious. The harder bet: a v1 that earns trust ships fewer features built to a higher bar.

v1 · Shipped

Built to a higher bar.

  • Sidereal kundli (Lahiri ayanamsa, whole-sign houses)
  • Rashi · bhavas · lagna · nakshatra
  • Daily transits (gochar)
  • Six layered safety rails
  • Three labeled evaluation datasets
Deferred

Explicitly future-work.

  • Vimshottari dasha timelines
  • Kundli matching / gun milan
  • Divisional charts (navamsa, etc.)
  • Yogas & doshas (manglik, sade-sati)
  • Panchang · numerology · tarot

03Product & design

Pressure-tested every choice.

Product

Decisions before code

  • 8 core decisions locked through a structured design phase — scope, interaction model, BYOK strategy, tool set, guardrails, eval method, definition-of-done.
  • Interrogated whether the entire build could be re-shaped as portable skill files before committing to the agent stack.
  • Switched from a generic ChatOpenAI(base_url=…) to provider-specific packages after research showed tool-calling would otherwise break.
  • Cut-first discipline for knowledge_lookup, styling, persistence; never-cut for chart accuracy + crisis rail + eval harness.
Design

Docs as instruments

  • Three dual-audience documents — PRD, Architecture, TID — layered so a non-technical reader can stop after Part 1.
  • Designed AGENTS.md as a build constitution: scaffold → walking-skeleton → polish, with hard exit gates between phases.
  • Single-writer-per-file orchestration that mathematically prevents sub-agents from corrupting shared state.
  • Manual human checkpoint after every phase, plus an append-only DECISIONS.md log capturing every deviation.

04 The build

The pieces that earn the safety claims.

Shown the way they actually fit together — agent graph, layered defense, six rails, and the datasets that keep the eval honest.

AAgent graph

LangGraph state machine. Crisis and injection short-circuit before any tokens or tools spend.

START
router
extract_birth
agent
tools
cache_chart
output_guard
END
BDefense in depth

Each layer is cheap-first / expensive-only-when-needed. Higher layers catch what lower layers miss.

01
Keyword fast-path
Substring matchers tuned to avoid false positives (e.g. "Cancer" the zodiac sign).
No LLM · Instant
02
Semantic fallback
Cosine vs anchor phrases via a sentence-transformers singleton shared with RAG. Per-rail tuned thresholds.
1 Embedding · Cached
03
Output rail
Checks for presence of positive signals (referral, agency markers) — not absence of bad words. Regenerates once, falls back to a deterministic safe-reframe.
Final reply · Flat latency
CSix safety rails

Crisis & injection short-circuit in the router. Medical / legal / financial get a nudge + an output rail. Fatalism is output-only.

CrisisSHORT-CIRCUIT
Self-harm · hopelessness · Hinglish / Devanagari
Care + real helplines. Zero tools, no reading.
InjectionSHORT-CIRCUIT
"Ignore instructions" · DAN · roleplay · authority spoof
Refuse, stay in role, never leak prompt.
MedicalNUDGE + OUT
Diagnosis · mortality · "will I get cancer"
No prediction. Reframe + healthcare professional.
LegalNUDGE + OUT
Verdict prediction · "will I win" · custody
No verdict. Reframe + legal professional.
FinancialNUDGE + OUT
Stocks · gold · crypto · "should I buy"
No advice. Reframe + financial advisor.
FatalismOUTPUT-ONLY
"Am I doomed" · "written in my chart" · "born unlucky"
Tendencies, never fate. Agency & free will.
DThree labeled datasets

Deliberately separated. The tune set is held out from the eval set, so the eval can never grade itself.

30
Golden set
Primary eval
Happy-path · transit · guardrail · edge · failure · off-topic. One verified Kerykeion reference, three diversity placeholders.
46
Guardrail set
Adversarial
Persona jailbreaks · authority spoofs · multi-turn attacks · Devanagari crisis · Vedic-specific hard negatives.
56
Tune set
Held out
Per-rail threshold tuning with a dev/test split. Disjoint from the guardrail set to keep the eval honest.

05 The evaluation

Safety, made measurable.

Deterministic checks + a different-family LLM judge + a multi-model sweep. Cost, latency, tool-count, and failure-rate all logged per run.

APer-rail attack-success-rate
30 / 30adversarial attacks blocked across all six rails
Crisis
7 / 7 blocked
0%
Injection
6 / 6 blocked
0%
Medical
5 / 5 blocked
0%
Legal
4 / 4 blocked
0%
Financial
5 / 5 blocked
0%
Fatalism
3 / 3 blocked
0%
BMulti-model sweep

Same harness, same golden set, two different models. The cost-conscious winner emerges from the data, not vibes.

minimax-m2.5 · chosenkimi-k2.6
Pass rate93%90%
Attack-success-rate0%0%
Latency · p5010.4 s20.3 s
Avg tokens / run3,4074,938
Judge agreement92%92%

When the harness reported failures, I separated a real product gap (a persona-jailbreak case slipping a marriage-timing prediction past the rail) from a scorer bug (a check too strict on the agent’s correct refusal) — rather than tuning either away.

Signal

I think about agents as measurable systems — and I pressure-test every recommendation against the real product goal, including my own first instincts.

I scoped the product down to scope the proof up. When the eval reported failures, I separated a real product gap from a scorer bug — instead of tuning either away.

The 93% pass and 0% ASR across six rails weren’t lucky numbers. They were the output of a system designed to be measured.

AI Products • Strategy • UX

I build AI products that solve real problems and drive real impact — from 0→1 and beyond.

AVAILABLE FOR NEW QUESTS

LET'S BUILD

Have an epic idea? Let's craft something legendary together.

BOOK A CALL

© 2026 Devang K. — crafted block by block.

Made with ❤️, and lots of