Agent Context API
Give AI agents full organizational context for content creation. Six endpoints that serve exactly the context needed at each step — as structured markdown ready for prompt injection.
wordflowsai.com/api/agent Auth: X-API-Key header (one key, all orgs)What problem does this solve?
AI agents writing content for a business lack persistent organizational context. Every session starts from zero — the agent doesn't know the brand voice, content strategy, existing published posts, or writing style rules.
Wordflows stores all organizational context and serves it through a step-aware API. Each endpoint returns structured markdown that agents inject directly into their prompts.
Endpoints
/api/agent/orgs When: First call — discover available organizations
Returns: List of orgs with id, name, website, and industry
/api/agent/context/discovery ?organization_id=XWhen: Deciding what to write about
Returns: Content strategy, pillars, audience personas, existing blog posts, learned preferences
/api/agent/context/brief ?organization_id=XWhen: Defining a specific content piece
Returns: Full brand guide, style guide, offers, CTAs, internal linking targets
/api/agent/context/outline ?organization_id=XWhen: Structuring the content
Returns: Heading rules, intro/conclusion guidelines, paragraph structure, tone direction
/api/agent/context/section ?organization_id=X&topic=YWhen: Writing actual content
Returns: Voice writing instructions, style rules, brand constraints, relevant knowledge base content
/api/agent/context/review ?organization_id=XWhen: Checking voice compliance
Returns: Voice compliance rules, quantitative writing baselines, AI-tell detection rules, brand constraints
/api/agent/context/full ?organization_id=XWhen: Need everything in one call
Returns: Complete unified context dump — all of the above, deduplicated
Response format
All endpoints return the same JSON structure. The markdown field contains structured markdown with ## headers — ready for direct prompt injection.
{
"step": "section",
"organization_id": 42,
"markdown": "## Writing Voice (DNA)\n[Detailed voice instructions tailored to this organization...]\n\n## Style Rules\nGrammar: american_english\nOxford Comma: Yes\n\n## Brand Constraints\nProhibited Words: synergy, leverage, delve"
}Quick start
Sign up at wordflowsai.com and complete onboarding
Create a Voice DNA profile (from samples or via Voice Genesis)
Generate an API key from the dashboard
Call the API:
# First, list your organizations
curl -H "X-API-Key: wf_ak_your_key_here" \
https://wordflowsai.com/api/agent/orgs
# Then fetch context for a specific org
curl -H "X-API-Key: wf_ak_your_key_here" \
"https://wordflowsai.com/api/agent/context/discovery?organization_id=42"Integration patterns
Multi-step agent pipeline
Each stage of content creation calls the endpoint it needs. Minimizes token usage per step.
import httpx
headers = {"X-API-Key": "wf_ak_your_key_here"}
base = "https://wordflowsai.com/api/agent"
# Step 0: Get available organizations
orgs = httpx.get(f"{base}/orgs", headers=headers).json()
org_id = orgs[0]["id"] # Pick the one you need
# Step 1: Planning — pick a topic
discovery = httpx.get(f"{base}/context/discovery", headers=headers, params={"organization_id": org_id}).json()["markdown"]
# Step 2: Brief — define the piece
brief = httpx.get(f"{base}/context/brief", headers=headers, params={"organization_id": org_id}).json()["markdown"]
# Step 3: Writing — generate with voice
section = httpx.get(
f"{base}/context/section",
headers=headers,
params={"organization_id": org_id, "topic": "kubernetes deployment"}
).json()["markdown"]
# Step 4: Review — check compliance
review = httpx.get(f"{base}/context/review", headers=headers, params={"organization_id": org_id}).json()["markdown"]Single-agent workflow
One agent handles everything. Call /full once and inject into the system prompt.
import httpx
headers = {"X-API-Key": "wf_ak_your_key_here"}
base = "https://wordflowsai.com/api/agent"
# Get orgs, pick one
orgs = httpx.get(f"{base}/orgs", headers=headers).json()
org_id = orgs[0]["id"]
# One call gets everything for that org
ctx = httpx.get(
f"{base}/context/full",
headers=headers,
params={"organization_id": org_id}
).json()["markdown"]
# Inject into your LLM system prompt
messages = [
{"role": "system", "content": f"You are a content writer.\n\n{ctx}"},
{"role": "user", "content": "Write a blog post about Kubernetes best practices"}
]What is Voice DNA?
Voice DNA is a forensic writing profile that captures exactly how a specific author or brand writes. It goes far beyond "be professional" or "use a friendly tone."
What makes it different
How it's created
From existing writing: Upload blog posts or website content. Wordflows runs a two-pass forensic analysis to extract patterns and synthesize instructions.
From scratch (Voice Genesis): Describe the voice you want. Wordflows generates a fictional character, writes as that character, then analyzes the output forensically.
What is the Content Brain?
The Content Brain is the unified organizational knowledge layer served by this API. It includes:
Brand Guide
Tone, personality, messaging, positioning, dos/don'ts
Style Guide
Grammar, headings, content length, SEO rules
Voice DNA
Forensic writing profile and synthesized instructions
Content Strategy
Goals, pillars, guidelines
Offers & CTAs
Products, services, and calls-to-action with placement rules
Blog Inventory
Existing posts for dedup and internal linking
Knowledge Base
Embedded content chunks from website and uploads
Org Memories
Learned preferences from past interactions
Use cases
Machine-readable documentation
For AI agents and automated tools, these files provide optimized documentation: