Experience Search is Acontext’s advanced search abilty to find the revelant skills for Agent.
It can use Embedding or Agent
to find relevant content from skills space.
Use when: You want AI to deeply understand it’s own past and go through its skills like human.
Copy
# Agentic mode with advanced parametersresult = client.spaces.experience_search( space_id="space-uuid", query="What are the best practices for API security?", mode="agentic", semantic_threshold=0.8, max_iterations=20, limit=15)
def build_prompt_with_context(query: str, search_results): """Build a prompt with search context for Agent models.""" # Build context from search results context_parts = [] for block in search_results.cited_blocks: context_parts.append(f"""Use when: {block.title}Skill: {block.props}""") context = "\n---\n".join(context_parts) # Build final prompt prompt = f"""SKILLS REFERENCES:{context}USER REQUEST: {query}Please Act to complete the request""" return prompt# Example usageresult = client.spaces.experience_search( space_id="space-uuid", query="How should I handle user authentication?", mode="fast", limit=5)prompt = build_prompt_with_context( "How should I handle user authentication?", result)# Send to your AI# response = openai_client.chat.completions.create(...)
SOP (Standard Operating Procedure) blocks are structured skill components that contain actionable procedures and tool usage patterns. When you search for skills, the results include SOP blocks that define specific workflows and tool interactions.
Each skill block can contain tool_sops - an array of standard operating procedures that define:
Action: The specific action or step to perform
Tool Name: The tool or system to use for this action
Context: When and how to apply this procedure
sop block example
Copy
{ "use_when": "star a github repo", "preferences": "use personal account. star but not fork", "tool_sops": [ {"tool_name": "goto", "action": "goto the user given github repo url"}, {"tool_name": "click", "action": "find login button if any, and start to login first"}, ... ]}
A SOP block has not only some text summaries about task and preferences, but also the exact tool chain to achieve that.We also prepare some util sdks to manage the tools, in order you may change some tools and invalidate some sops.